aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/timekeeper_internal.h7
-rw-r--r--kernel/time/Kconfig4
-rw-r--r--kernel/time/timekeeping.c45
3 files changed, 0 insertions, 56 deletions
diff --git a/include/linux/timekeeper_internal.h b/include/linux/timekeeper_internal.h
index 7e9011101cb0..d315c3d6725c 100644
--- a/include/linux/timekeeper_internal.h
+++ b/include/linux/timekeeper_internal.h
@@ -136,13 +136,6 @@ struct timekeeper {
136extern void update_vsyscall(struct timekeeper *tk); 136extern void update_vsyscall(struct timekeeper *tk);
137extern void update_vsyscall_tz(void); 137extern void update_vsyscall_tz(void);
138 138
139#elif defined(CONFIG_GENERIC_TIME_VSYSCALL_OLD)
140
141extern void update_vsyscall_old(struct timespec *ts, struct timespec *wtm,
142 struct clocksource *c, u32 mult,
143 u64 cycle_last);
144extern void update_vsyscall_tz(void);
145
146#else 139#else
147 140
148static inline void update_vsyscall(struct timekeeper *tk) 141static inline void update_vsyscall(struct timekeeper *tk)
diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig
index d689a9557e17..e776fc8cc1df 100644
--- a/kernel/time/Kconfig
+++ b/kernel/time/Kconfig
@@ -21,10 +21,6 @@ config CLOCKSOURCE_VALIDATE_LAST_CYCLE
21config GENERIC_TIME_VSYSCALL 21config GENERIC_TIME_VSYSCALL
22 bool 22 bool
23 23
24# Timekeeping vsyscall support
25config GENERIC_TIME_VSYSCALL_OLD
26 bool
27
28# Old style timekeeping 24# Old style timekeeping
29config ARCH_USES_GETTIMEOFFSET 25config ARCH_USES_GETTIMEOFFSET
30 bool 26 bool
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 198afa78bf69..cd03317e7b57 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -557,45 +557,6 @@ static void halt_fast_timekeeper(struct timekeeper *tk)
557 update_fast_timekeeper(&tkr_dummy, &tk_fast_raw); 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
563static 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
573static 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
599static RAW_NOTIFIER_HEAD(pvclock_gtod_chain); 560static RAW_NOTIFIER_HEAD(pvclock_gtod_chain);
600 561
601static void update_pvclock_gtod(struct timekeeper *tk, bool was_set) 562static void update_pvclock_gtod(struct timekeeper *tk, bool was_set)
@@ -2164,12 +2125,6 @@ void update_wall_time(void)
2164 timekeeping_adjust(tk, offset); 2125 timekeeping_adjust(tk, offset);
2165 2126
2166 /* 2127 /*
2167 * XXX This can be killed once everyone converts
2168 * to the new update_vsyscall.
2169 */
2170 old_vsyscall_fixup(tk);
2171
2172 /*
2173 * Finally, make sure that after the rounding 2128 * Finally, make sure that after the rounding
2174 * xtime_nsec isn't larger than NSEC_PER_SEC 2129 * xtime_nsec isn't larger than NSEC_PER_SEC
2175 */ 2130 */