History

timekeeping: default GENERIC_CLOCKEVENTS to enabled

Almost all machines use GENERIC_CLOCKEVENTS, so it feels wrong to require each one to select that symbol manually. Instead, enable it whenever CONFIG_LEGACY_TIMER_TICK is disabled as a simplification. It should be possible to select both GENERIC_CLOCKEVENTS and LEGACY_TIMER_TICK from an architecture now and decide at runtime between the two. For the clockevents arch-support.txt file, this means that additional architectures are marked as TODO when they have at least one machine that still uses LEGACY_TIMER_TICK, rather than being marked 'ok' when at least one machine has been converted. This means that both m68k and arm (for riscpc) revert to TODO. At this point, we could just always enable CONFIG_GENERIC_CLOCKEVENTS rather than leaving it off when not needed. I built an m68k defconfig kernel (using gcc-10.1.0) and found that this would add around 5.5KB in kernel image size: text data bss dec hex filename 3861936 1092236 196656 5150828 4e986c obj-m68k/vmlinux-no-clockevent 3866201 1093832 196184 5156217 4ead79 obj-m68k/vmlinux-clockevent On Arm (MACH_RPC), that difference appears to be twice as large, around 11KB on top of an 6MB vmlinux.

Arnd Bergmann committed 6 years ago

Commit 0774a6e1 parent 56cc7b825 files · +4 −38Browse files

Unified · Split

25 files
  1. Documentation/features/time/clockevents/arch-support.txt +3 −3
  2. arch/alpha/Kconfig +0 −1
  3. arch/arc/Kconfig +0 −1
  4. arch/arm/Kconfig +0 −12
  5. arch/arm64/Kconfig +0 −1
  6. arch/arm64/Kconfig.platforms +0 −1
  7. arch/c6x/Kconfig +0 −1
  8. arch/csky/Kconfig +0 −1
  9. arch/h8300/Kconfig +0 −1
  10. arch/hexagon/Kconfig +0 −1
  11. arch/m68k/Kconfig.cpu +0 −1
  12. arch/microblaze/Kconfig +0 −1
  13. arch/mips/Kconfig +0 −1
  14. arch/nds32/Kconfig +0 −1
  15. arch/nios2/Kconfig +0 −1
  16. arch/openrisc/Kconfig +0 −1
  17. arch/powerpc/Kconfig +0 −1
  18. arch/riscv/Kconfig +0 −1
  19. arch/s390/Kconfig +0 −1
  20. arch/sh/Kconfig +0 −1
  21. arch/sparc/Kconfig +0 −1
  22. arch/um/Kconfig +0 −1
  23. arch/x86/Kconfig +0 −1
  24. arch/xtensa/Kconfig +0 −1
  25. kernel/time/Kconfig +1 −1
