From patchwork Fri Jun 17 14:48:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102160 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp320075qgy; Fri, 17 Jun 2016 07:48:03 -0700 (PDT) X-Received: by 10.107.155.207 with SMTP id d198mr4348402ioe.62.1466174882987; Fri, 17 Jun 2016 07:48:02 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g70si12805509pfc.237.2016.06.17.07.48.02; Fri, 17 Jun 2016 07:48:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752767AbcFQOr7 (ORCPT + 30 others); Fri, 17 Jun 2016 10:47:59 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:49916 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161057AbcFQOr4 (ORCPT ); Fri, 17 Jun 2016 10:47:56 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0MOGBA-1bHERf3TmO-005cNn; Fri, 17 Jun 2016 16:47:35 +0200 From: Arnd Bergmann To: Tony Luck , Fenghua Yu Cc: y2038@lists.linaro.org, Arnd Bergmann , Matt Fleming , Ingo Molnar , Toshi Kani , Ard Biesheuvel , linux-efi@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ia64: efi: use timespec64 for persistent clock Date: Fri, 17 Jun 2016 16:48:17 +0200 Message-Id: <20160617144920.3511152-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:NKnk6SuB4SgHyuv/tq42maQ+CgXTxhazFwU/lt2WTtrHNdhweK6 /0ahbXHA9U+iEA7qFmfq9nZnLszYpVAdHgvb1NYsPbM18K2IbF9uQN2Cjsc2aCT+Ttucl14 EIKqSmaxCidQkSmpO8aJHspJdV/7bjC3N7b8zUsRfqL8TCa6i7gNzQZEHFalMB9R6DQQXs5 0My1o8jxBw6tLsLfRvIbw== X-UI-Out-Filterresults: notjunk:1; V01:K0:/qbAOFS5s8w=:w3KVSK3riwvYMyZ35KUID1 zKLH2SzVVrq/1WW5PsWMfkclMoYK0Va06IPn93eiutY87V/QyAR8ojBkIZ14xSi1+cutBzaI/ x3xhiXw/4sEQQ1UrHomZXB7Q7HysYy+lIER48s2pFNF+FqSZ2Qx+H4uSAFfmfwALvLQrXM+o4 YsGIZG0Lr0MR4mDjKrh2VThQMdh3xCO/Wx0AssttiOWBY05CCoRlZoxKkEE8LytVPDyY4Ed9o zQ60+yFEFa0069aphge9T4YQ5RTJszOh40H+5omWvofa5e8MtY30jCNXH4Ek+OZJXMtt3fi68 lcRZcDfkn2UM9xP1fmLGbkbpg+yDHbfRbcwBDCGNHduNNKPTpYY2bqd0bnjlCpK9pGS/qDHmb p7AzS6rI0O5NIUIfiNx1OZHLFsuTMnn9GZieVosQcGCPfsYm70wejN5P9UsvFUR9kvKJ2Qt4g BDhMtk1vD0BTi2y0MJWfOt4URtaUlmwDUfFQGTQeJgstFJ6c/LIAIP49BqixQBHM38kG39+hi s9OzCI1+l/84j9VWsISgti9IRDnXuy3Z1hYLSyZl23KCM0nzT5pwfBijLt8u1fEJtwuziORfv bm3TAMPDcd1/35SrKZBAaA9gekkPFy9mvRsLq1QhKFIaZhkHmMh6t3i14yV3scsbPktGzSfQQ gx5Z6KbqLMevut27DjYq8ESSfxon+iGPK42Z4j3rKb+yupQthKFVgG+EEkiN+Lm2/60EOvtTh dvJKIYSNoH0tqcI2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We have a generic read_persistent_clock64 interface now, and can change the ia64 implementation to provide that instead of read_persistent_clock. The main point of this is to avoid the use of struct timespec in the global efi.h, which would cause build errors as soon as we want to build a kernel without 'struct timespec' defined on 32-bit architectures. Aside from this, we get a little closer to removing the __weak read_persistent_clock() definition, which relies on converting all architectures to provide read_persistent_clock64 instead. Signed-off-by: Arnd Bergmann --- arch/ia64/kernel/efi.c | 4 ++-- arch/ia64/kernel/time.c | 2 +- include/linux/efi.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) -- 2.9.0 diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index 3b7a60e40e8a..121295637d0d 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c @@ -236,7 +236,7 @@ STUB_GET_NEXT_HIGH_MONO_COUNT(virt, id) STUB_RESET_SYSTEM(virt, id) void -efi_gettimeofday (struct timespec *ts) +efi_gettimeofday (struct timespec64 *ts) { efi_time_t tm; @@ -245,7 +245,7 @@ efi_gettimeofday (struct timespec *ts) return; } - ts->tv_sec = mktime(tm.year, tm.month, tm.day, + ts->tv_sec = mktime64(tm.year, tm.month, tm.day, tm.hour, tm.minute, tm.second); ts->tv_nsec = tm.nanosecond; } diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index c8dbe2acd735..6f892b94e906 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c @@ -355,7 +355,7 @@ static struct irqaction timer_irqaction = { .name = "timer" }; -void read_persistent_clock(struct timespec *ts) +void read_persistent_clock64(struct timespec64 *ts) { efi_gettimeofday(ts); } diff --git a/include/linux/efi.h b/include/linux/efi.h index 9a53a557acff..dca8810d6b49 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -937,7 +937,7 @@ extern void efi_init (void); extern void *efi_get_pal_addr (void); extern void efi_map_pal_code (void); extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg); -extern void efi_gettimeofday (struct timespec *ts); +extern void efi_gettimeofday (struct timespec64 *ts); extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if possible */ #ifdef CONFIG_X86 extern void efi_late_init(void);