Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

timekeeping: remove arch_gettimeoffset

With Arm EBSA110 gone, nothing uses it any more, so the corresponding
code and the Kconfig option can be removed.

Acked-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+2 -92
-33
Documentation/features/time/modern-timekeeping/arch-support.txt
··· 1 - # 2 - # Feature name: modern-timekeeping 3 - # Kconfig: !ARCH_USES_GETTIMEOFFSET 4 - # description: arch does not use arch_gettimeoffset() anymore 5 - # 6 - ----------------------- 7 - | arch |status| 8 - ----------------------- 9 - | alpha: | ok | 10 - | arc: | ok | 11 - | arm: | TODO | 12 - | arm64: | ok | 13 - | c6x: | ok | 14 - | csky: | ok | 15 - | h8300: | ok | 16 - | hexagon: | ok | 17 - | ia64: | ok | 18 - | m68k: | ok | 19 - | microblaze: | ok | 20 - | mips: | ok | 21 - | nds32: | ok | 22 - | nios2: | ok | 23 - | openrisc: | ok | 24 - | parisc: | ok | 25 - | powerpc: | ok | 26 - | riscv: | ok | 27 - | s390: | ok | 28 - | sh: | ok | 29 - | sparc: | ok | 30 - | um: | ok | 31 - | x86: | ok | 32 - | xtensa: | ok | 33 - -----------------------
-2
drivers/Makefile
··· 135 135 obj-y += firmware/ 136 136 obj-$(CONFIG_CRYPTO) += crypto/ 137 137 obj-$(CONFIG_SUPERH) += sh/ 138 - ifndef CONFIG_ARCH_USES_GETTIMEOFFSET 139 138 obj-y += clocksource/ 140 - endif 141 139 obj-$(CONFIG_DCA) += dca/ 142 140 obj-$(CONFIG_HID) += hid/ 143 141 obj-$(CONFIG_PPC_PS3) += ps3/
+1 -1
drivers/clocksource/Kconfig
··· 563 563 564 564 config CLKSRC_VERSATILE 565 565 bool "ARM Versatile (Express) reference platforms clock source" if COMPILE_TEST 566 - depends on GENERIC_SCHED_CLOCK && !ARCH_USES_GETTIMEOFFSET 566 + depends on GENERIC_SCHED_CLOCK 567 567 select TIMER_OF 568 568 default y if (ARCH_VEXPRESS || ARCH_VERSATILE) && ARM 569 569 help
-13
include/linux/time.h
··· 21 21 const unsigned int day, const unsigned int hour, 22 22 const unsigned int min, const unsigned int sec); 23 23 24 - /* Some architectures do not supply their own clocksource. 25 - * This is mainly the case in architectures that get their 26 - * inter-tick times by reading the counter on their interval 27 - * timer. Since these timers wrap every tick, they're not really 28 - * useful as clocksources. Wrapping them to act like one is possible 29 - * but not very efficient. So we provide a callout these arches 30 - * can implement for use with the jiffies clocksource to provide 31 - * finer then tick granular time. 32 - */ 33 - #ifdef CONFIG_ARCH_USES_GETTIMEOFFSET 34 - extern u32 (*arch_gettimeoffset)(void); 35 - #endif 36 - 37 24 #ifdef CONFIG_POSIX_TIMERS 38 25 extern void clear_itimer(void); 39 26 #else
-9
kernel/time/Kconfig
··· 26 26 config GENERIC_TIME_VSYSCALL 27 27 bool 28 28 29 - # Old style timekeeping 30 - config ARCH_USES_GETTIMEOFFSET 31 - bool 32 - 33 29 # The generic clock events infrastructure 34 30 config GENERIC_CLOCKEVENTS 35 31 bool ··· 68 72 69 73 config NO_HZ_COMMON 70 74 bool 71 - depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS 72 75 select TICK_ONESHOT 73 76 74 77 choice ··· 82 87 83 88 config NO_HZ_IDLE 84 89 bool "Idle dynticks system (tickless idle)" 85 - depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS 86 90 select NO_HZ_COMMON 87 91 help 88 92 This option enables a tickless idle system: timer interrupts ··· 93 99 config NO_HZ_FULL 94 100 bool "Full dynticks system (tickless)" 95 101 # NO_HZ_COMMON dependency 96 - depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS 97 102 # We need at least one periodic CPU for timekeeping 98 103 depends on SMP 99 104 depends on HAVE_CONTEXT_TRACKING ··· 151 158 152 159 config NO_HZ 153 160 bool "Old Idle dynticks config" 154 - depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS 155 161 help 156 162 This is the old config entry that enables dynticks idle. 157 163 We keep it around for a little while to enforce backward ··· 158 166 159 167 config HIGH_RES_TIMERS 160 168 bool "High Resolution Timer Support" 161 - depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS 162 169 select TICK_ONESHOT 163 170 help 164 171 This option enables high resolution timer support. If your
-8
kernel/time/clocksource.c
··· 705 705 &cs->max_cycles); 706 706 } 707 707 708 - #ifndef CONFIG_ARCH_USES_GETTIMEOFFSET 709 - 710 708 static struct clocksource *clocksource_find_best(bool oneshot, bool skipcur) 711 709 { 712 710 struct clocksource *cs; ··· 795 797 { 796 798 __clocksource_select(true); 797 799 } 798 - 799 - #else /* !CONFIG_ARCH_USES_GETTIMEOFFSET */ 800 - static inline void clocksource_select(void) { } 801 - static inline void clocksource_select_fallback(void) { } 802 - 803 - #endif 804 800 805 801 /* 806 802 * clocksource_done_booting - Called near the end of core bootup
+1 -24
kernel/time/timekeeping.c
··· 369 369 370 370 /* Timekeeper helper functions. */ 371 371 372 - #ifdef CONFIG_ARCH_USES_GETTIMEOFFSET 373 - static u32 default_arch_gettimeoffset(void) { return 0; } 374 - u32 (*arch_gettimeoffset)(void) = default_arch_gettimeoffset; 375 - #else 376 - static inline u32 arch_gettimeoffset(void) { return 0; } 377 - #endif 378 - 379 372 static inline u64 timekeeping_delta_to_ns(const struct tk_read_base *tkr, u64 delta) 380 373 { 381 374 u64 nsec; ··· 376 383 nsec = delta * tkr->mult + tkr->xtime_nsec; 377 384 nsec >>= tkr->shift; 378 385 379 - /* If arch requires, add in get_arch_timeoffset() */ 380 - return nsec + arch_gettimeoffset(); 386 + return nsec; 381 387 } 382 388 383 389 static inline u64 timekeeping_get_ns(const struct tk_read_base *tkr) ··· 770 778 tk->tkr_raw.cycle_last = cycle_now; 771 779 772 780 tk->tkr_mono.xtime_nsec += delta * tk->tkr_mono.mult; 773 - 774 - /* If arch requires, add in get_arch_timeoffset() */ 775 - tk->tkr_mono.xtime_nsec += (u64)arch_gettimeoffset() << tk->tkr_mono.shift; 776 - 777 - 778 781 tk->tkr_raw.xtime_nsec += delta * tk->tkr_raw.mult; 779 - 780 - /* If arch requires, add in get_arch_timeoffset() */ 781 - tk->tkr_raw.xtime_nsec += (u64)arch_gettimeoffset() << tk->tkr_raw.shift; 782 782 783 783 tk_normalize_xtime(tk); 784 784 } ··· 2117 2133 if (unlikely(timekeeping_suspended)) 2118 2134 goto out; 2119 2135 2120 - #ifdef CONFIG_ARCH_USES_GETTIMEOFFSET 2121 - offset = real_tk->cycle_interval; 2122 - 2123 - if (mode != TK_ADV_TICK) 2124 - goto out; 2125 - #else 2126 2136 offset = clocksource_delta(tk_clock_read(&tk->tkr_mono), 2127 2137 tk->tkr_mono.cycle_last, tk->tkr_mono.mask); 2128 2138 2129 2139 /* Check if there's really nothing to do */ 2130 2140 if (offset < real_tk->cycle_interval && mode == TK_ADV_TICK) 2131 2141 goto out; 2132 - #endif 2133 2142 2134 2143 /* Do some additional sanity checking */ 2135 2144 timekeeping_check_update(tk, offset);
-2
kernel/trace/Kconfig
··· 253 253 bool "Interrupts-off Latency Tracer" 254 254 default n 255 255 depends on TRACE_IRQFLAGS_SUPPORT 256 - depends on !ARCH_USES_GETTIMEOFFSET 257 256 select TRACE_IRQFLAGS 258 257 select GENERIC_TRACER 259 258 select TRACER_MAX_TRACE ··· 276 277 config PREEMPT_TRACER 277 278 bool "Preemption-off Latency Tracer" 278 279 default n 279 - depends on !ARCH_USES_GETTIMEOFFSET 280 280 depends on PREEMPTION 281 281 select GENERIC_TRACER 282 282 select TRACER_MAX_TRACE