Documentation/features/time/clockevents/arch-support.txt+3−3
@@ -1,6 +1,6 @@
11 #
22 # Feature name: clockevents
3−# Kconfig: GENERIC_CLOCKEVENTS
3+# Kconfig: !LEGACY_TIMER_TICK
44 # description: arch support generic clock events
55 #
66 -----------------------
@@ -8,14 +8,14 @@ · 1 unmodified line
88 -----------------------
99 | alpha: | ok |
1010 | arc: | ok |
11− | arm: | ok |
11+ | arm: | TODO |
1212 | arm64: | ok |
1313 | c6x: | ok |
1414 | csky: | ok |
1515 | h8300: | ok |
1616 | hexagon: | ok |
1717 | ia64: | TODO |
18− | m68k: | ok |
18+ | m68k: | TODO |
1919 | microblaze: | ok |
2020 | mips: | ok |
2121 | nds32: | ok |
arch/alpha/Kconfig+0−1
@@ -27,7 +27,6 @@ config ALPHA · 26 unmodified lines
2727 select ARCH_WANT_IPC_PARSE_VERSION
2828 select ARCH_HAVE_NMI_SAFE_CMPXCHG
2929 select AUDIT_ARCH
30− select GENERIC_CLOCKEVENTS
3130 select GENERIC_CPU_VULNERABILITIES
3231 select GENERIC_SMP_IDLE_THREAD
3332 select GENERIC_STRNCPY_FROM_USER
arch/arc/Kconfig+0−1
@@ -19,7 +19,6 @@ config ARC · 18 unmodified lines
1919 select COMMON_CLK
2020 select DMA_DIRECT_REMAP
2121 select GENERIC_ATOMIC64 if !ISA_ARCV2 || !(ARC_HAS_LL64 && ARC_HAS_LLSC)
22− select GENERIC_CLOCKEVENTS
2322 select GENERIC_FIND_FIRST_BIT
2423 # for now, we don't need GENERIC_IRQ_PROBE, CONFIG_GENERIC_IRQ_CHIP
2524 select GENERIC_IRQ_SHOW
arch/arm/Kconfig+0−12
@@ -321,7 +321,6 @@ config ARCH_MULTIPLATFORM · 320 unmodified lines
321321 select AUTO_ZRELADDR
322322 select TIMER_OF
323323 select COMMON_CLK
324− select GENERIC_CLOCKEVENTS
325324 select GENERIC_IRQ_MULTI_HANDLER
326325 select HAVE_PCI
327326 select PCI_DOMAINS_GENERIC if PCI
@@ -336,7 +335,6 @@ config ARM_SINGLE_ARMV7M · 8 unmodified lines
336335 select TIMER_OF
337336 select COMMON_CLK
338337 select CPU_V7M
339− select GENERIC_CLOCKEVENTS
340338 select NO_IOPORT_MAP
341339 select SPARSE_IRQ
342340 select USE_OF
@@ -351,7 +349,6 @@ config ARCH_EP93XX · 8 unmodified lines
351349 select CLKDEV_LOOKUP
352350 select CLKSRC_MMIO
353351 select CPU_ARM920T
354− select GENERIC_CLOCKEVENTS
355352 select GPIOLIB
356353 select HAVE_LEGACY_CLK
357354 help
@@ -361,7 +358,6 @@ config ARCH_FOOTBRIDGE · 3 unmodified lines
361358 bool "FootBridge"
362359 select CPU_SA110
363360 select FOOTBRIDGE
364− select GENERIC_CLOCKEVENTS
365361 select HAVE_IDE
366362 select NEED_MACH_IO_H if !MMU
367363 select NEED_MACH_MEMORY_H
@@ -389,7 +385,6 @@ config ARCH_IXP4XX · 21 unmodified lines
389385 select ARCH_SUPPORTS_BIG_ENDIAN
390386 select CPU_XSCALE
391387 select DMABOUNCE if PCI
392− select GENERIC_CLOCKEVENTS
393388 select GENERIC_IRQ_MULTI_HANDLER
394389 select GPIO_IXP4XX
395390 select GPIOLIB
@@ -405,7 +400,6 @@ config ARCH_IXP4XX · 9 unmodified lines
405400 config ARCH_DOVE
406401 bool "Marvell Dove"
407402 select CPU_PJ4
408− select GENERIC_CLOCKEVENTS
409403 select GENERIC_IRQ_MULTI_HANDLER
410404 select GPIOLIB
411405 select HAVE_PCI
@@ -429,7 +423,6 @@ config ARCH_PXA · 17 unmodified lines
429423 select CLKSRC_MMIO
430424 select TIMER_OF
431425 select CPU_XSCALE if !CPU_XSC3
432− select GENERIC_CLOCKEVENTS
433426 select GENERIC_IRQ_MULTI_HANDLER
434427 select GPIO_PXA
435428 select GPIOLIB
@@ -470,7 +463,6 @@ config ARCH_SA1100 · 34 unmodified lines
470463 select COMMON_CLK
471464 select CPU_FREQ
472465 select CPU_SA1100
473− select GENERIC_CLOCKEVENTS
474466 select GENERIC_IRQ_MULTI_HANDLER
475467 select GPIOLIB
476468 select HAVE_IDE
@@ -485,7 +477,6 @@ config ARCH_S3C24XX · 8 unmodified lines
485477 bool "Samsung S3C24XX SoCs"
486478 select ATAGS
487479 select CLKSRC_SAMSUNG_PWM
488− select GENERIC_CLOCKEVENTS
489480 select GPIO_SAMSUNG
490481 select GPIOLIB
491482 select GENERIC_IRQ_MULTI_HANDLER
@@ -509,7 +500,6 @@ config ARCH_OMAP1 · 17 unmodified lines
509500 select ARCH_OMAP
510501 select CLKDEV_LOOKUP
511502 select CLKSRC_MMIO
512− select GENERIC_CLOCKEVENTS
513503 select GENERIC_IRQ_CHIP
514504 select GENERIC_IRQ_MULTI_HANDLER
515505 select GPIOLIB
@@ -772,7 +762,6 @@ config ARCH_ACORN · 256 unmodified lines
772762
773763 config PLAT_IOP
774764 bool
775− select GENERIC_CLOCKEVENTS
776765
777766 config PLAT_ORION
778767 bool
@@ -1163,7 +1152,6 @@ config HAVE_SMP · 384 unmodified lines
11631152 config SMP
11641153 bool "Symmetric Multi-Processing"
11651154 depends on CPU_V6K || CPU_V7
1166− depends on GENERIC_CLOCKEVENTS
11671155 depends on HAVE_SMP
11681156 depends on MMU || ARM_MPU
11691157 select IRQ_WORK
arch/arm64/Kconfig+0−1
@@ -101,7 +101,6 @@ config ARM64 · 100 unmodified lines
101101 select FRAME_POINTER
102102 select GENERIC_ALLOCATOR
103103 select GENERIC_ARCH_TOPOLOGY
104− select GENERIC_CLOCKEVENTS
105104 select GENERIC_CLOCKEVENTS_BROADCAST
106105 select GENERIC_CPU_AUTOPROBE
107106 select GENERIC_CPU_VULNERABILITIES
arch/arm64/Kconfig.platforms+0−1
@@ -256,7 +256,6 @@ config ARCH_TEGRA · 255 unmodified lines
256256 select ARM_GIC_PM
257257 select CLKSRC_MMIO
258258 select TIMER_OF
259− select GENERIC_CLOCKEVENTS
260259 select GPIOLIB
261260 select PINCTRL
262261 select PM
arch/c6x/Kconfig+0−1
@@ -19,7 +19,6 @@ config C6X · 18 unmodified lines
1919 select IRQ_DOMAIN
2020 select OF
2121 select OF_EARLY_FLATTREE
22− select GENERIC_CLOCKEVENTS
2322 select MODULES_USE_ELF_RELA
2423 select MMU_GATHER_NO_RANGE if MMU
2524 select SET_FS
arch/csky/Kconfig+0−1
@@ -28,7 +28,6 @@ config CSKY · 27 unmodified lines
2828 select GENERIC_LIB_UCMPDI2
2929 select GENERIC_ALLOCATOR
3030 select GENERIC_ATOMIC64
31− select GENERIC_CLOCKEVENTS
3231 select GENERIC_CPU_DEVICES
3332 select GENERIC_IRQ_CHIP
3433 select GENERIC_IRQ_PROBE
arch/h8300/Kconfig+0−1
@@ -12,7 +12,6 @@ config H8300 · 11 unmodified lines
1212 select FRAME_POINTER
1313 select GENERIC_CPU_DEVICES
1414 select MODULES_USE_ELF_RELA
15− select GENERIC_CLOCKEVENTS
1615 select COMMON_CLK
1716 select ARCH_WANT_FRAME_POINTERS
1817 select OF
arch/hexagon/Kconfig+0−1
@@ -27,7 +27,6 @@ config HEXAGON · 26 unmodified lines
2727 select GENERIC_IOMAP
2828 select GENERIC_SMP_IDLE_THREAD
2929 select STACKTRACE_SUPPORT
30− select GENERIC_CLOCKEVENTS
3130 select GENERIC_CLOCKEVENTS_BROADCAST
3231 select MODULES_USE_ELF_RELA
3332 select GENERIC_CPU_DEVICES
arch/m68k/Kconfig.cpu+0−1
@@ -318,7 +318,6 @@ config M54xx · 317 unmodified lines
318318
319319 config COLDFIRE_PIT_TIMER
320320 bool
321− select GENERIC_CLOCKEVENTS
322321
323322 config COLDFIRE_TIMERS
324323 bool
arch/microblaze/Kconfig+0−1
@@ -17,7 +17,6 @@ config MICROBLAZE · 16 unmodified lines
1717 select COMMON_CLK
1818 select DMA_DIRECT_REMAP if MMU
1919 select GENERIC_ATOMIC64
20− select GENERIC_CLOCKEVENTS
2120 select GENERIC_CPU_DEVICES
2221 select GENERIC_IDLE_POLL_SETUP
2322 select GENERIC_IRQ_PROBE
arch/mips/Kconfig+0−1
@@ -21,7 +21,6 @@ config MIPS · 20 unmodified lines
2121 select CPU_NO_EFFICIENT_FFS if (TARGET_ISA_REV < 1)
2222 select CPU_PM if CPU_IDLE
2323 select GENERIC_ATOMIC64 if !64BIT
24− select GENERIC_CLOCKEVENTS
2524 select GENERIC_CMOS_UPDATE
2625 select GENERIC_CPU_AUTOPROBE
2726 select GENERIC_GETTIMEOFDAY
arch/nds32/Kconfig+0−1
@@ -17,7 +17,6 @@ config NDS32 · 16 unmodified lines
1717 select DMA_DIRECT_REMAP
1818 select GENERIC_ATOMIC64
1919 select GENERIC_CPU_DEVICES
20− select GENERIC_CLOCKEVENTS
2120 select GENERIC_IRQ_CHIP
2221 select GENERIC_IRQ_SHOW
2322 select GENERIC_IOREMAP
arch/nios2/Kconfig+0−1
@@ -10,7 +10,6 @@ config NIOS2 · 9 unmodified lines
1010 select COMMON_CLK
1111 select TIMER_OF
1212 select GENERIC_ATOMIC64
13− select GENERIC_CLOCKEVENTS
1413 select GENERIC_CPU_DEVICES
1514 select GENERIC_IRQ_PROBE
1615 select GENERIC_IRQ_SHOW
arch/openrisc/Kconfig+0−1
@@ -24,7 +24,6 @@ config OPENRISC · 23 unmodified lines
2424 select GENERIC_CPU_DEVICES
2525 select HAVE_UID16
2626 select GENERIC_ATOMIC64
27− select GENERIC_CLOCKEVENTS
2827 select GENERIC_CLOCKEVENTS_BROADCAST
2928 select GENERIC_STRNCPY_FROM_USER
3029 select GENERIC_STRNLEN_USER
arch/powerpc/Kconfig+0−1
@@ -163,7 +163,6 @@ config PPC · 162 unmodified lines
163163 select EDAC_ATOMIC_SCRUB
164164 select EDAC_SUPPORT
165165 select GENERIC_ATOMIC64 if PPC32
166− select GENERIC_CLOCKEVENTS
167166 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
168167 select GENERIC_CMOS_UPDATE
169168 select GENERIC_CPU_AUTOPROBE
arch/riscv/Kconfig+0−1
@@ -37,7 +37,6 @@ config RISCV · 36 unmodified lines
3737 select EDAC_SUPPORT
3838 select GENERIC_ARCH_TOPOLOGY if SMP
3939 select GENERIC_ATOMIC64 if !64BIT
40− select GENERIC_CLOCKEVENTS
4140 select GENERIC_EARLY_IOREMAP
4241 select GENERIC_GETTIMEOFDAY if HAVE_GENERIC_VDSO
4342 select GENERIC_IOREMAP
arch/s390/Kconfig+0−1
@@ -116,7 +116,6 @@ config S390 · 115 unmodified lines
116116 select CLONE_BACKWARDS2
117117 select DMA_OPS if PCI
118118 select DYNAMIC_FTRACE if FUNCTION_TRACER
119− select GENERIC_CLOCKEVENTS
120119 select GENERIC_CPU_AUTOPROBE
121120 select GENERIC_CPU_VULNERABILITIES
122121 select GENERIC_FIND_FIRST_BIT
arch/sh/Kconfig+0−1
@@ -16,7 +16,6 @@ config SUPERH · 15 unmodified lines
1616 select CPU_NO_EFFICIENT_FFS
1717 select DMA_DECLARE_COHERENT
1818 select GENERIC_ATOMIC64
19− select GENERIC_CLOCKEVENTS
2019 select GENERIC_CMOS_UPDATE if SH_SH03 || SH_DREAMCAST
2120 select GENERIC_IDLE_POLL_SETUP
2221 select GENERIC_IRQ_SHOW
arch/sparc/Kconfig+0−1
@@ -39,7 +39,6 @@ config SPARC · 38 unmodified lines
3939 select HAVE_EBPF_JIT if SPARC64
4040 select HAVE_DEBUG_BUGVERBOSE
4141 select GENERIC_SMP_IDLE_THREAD
42− select GENERIC_CLOCKEVENTS
4342 select GENERIC_STRNCPY_FROM_USER
4443 select GENERIC_STRNLEN_USER
4544 select MODULES_USE_ELF_RELA
arch/um/Kconfig+0−1
@@ -17,7 +17,6 @@ config UML · 16 unmodified lines
1717 select NO_DMA
1818 select GENERIC_IRQ_SHOW
1919 select GENERIC_CPU_DEVICES
20− select GENERIC_CLOCKEVENTS
2120 select HAVE_GCC_PLUGINS
2221 select SET_FS
2322 select TTY # Needed for line.c
arch/x86/Kconfig+0−1
@@ -108,7 +108,6 @@ config X86 · 107 unmodified lines
108108 select DCACHE_WORD_ACCESS
109109 select EDAC_ATOMIC_SCRUB
110110 select EDAC_SUPPORT
111− select GENERIC_CLOCKEVENTS
112111 select GENERIC_CLOCKEVENTS_BROADCAST if X86_64 || (X86_32 && X86_LOCAL_APIC)
113112 select GENERIC_CLOCKEVENTS_MIN_ADJUST
114113 select GENERIC_CMOS_UPDATE
arch/xtensa/Kconfig+0−1
@@ -16,7 +16,6 @@ config XTENSA · 15 unmodified lines
1616 select COMMON_CLK
1717 select DMA_REMAP if MMU
1818 select GENERIC_ATOMIC64
19− select GENERIC_CLOCKEVENTS
2019 select GENERIC_IRQ_SHOW
2120 select GENERIC_PCI_IOMAP
2221 select GENERIC_SCHED_CLOCK
kernel/time/Kconfig+1−1
@@ -28,7 +28,7 @@ config GENERIC_TIME_VSYSCALL · 27 unmodified lines
2828
2929 # The generic clock events infrastructure
3030 config GENERIC_CLOCKEVENTS
31− bool
31+ def_bool !LEGACY_TIMER_TICK
3232
3333 # Architecture can handle broadcast in a driver-agnostic way
3434 config ARCH_HAS_TICK_BROADCAST

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t