From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753151AbbCKD2v (ORCPT ); Tue, 10 Mar 2015 23:28:51 -0400 Received: from m15-112.126.com ([220.181.15.112]:43307 "EHLO m15-112.126.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752036AbbCKD1s (ORCPT ); Tue, 10 Mar 2015 23:27:48 -0400 From: Xunlei Pang To: linux-kernel@vger.kernel.org Cc: rtc-linux@googlegroups.com, Thomas Gleixner , Alessandro Zummo , John Stultz , Arnd Bergmann , linux-omap@vger.kernel.org, Tony Lindgren , linux-tegra@vger.kernel.org, Stephen Warren , linux390@de.ibm.com, Martin Schwidefsky , Ralf Baechle , Arnd Bergmann , Xunlei Pang Subject: [PATCH 7/8] s390: time: Provide read_boot_clock64() and read_persistent_clock64() Date: Wed, 11 Mar 2015 11:24:36 +0800 Message-Id: <1426044277-22170-3-git-send-email-xlpang@126.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1426044277-22170-1-git-send-email-xlpang@126.com> References: <1426044277-22170-1-git-send-email-xlpang@126.com> X-CM-TRANSID: DMmowEBpY1t7tf9UtpRwAw--.964S4 X-Coremail-Antispam: 1Uf129KBjvJXoWxur45KF4furW7Gw1fWFW3ZFb_yoW5WFy3pF Wjy3Z8GrWUGa4DZryayws3ur1jkayDKFsrWayku3yrAryIqF1UXrW8Aa4IvrWYyFWku3yF ka4FqrnrX3WDXaUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jJwIDUUUUU= X-Originating-IP: [210.21.223.3] X-CM-SenderInfo: p0ost0bj6rjloofrz/1tbimga5v1GfVZNGwgAAsW Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xunlei Pang As part of addressing "y2038 problem" for in-kernel uses, this patch converts read_boot_clock() to read_boot_clock64() and read_persistent_clock() to read_persistent_clock64() using timespec64. Since S390 is a 64bit architecture, also rename some timespec to timespec64 in time.c and the related references. Signed-off-by: Xunlei Pang --- arch/s390/include/asm/timex.h | 4 ++-- arch/s390/kernel/debug.c | 4 ++-- arch/s390/kernel/time.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/s390/include/asm/timex.h b/arch/s390/include/asm/timex.h index 98eb2a5..8b08be3 100644 --- a/arch/s390/include/asm/timex.h +++ b/arch/s390/include/asm/timex.h @@ -108,10 +108,10 @@ int get_sync_clock(unsigned long long *clock); void init_cpu_timer(void); unsigned long long monotonic_clock(void); -void tod_to_timeval(__u64, struct timespec *); +void tod_to_timeval(__u64, struct timespec64 *); static inline -void stck_to_timespec(unsigned long long stck, struct timespec *ts) +void stck_to_timespec64(unsigned long long stck, struct timespec64 *ts) { tod_to_timeval(stck - TOD_UNIX_EPOCH, ts); } diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index c1f21ac..20ff016 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c @@ -1457,14 +1457,14 @@ int debug_dflt_header_fn(debug_info_t * id, struct debug_view *view, int area, debug_entry_t * entry, char *out_buf) { - struct timespec time_spec; + struct timespec64 time_spec; char *except_str; unsigned long caller; int rc = 0; unsigned int level; level = entry->id.fields.level; - stck_to_timespec(entry->id.stck, &time_spec); + stck_to_timespec64(entry->id.stck, &time_spec); if (entry->id.fields.exception) except_str = "*"; diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 20660dd..e4df144 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c @@ -76,7 +76,7 @@ unsigned long long monotonic_clock(void) } EXPORT_SYMBOL(monotonic_clock); -void tod_to_timeval(__u64 todval, struct timespec *xt) +void tod_to_timeval(__u64 todval, struct timespec64 *xt) { unsigned long long sec; @@ -181,12 +181,12 @@ static void timing_alert_interrupt(struct ext_code ext_code, static void etr_reset(void); static void stp_reset(void); -void read_persistent_clock(struct timespec *ts) +void read_persistent_clock64(struct timespec64 *ts) { tod_to_timeval(get_tod_clock() - TOD_UNIX_EPOCH, ts); } -void read_boot_clock(struct timespec *ts) +void read_boot_clock64(struct timespec64 *ts) { tod_to_timeval(sched_clock_base_cc - TOD_UNIX_EPOCH, ts); } -- 1.9.1