All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Ben Hutchings <ben.hutchings@codethink.co.uk>
Cc: Richard Henderson <rth@twiddle.net>,
	y2038 Mailman List <y2038@lists.linaro.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-alpha@vger.kernel.org, Matt Turner <mattst88@gmail.com>,
	Deepa Dinamani <deepa.kernel@gmail.com>
Subject: Re: [Y2038] [PATCH 2/2] alpha: osf_sys.c: use timespec64 where appropriate
Date: Wed, 8 Nov 2017 15:54:15 +0100	[thread overview]
Message-ID: <CAK8P3a1b-LBhvYPFKj7bQ4TT5dcfGvRChNizO4cNmtz1tW86xw@mail.gmail.com> (raw)
In-Reply-To: <1510100559.2465.44.camel@codethink.co.uk>

On Wed, Nov 8, 2017 at 1:22 AM, Ben Hutchings
<ben.hutchings@codethink.co.uk> wrote:
> On Tue, 2017-11-07 at 15:09 +0100, Arnd Bergmann wrote:
>> Some of the syscall helper functions (do_utimes, poll_select_set_timeout,
>> core_sys_select) have changed over the past year or two to use
>> 'timespec64' pointers rather than 'timespec'. This was fine on alpha,
>> since 64-bit architectures treat the two as the same type.
>>
>> However, I'd like to change that behavior and make 'timespec64' a proper
>> type of its own even on 64-bit architectures, and that will introduce
>> harmless type mismatch warnings here.
>>
>> Also, I'm trying to kill off the do_gettimeofday() helper in favor of
>> ktime_get() and related interfaces throughout the kernel.
> [...]
>> @@ -1004,9 +1013,10 @@ SYSCALL_DEFINE2(osf_gettimeofday, struct timeval32 __user *, tv,
>>               struct timezone __user *, tz)
>>  {
>>       if (tv) {
>> -             struct timeval ktv;
>> -             do_gettimeofday(&ktv);
>> -             if (put_tv32(tv, &ktv))
>> +             struct timespec64 kts;
>> +
>> +             ktime_get_ts64(&kts);
> [...]
>
> But this syscall is supposed to use the realtime clock, no?  It seems
> like the correct substitute here is getnstimeofday64() (as the kernel-
> doc comment for do_gettimeofday() *almost* says).

It should be ktime_get_real_ts64(), thanks for noticing my mistake.

ktime_get_real_ts64() is the same as getnstimeofday64(), but I'm
trying to use the ktime_get* naming where possible.

        Arnd

  reply	other threads:[~2017-11-08 14:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-07 14:09 [PATCH 1/2] alpha: osf_sys.c: fix put_tv32 regression Arnd Bergmann
2017-11-07 14:09 ` [PATCH 2/2] alpha: osf_sys.c: use timespec64 where appropriate Arnd Bergmann
2017-11-08  0:22   ` [Y2038] " Ben Hutchings
2017-11-08 14:54     ` Arnd Bergmann [this message]
2017-11-07 15:52 ` [PATCH 1/2] alpha: osf_sys.c: fix put_tv32 regression Al Viro
2017-11-07 16:03   ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK8P3a1b-LBhvYPFKj7bQ4TT5dcfGvRChNizO4cNmtz1tW86xw@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=ben.hutchings@codethink.co.uk \
    --cc=deepa.kernel@gmail.com \
    --cc=ink@jurassic.park.msu.ru \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=rth@twiddle.net \
    --cc=viro@zeniv.linux.org.uk \
    --cc=y2038@lists.linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.