From patchwork Mon Sep 17 22:04:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 11477 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id B1FA923E53 for ; Mon, 17 Sep 2012 22:05:59 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 0820E3D08FEB for ; Mon, 17 Sep 2012 22:05:58 +0000 (UTC) Received: by iafj25 with SMTP id j25so5441249iaf.11 for ; Mon, 17 Sep 2012 15:05:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references:x-cbid :x-gm-message-state; bh=Encwdeg/sKaSOCcxW8h+5321P6TB/soLHYEwb3aPLA8=; b=JGL5ixO1gl1qjy/Gqqwe6mfLqt+aNFURHRd8uwabZsbBxxFW1PxCJMmAOGKMhpel0Y cm5JWqRJ98foMkyGPD41TF1H8Cg0zRea3mMFQwboCqME0oTtP6/t0oOBZlWD7mnJamaf CFwGyKXo7XT6Mi0pjbFqN5tAu7cnC++QHk0Of+xSjE38OnPKiVK5rAMn5s2WQKQVHHzp GjDff5uQWBPU62CQAFPq9ifBpXInPenvnV53pHDrd4Z+p8/Va6Sdr2I+BxJprwplm9md 4G2s5/91Jx4VqPDozPTPHCzl0V4PFLRaZGGgKzVmky9va0kLv0Ws+Ad9i3l06Iapm0qO azyQ== Received: by 10.50.89.164 with SMTP id bp4mr8471719igb.28.1347919558085; Mon, 17 Sep 2012 15:05:58 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp341539igc; Mon, 17 Sep 2012 15:05:57 -0700 (PDT) Received: by 10.50.41.164 with SMTP id g4mr8286372igl.71.1347919557503; Mon, 17 Sep 2012 15:05:57 -0700 (PDT) Received: from e1.ny.us.ibm.com (e1.ny.us.ibm.com. [32.97.182.141]) by mx.google.com with ESMTPS id mc6si12204286igc.45.2012.09.17.15.05.56 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 17 Sep 2012 15:05:57 -0700 (PDT) Received-SPF: neutral (google.com: 32.97.182.141 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=32.97.182.141; Authentication-Results: mx.google.com; spf=neutral (google.com: 32.97.182.141 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) smtp.mail=john.stultz@linaro.org Received: from /spool/local by e1.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 17 Sep 2012 18:05:55 -0400 Received: from d01relay02.pok.ibm.com (9.56.227.234) by e1.ny.us.ibm.com (192.168.1.101) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 17 Sep 2012 18:05:18 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q8HM5H63146742; Mon, 17 Sep 2012 18:05:17 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q8HM5F6p014642; Mon, 17 Sep 2012 19:05:17 -0300 Received: from kernel-pok.stglabs.ibm.com (kernel.stglabs.ibm.com [9.114.214.19]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q8HM5DvG014521; Mon, 17 Sep 2012 19:05:15 -0300 From: John Stultz To: linux-kernel Cc: John Stultz , Tony Luck , Paul Mackerras , Benjamin Herrenschmidt , Andy Lutomirski , Martin Schwidefsky , Paul Turner , Steven Rostedt , Richard Cochran , Prarit Bhargava , Thomas Gleixner Subject: [PATCH 3/6][RFC] time: Convert CONFIG_GENERIC_TIME_VSYSCALL to CONFIG_GENERIC_TIME_VSYSCALL_OLD Date: Mon, 17 Sep 2012 18:04:58 -0400 Message-Id: <1347919501-64534-4-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1347919501-64534-1-git-send-email-john.stultz@linaro.org> References: <1347919501-64534-1-git-send-email-john.stultz@linaro.org> x-cbid: 12091722-6078-0000-0000-00000FB0FCEA X-Gm-Message-State: ALoCoQmYk8jr4Cmd4ABMiIyRaVdiF3if75MoLFzQOlGN87rCbzzGlYkwfr7POjzQP6QdAUSRwhbU To help migrate archtectures over to the new update_vsyscall method, redfine CONFIG_GENERIC_TIME_VSYSCALL as CONFIG_GENERIC_TIME_VSYSCALL_OLD Cc: Tony Luck Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Andy Lutomirski Cc: Martin Schwidefsky Cc: Paul Turner Cc: Steven Rostedt Cc: Richard Cochran Cc: Prarit Bhargava Cc: Thomas Gleixner Signed-off-by: John Stultz --- arch/ia64/Kconfig | 2 +- arch/ia64/kernel/time.c | 2 +- arch/powerpc/Kconfig | 2 +- arch/powerpc/kernel/time.c | 2 +- arch/s390/Kconfig | 2 +- arch/s390/kernel/time.c | 2 +- arch/x86/Kconfig | 2 +- arch/x86/kernel/vsyscall_64.c | 2 +- include/linux/timekeeper_internal.h | 7 ++++--- kernel/time/Kconfig | 2 +- kernel/time/timekeeping.c | 2 +- 11 files changed, 14 insertions(+), 13 deletions(-) diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 310cf57..f9e673c 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -38,7 +38,7 @@ config IA64 select ARCH_TASK_STRUCT_ALLOCATOR select ARCH_THREAD_INFO_ALLOCATOR select ARCH_CLOCKSOURCE_DATA - select GENERIC_TIME_VSYSCALL + select GENERIC_TIME_VSYSCALL_OLD default y help The Itanium Processor Family is Intel's 64-bit successor to diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index acb688f..d2f4e26 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c @@ -454,7 +454,7 @@ void update_vsyscall_tz(void) { } -void update_vsyscall(struct timespec *wall, struct timespec *wtm, +void update_vsyscall_old(struct timespec *wall, struct timespec *wtm, struct clocksource *c, u32 mult) { write_seqcount_begin(&fsyscall_gtod_data.seq); diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 352f416..0881660 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -135,7 +135,7 @@ config PPC select ARCH_HAVE_NMI_SAFE_CMPXCHG select GENERIC_SMP_IDLE_THREAD select GENERIC_CMOS_UPDATE - select GENERIC_TIME_VSYSCALL + select GENERIC_TIME_VSYSCALL_OLD select GENERIC_CLOCKEVENTS select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 613a830d..c825809 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c @@ -712,7 +712,7 @@ static cycle_t timebase_read(struct clocksource *cs) return (cycle_t)get_tb(); } -void update_vsyscall(struct timespec *wall_time, struct timespec *wtm, +void update_vsyscall_old(struct timespec *wall_time, struct timespec *wtm, struct clocksource *clock, u32 mult) { u64 new_tb_to_xs, new_stamp_xsec; diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 107610e..ba488aa 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -121,7 +121,7 @@ config S390 select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE select ARCH_WANT_IPC_PARSE_VERSION select GENERIC_SMP_IDLE_THREAD - select GENERIC_TIME_VSYSCALL + select GENERIC_TIME_VSYSCALL_OLD select GENERIC_CLOCKEVENTS select KTIME_SCALAR if 32BIT select HAVE_ARCH_SECCOMP_FILTER diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index bfb62ad..c5430bf 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c @@ -219,7 +219,7 @@ struct clocksource * __init clocksource_default_clock(void) return &clocksource_tod; } -void update_vsyscall(struct timespec *wall_time, struct timespec *wtm, +void update_vsyscall_old(struct timespec *wall_time, struct timespec *wtm, struct clocksource *clock, u32 mult) { if (clock != &clocksource_tod) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 8ec3a1a..e3f3c1a 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -93,7 +93,7 @@ config X86 select GENERIC_CLOCKEVENTS select ARCH_CLOCKSOURCE_DATA if X86_64 select GENERIC_CLOCKEVENTS_BROADCAST if X86_64 || (X86_32 && X86_LOCAL_APIC) - select GENERIC_TIME_VSYSCALL if X86_64 + select GENERIC_TIME_VSYSCALL_OLD if X86_64 select KTIME_SCALAR if X86_32 select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c index 6ec8411..77dde29 100644 --- a/arch/x86/kernel/vsyscall_64.c +++ b/arch/x86/kernel/vsyscall_64.c @@ -82,7 +82,7 @@ void update_vsyscall_tz(void) vsyscall_gtod_data.sys_tz = sys_tz; } -void update_vsyscall(struct timespec *wall_time, struct timespec *wtm, +void update_vsyscall_old(struct timespec *wall_time, struct timespec *wtm, struct clocksource *clock, u32 mult) { struct timespec monotonic; diff --git a/include/linux/timekeeper_internal.h b/include/linux/timekeeper_internal.h index 9c1c2cf..a904d76 100644 --- a/include/linux/timekeeper_internal.h +++ b/include/linux/timekeeper_internal.h @@ -67,13 +67,14 @@ struct timekeeper { }; -#ifdef CONFIG_GENERIC_TIME_VSYSCALL +#ifdef CONFIG_GENERIC_TIME_VSYSCALL_OLD extern void -update_vsyscall(struct timespec *ts, struct timespec *wtm, +update_vsyscall_old(struct timespec *ts, struct timespec *wtm, struct clocksource *c, u32 mult); extern void update_vsyscall_tz(void); #else -static inline void update_vsyscall(struct timespec *ts, struct timespec *wtm, +static inline void +update_vsyscall_old(struct timespec *ts, struct timespec *wtm, struct clocksource *c, u32 mult) { } diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig index fd42bd4..489c861 100644 --- a/kernel/time/Kconfig +++ b/kernel/time/Kconfig @@ -13,7 +13,7 @@ config ARCH_CLOCKSOURCE_DATA bool # Timekeeping vsyscall support -config GENERIC_TIME_VSYSCALL +config GENERIC_TIME_VSYSCALL_OLD bool # ktime_t scalar 64bit nsec representation diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 61f5fba..bdce688 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -199,7 +199,7 @@ static void timekeeping_update(struct timekeeper *tk, bool clearntp) ntp_clear(); } xt = tk_xtime(tk); - update_vsyscall(&xt, &tk->wall_to_monotonic, tk->clock, tk->mult); + update_vsyscall_old(&xt, &tk->wall_to_monotonic, tk->clock, tk->mult); } /**