This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC PATCH] AARCH64/ILP32: introduce kernel time types
- From: Yury Norov <ynorov at caviumnetworks dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: <libc-alpha at sourceware dot org>, <arnd at arndb dot de>, <vapier at gentoo dot org>, <joseph at codesourcery dot com>, <cmetcalf at tilera dot com>, <pinskia at gmail dot com>, <cmetcalf at mellanox dot com>, <szabolcs dot nagy at arm dot com>, <bamvor dot zhangjian at huawei dot com>, <schwab at suse dot de>, <catalin dot marinas at arm dot com>, <Prasun dot Kapoor at cavium dot com>, <maxim dot kuvyrkov at linaro dot org>
- Date: Tue, 28 Jun 2016 11:56:49 +0300
- Subject: Re: [RFC PATCH] AARCH64/ILP32: introduce kernel time types
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp dot mailfrom=Yuri dot Norov at caviumnetworks dot com;
- References: <1467103498-24243-1-git-send-email-ynorov at caviumnetworks dot com> <d46c4d99-3269-b3d5-8183-b09c3b3d7073 at redhat dot com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Tue, Jun 28, 2016 at 10:51:49AM +0200, Florian Weimer wrote:
> On 06/28/2016 10:44 AM, Yury Norov wrote:
> >Structures utmp and utmpx are shared between ilp32 and native ABIs,
> >and so should have same layout. As now, architectures where this
> >compatibility is required enable __WORDSIZE_TIME64_COMPAT32 option,
> >and so make lp64 utmp{x} backward-compatible to ilp32 ones.
> >
> >AARCH64 doesn't require such compatibility, and so we can do opposite
> >conversion.
>
> Thanks, I agree this is the right way forward.
>
> >This patch introduces new option __KERNEL_TIME_T_MATCHES_TIME64_T,
>
> >+struct __kernel_timeval
> >+ {
> >+ __ktime_t tv_sec; /* Seconds. */
> >+ __ksuseconds_t tv_usec; /* Microseconds. */
> >+ };
>
> We rarely use the __KERNEL_ and __kernel_ prefixes, but the kernel uapi
> includes do. I would suggest to use a different prefix.
__kernel_time_t is already imported from linux headers. It is defined
wrong, at least for arm64, and is not used. I don't want to touch it,
as I am not sure other C libraries don't use it.
>
> Thanks,
> Florian