timekeeping: Remove CONFIG_GENERIC_TIME_VSYSCALL_OLD

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!)

[jstultz: Commit message rework]

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Stephen Boyd <stephen.boyd@linaro.org>
Link: https://lkml.kernel.org/r/1510613491-16695-1-git-send-email-john.stultz@linaro.org

authored by Miroslav Lichvar and committed by Thomas Gleixner aea3706c 558de282

-56
-7
include/linux/timekeeper_internal.h
··· 136 136 extern void update_vsyscall(struct timekeeper *tk); 137 137 extern void update_vsyscall_tz(void); 138 138 139 - #elif defined(CONFIG_GENERIC_TIME_VSYSCALL_OLD) 140 - 141 - extern void update_vsyscall_old(struct timespec *ts, struct timespec *wtm, 142 - struct clocksource *c, u32 mult, 143 - u64 cycle_last); 144 - extern void update_vsyscall_tz(void); 145 - 146 139 #else 147 140 148 141 static inline void update_vsyscall(struct timekeeper *tk)
-4
kernel/time/Kconfig
··· 21 21 config GENERIC_TIME_VSYSCALL 22 22 bool 23 23 24 - # Timekeeping vsyscall support 25 - config GENERIC_TIME_VSYSCALL_OLD 26 - bool 27 - 28 24 # Old style timekeeping 29 25 config ARCH_USES_GETTIMEOFFSET 30 26 bool
-45
kernel/time/timekeeping.c
··· 557 557 update_fast_timekeeper(&tkr_dummy, &tk_fast_raw); 558 558 } 559 559 560 - #ifdef CONFIG_GENERIC_TIME_VSYSCALL_OLD 561 - #warning Please contact your maintainers, as GENERIC_TIME_VSYSCALL_OLD compatibity will disappear soon. 562 - 563 - static inline void update_vsyscall(struct timekeeper *tk) 564 - { 565 - struct timespec xt, wm; 566 - 567 - xt = timespec64_to_timespec(tk_xtime(tk)); 568 - wm = timespec64_to_timespec(tk->wall_to_monotonic); 569 - update_vsyscall_old(&xt, &wm, tk->tkr_mono.clock, tk->tkr_mono.mult, 570 - tk->tkr_mono.cycle_last); 571 - } 572 - 573 - static inline void old_vsyscall_fixup(struct timekeeper *tk) 574 - { 575 - s64 remainder; 576 - 577 - /* 578 - * Store only full nanoseconds into xtime_nsec after rounding 579 - * it up and add the remainder to the error difference. 580 - * XXX - This is necessary to avoid small 1ns inconsistnecies caused 581 - * by truncating the remainder in vsyscalls. However, it causes 582 - * additional work to be done in timekeeping_adjust(). Once 583 - * the vsyscall implementations are converted to use xtime_nsec 584 - * (shifted nanoseconds), and CONFIG_GENERIC_TIME_VSYSCALL_OLD 585 - * users are removed, this can be killed. 586 - */ 587 - remainder = tk->tkr_mono.xtime_nsec & ((1ULL << tk->tkr_mono.shift) - 1); 588 - if (remainder != 0) { 589 - tk->tkr_mono.xtime_nsec -= remainder; 590 - tk->tkr_mono.xtime_nsec += 1ULL << tk->tkr_mono.shift; 591 - tk->ntp_error += remainder << tk->ntp_error_shift; 592 - tk->ntp_error -= (1ULL << tk->tkr_mono.shift) << tk->ntp_error_shift; 593 - } 594 - } 595 - #else 596 - #define old_vsyscall_fixup(tk) 597 - #endif 598 - 599 560 static RAW_NOTIFIER_HEAD(pvclock_gtod_chain); 600 561 601 562 static void update_pvclock_gtod(struct timekeeper *tk, bool was_set) ··· 2123 2162 2124 2163 /* correct the clock when NTP error is too big */ 2125 2164 timekeeping_adjust(tk, offset); 2126 - 2127 - /* 2128 - * XXX This can be killed once everyone converts 2129 - * to the new update_vsyscall. 2130 - */ 2131 - old_vsyscall_fixup(tk); 2132 2165 2133 2166 /* 2134 2167 * Finally, make sure that after the rounding