From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752655AbdKHOyT (ORCPT ); Wed, 8 Nov 2017 09:54:19 -0500 Received: from mail-ot0-f195.google.com ([74.125.82.195]:56930 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752491AbdKHOyR (ORCPT ); Wed, 8 Nov 2017 09:54:17 -0500 X-Google-Smtp-Source: ABhQp+TfZB0KQ48fwj11xcDuewtO3xI9VwuUJsJgH6dm685sOXkQ87LMlFK87QFDmk0vZ/VT6+w0wdiMrHh8xfZhqkM= MIME-Version: 1.0 In-Reply-To: <1510100559.2465.44.camel@codethink.co.uk> References: <20171107141029.3160278-1-arnd@arndb.de> <20171107141029.3160278-2-arnd@arndb.de> <1510100559.2465.44.camel@codethink.co.uk> From: Arnd Bergmann Date: Wed, 8 Nov 2017 15:54:15 +0100 X-Google-Sender-Auth: 7nzXrl6pASr4LyFpFYl9JzMCg8g Message-ID: Subject: Re: [Y2038] [PATCH 2/2] alpha: osf_sys.c: use timespec64 where appropriate To: Ben Hutchings Cc: Richard Henderson , y2038 Mailman List , Linux Kernel Mailing List , Ivan Kokshaysky , Alexander Viro , linux-alpha@vger.kernel.org, Matt Turner , Deepa Dinamani Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 8, 2017 at 1:22 AM, Ben Hutchings 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