This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3 2/3] Consolidate gettimeofday across aarch64/s390/tile
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: Nathan Lynch <Nathan_Lynch at codesourcery dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 26 May 2015 17:28:46 -0300
- Subject: Re: [PATCH v3 2/3] Consolidate gettimeofday across aarch64/s390/tile
- Authentication-results: sourceware.org; auth=none
- References: <5550FEF8 dot 50501 at linaro dot org> <555B7605 dot 9040803 at codesourcery dot com> <555B940A dot 9040105 at linaro dot org>
On 19-05-2015 16:50, Adhemerval Zanella wrote:
>
>
> On 19-05-2015 14:42, Nathan Lynch wrote:
>> On 05/11/2015 02:11 PM, Adhemerval Zanella wrote:
>>> This patch removes the architecture specific gettimeofday implementation
>>> to use the vDSO symbol and consolidate it on a common Linux one.
>>> Similat to gettime and getres vDSO implementation, each arch that supports
>>> gettimeofday through vDSO should just implement INLINE_VSYSCALL to access
>>> the symbol and define HAVE_GETTIMEOFDAY_VSYSCAL as 1.
>>>
>>> Tested on i386, x32, x86_64, ppc64le and aarch64. Ok to apply?
>>>
>>> Changes from previous version:
>>>
>>> - Fix SYSCALL spelling.
>>>
>>> --
>>>
>>> * sysdeps/unix/sysv/linux/aarch64/gettimeofday.c: Remove file.
>>> * sysdeps/unix/sysv/linux/s390/gettimeofday.c: Likewise.
>>> * sysdeps/unix/sysv/linux/tile/gettimeofday.c: Likewise.
>>> * sysdeps/unix/sysv/linux/aarch64/sysdep.h
>>> [HAVE_GETTIMEOFDAY_VSYSCALL]: Define.
>>> * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
>>> [HAVE_GETTIMEOFDAY_VSYSCALL]: Likewise.
>>> * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
>>> [HAVE_GETTIMEOFDAY_VSYSCALL]: Likewise.
>>> * sysdeps/unix/sysv/linux/tile/sysdep.h
>>> [HAVE_GETTIMEOFDAY_VSYSCALL]: Likewise.
>>> * sysdeps/unix/sysv/linux/gettimeofday.c: New file: gettimeofday
>>> using vDSO syscall macro.
>>>
>>
>> With this change, do the #undefs in init-first.c (seen in aarch64, s390,
>> powerpc, but not tile or x86) become unnecessary?
>>
>> # include <dl-vdso.h>
>> # undef __gettimeofday
>> # undef __clock_gettime
>> # undef __clock_getres
>> # include <libc-vdso.h>
>>
>>
>> Otherwise looks fine to me.
>>
>
> Indeed the #undef's are not really required any more and in my testing builds
> aarch64, s390 and powerpc all built fine without. I will remove them.
>
> Any more concerns about it? I would like to install it.
>
Pushed as 97554e4382e5d85eccf146b58f85aaad7e3d687c