From patchwork Mon Nov 13 22:51:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 118824 Delivered-To: patches@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2339366qgn; Mon, 13 Nov 2017 14:51:39 -0800 (PST) X-Received: by 10.99.110.196 with SMTP id j187mr10055202pgc.393.1510613499084; Mon, 13 Nov 2017 14:51:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510613499; cv=none; d=google.com; s=arc-20160816; b=KwOuweff/nAcy8VZZtpFfPCDb6M/nFicLKEoazUAlpOUttPRvZupFGpnqpfrLuhINh yE1s+6l2/OW4cN3lqVli2k/DqYSxOyZggzG7qviBzOn3pDsF3Y2Kb7slvdg4z9UvDUO9 JPkJ5gf7HJ/lgE96pxMEIYU9YH+R4k/iivhg5PzSCUjnk6yQzO5Ez/wmXTCxoXaX0nwZ zMtdB5u36A617gs6Sxqar8Hrc+Yl2Zl5R3dSg29JnyzdJnNyuC4ajh7ntYdgHUD5Y8Jp bY3Wvuud298emMmUvV+29D4CBEYmBMPr/iFImZdU6jKSzGmYhjeiKSNXYGcfacpXEHX6 XxHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=tilBqB4e0pMoCjIOvrd7Bu+gEa4fFiLZNLiuspPfbQ8=; b=WSpOY76dvEUhBA4qR0IyPfmJxZVeGjR5wZ2LvWeN7sGvKbKe9d+HtJVrZ5gWv9iVHR XwUn8OBiOKJBUHleEXsd6XEajKP9p7kYcBEA3LNsbqJZVKdqGrzpvIr+yywl2n60KEM2 rR3uxjGonQfD7eOYqntMQ43TEZrFVJLPdRxFFKZmR8KTgFv35jJI+RCJXjiNzc81g3Ks CtQvGZtuauhW2JVC0CB8ZyLsZqQMGvszvJOEP6nahL8TKPJ8PrpCf0twHXFFaqrwpjkC O0vCFNkTKF6YTRveEbNcvNcQhRtbEKAB7zGfcSj9iUtW4bPEdBTz7XyNTuvbFW/NgGWx QV/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T/lY3TJM; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id y68sor4021637pgy.54.2017.11.13.14.51.38 for (Google Transport Security); Mon, 13 Nov 2017 14:51:39 -0800 (PST) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T/lY3TJM; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=tilBqB4e0pMoCjIOvrd7Bu+gEa4fFiLZNLiuspPfbQ8=; b=T/lY3TJMgSBhkCiaX5PL6BAOd+pfgCYfixe6o+YRybe9bJrNUlWpOh5zFGVLdMeGFO y3qZE0cRg38b1RVs/YGMcOOf1PuBxwMpMxeTGe43r4Lka+qUch9mpxP9FDdeJ5Yz02Ph 00yLpXEvjgHMuIwKa28iv7ySIULuIn+zcdBd4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=tilBqB4e0pMoCjIOvrd7Bu+gEa4fFiLZNLiuspPfbQ8=; b=Vmlf90WEmDCblsfX4ltvQVtM0FawVdXNwKpIS02fKL2l6zUzgZOVqDc+eRgV6MANSC x0hwvxWUiAky8s8R2Wg4jwvS/qvMHXMDc2SS6Egrwk7xFo3atcf7TlE8OoCroH3JzGFm KIaFsIfoUOiPouisRJMj2QOvjuwTkpC1UlRQYy+kglhUh40VChqW/bq43E5nDE1lPcpt UEZSIRSYTIk/xfEAKEJ1bbKXqtlRTkdjg+bnjvK6NtcsKRgkbt58NWyJPePG/Xf0hweV fbMzNNKUh6/let45yU1grEbsBvgnXdZ4hmRCe7gDIgCHVoqHHC8NR+3LGkv+5daugsld M7mg== X-Gm-Message-State: AJaThX5W8W/ERpptfTHWT0lUVMwuEYd/RN8yOtSeK1sZk5KhVtHKwfZA ei6CsxP2SxwRe46oCv3m4TlMyC6x X-Google-Smtp-Source: AGs4zMb9e2cqSj9YhSQuRpQpGokCrTgkiTTuhVe51iQCG3La6A/MzMOatHKA+WzLldw68S6t79LpTg== X-Received: by 10.99.154.66 with SMTP id e2mr9835067pgo.287.1510613498564; Mon, 13 Nov 2017 14:51:38 -0800 (PST) Return-Path: Received: from localhost.localdomain ([2601:1c2:1002:83f0:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id r67sm29945626pfj.59.2017.11.13.14.51.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Nov 2017 14:51:37 -0800 (PST) From: John Stultz To: lkml Cc: Miroslav Lichvar , Thomas Gleixner , Ingo Molnar , Richard Cochran , Prarit Bhargava , Stephen Boyd , Tony Luck , John Stultz Subject: [PATCH] timekeeping: Remove CONFIG_GENERIC_TIME_VSYSCALL_OLD Date: Mon, 13 Nov 2017 14:51:31 -0800 Message-Id: <1510613491-16695-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 From: Miroslav Lichvar As of d4d1fc61eb38f (ia64: Update fsyscall gettime to use modern vsyscall_update)the last user of CONFIG_GENERIC_TIME_VSYSCALL_OLD have been updated, the legacy support for old-style vsyscall implementations can be removed from the timekeeping code. (Thanks again to Tony Luck for helping remove the last user!) Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Miroslav Lichvar Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Tony Luck Signed-off-by: Miroslav Lichvar [jstultz: Commit message rework] Signed-off-by: John Stultz --- include/linux/timekeeper_internal.h | 7 ------ kernel/time/Kconfig | 4 ---- kernel/time/timekeeping.c | 45 ------------------------------------- 3 files changed, 56 deletions(-) -- 2.7.4 diff --git a/include/linux/timekeeper_internal.h b/include/linux/timekeeper_internal.h index 97154c6..eb09d3d9 100644 --- a/include/linux/timekeeper_internal.h +++ b/include/linux/timekeeper_internal.h @@ -132,13 +132,6 @@ struct timekeeper { extern void update_vsyscall(struct timekeeper *tk); extern void update_vsyscall_tz(void); -#elif defined(CONFIG_GENERIC_TIME_VSYSCALL_OLD) - -extern void update_vsyscall_old(struct timespec *ts, struct timespec *wtm, - struct clocksource *c, u32 mult, - u64 cycle_last); -extern void update_vsyscall_tz(void); - #else static inline void update_vsyscall(struct timekeeper *tk) diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig index ac09bc2..589018f 100644 --- a/kernel/time/Kconfig +++ b/kernel/time/Kconfig @@ -21,10 +21,6 @@ config CLOCKSOURCE_VALIDATE_LAST_CYCLE config GENERIC_TIME_VSYSCALL bool -# Timekeeping vsyscall support -config GENERIC_TIME_VSYSCALL_OLD - bool - # Old style timekeeping config ARCH_USES_GETTIMEOFFSET bool diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 2cafb49..0e97ac7 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -515,45 +515,6 @@ static void halt_fast_timekeeper(struct timekeeper *tk) update_fast_timekeeper(&tkr_dummy, &tk_fast_raw); } -#ifdef CONFIG_GENERIC_TIME_VSYSCALL_OLD -#warning Please contact your maintainers, as GENERIC_TIME_VSYSCALL_OLD compatibity will disappear soon. - -static inline void update_vsyscall(struct timekeeper *tk) -{ - struct timespec xt, wm; - - xt = timespec64_to_timespec(tk_xtime(tk)); - wm = timespec64_to_timespec(tk->wall_to_monotonic); - update_vsyscall_old(&xt, &wm, tk->tkr_mono.clock, tk->tkr_mono.mult, - tk->tkr_mono.cycle_last); -} - -static inline void old_vsyscall_fixup(struct timekeeper *tk) -{ - s64 remainder; - - /* - * Store only full nanoseconds into xtime_nsec after rounding - * it up and add the remainder to the error difference. - * XXX - This is necessary to avoid small 1ns inconsistnecies caused - * by truncating the remainder in vsyscalls. However, it causes - * additional work to be done in timekeeping_adjust(). Once - * the vsyscall implementations are converted to use xtime_nsec - * (shifted nanoseconds), and CONFIG_GENERIC_TIME_VSYSCALL_OLD - * users are removed, this can be killed. - */ - remainder = tk->tkr_mono.xtime_nsec & ((1ULL << tk->tkr_mono.shift) - 1); - if (remainder != 0) { - tk->tkr_mono.xtime_nsec -= remainder; - tk->tkr_mono.xtime_nsec += 1ULL << tk->tkr_mono.shift; - tk->ntp_error += remainder << tk->ntp_error_shift; - tk->ntp_error -= (1ULL << tk->tkr_mono.shift) << tk->ntp_error_shift; - } -} -#else -#define old_vsyscall_fixup(tk) -#endif - static RAW_NOTIFIER_HEAD(pvclock_gtod_chain); static void update_pvclock_gtod(struct timekeeper *tk, bool was_set) @@ -2090,12 +2051,6 @@ void update_wall_time(void) timekeeping_adjust(tk, offset); /* - * XXX This can be killed once everyone converts - * to the new update_vsyscall. - */ - old_vsyscall_fixup(tk); - - /* * Finally, make sure that after the rounding * xtime_nsec isn't larger than NSEC_PER_SEC */