Commit 0774a6ed authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

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.

Reviewed-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Tested-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 56cc7b8a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
#
# Feature name:          clockevents
#         Kconfig:       GENERIC_CLOCKEVENTS
#         Kconfig:       !LEGACY_TIMER_TICK
#         description:   arch support generic clock events
#
    -----------------------
@@ -8,14 +8,14 @@
    -----------------------
    |       alpha: |  ok  |
    |         arc: |  ok  |
    |         arm: |  ok  |
    |         arm: | TODO |
    |       arm64: |  ok  |
    |         c6x: |  ok  |
    |        csky: |  ok  |
    |       h8300: |  ok  |
    |     hexagon: |  ok  |
    |        ia64: | TODO |
    |        m68k: |  ok  |
    |        m68k: | TODO |
    |  microblaze: |  ok  |
    |        mips: |  ok  |
    |       nds32: |  ok  |
+0 −1
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ config ALPHA
	select ARCH_WANT_IPC_PARSE_VERSION
	select ARCH_HAVE_NMI_SAFE_CMPXCHG
	select AUDIT_ARCH
	select GENERIC_CLOCKEVENTS
	select GENERIC_CPU_VULNERABILITIES
	select GENERIC_SMP_IDLE_THREAD
	select GENERIC_STRNCPY_FROM_USER
+0 −1
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ config ARC
	select COMMON_CLK
	select DMA_DIRECT_REMAP
	select GENERIC_ATOMIC64 if !ISA_ARCV2 || !(ARC_HAS_LL64 && ARC_HAS_LLSC)
	select GENERIC_CLOCKEVENTS
	select GENERIC_FIND_FIRST_BIT
	# for now, we don't need GENERIC_IRQ_PROBE, CONFIG_GENERIC_IRQ_CHIP
	select GENERIC_IRQ_SHOW
+0 −12
Original line number Diff line number Diff line
@@ -321,7 +321,6 @@ config ARCH_MULTIPLATFORM
	select AUTO_ZRELADDR
	select TIMER_OF
	select COMMON_CLK
	select GENERIC_CLOCKEVENTS
	select GENERIC_IRQ_MULTI_HANDLER
	select HAVE_PCI
	select PCI_DOMAINS_GENERIC if PCI
@@ -336,7 +335,6 @@ config ARM_SINGLE_ARMV7M
	select TIMER_OF
	select COMMON_CLK
	select CPU_V7M
	select GENERIC_CLOCKEVENTS
	select NO_IOPORT_MAP
	select SPARSE_IRQ
	select USE_OF
@@ -351,7 +349,6 @@ config ARCH_EP93XX
	select CLKDEV_LOOKUP
	select CLKSRC_MMIO
	select CPU_ARM920T
	select GENERIC_CLOCKEVENTS
	select GPIOLIB
	select HAVE_LEGACY_CLK
	help
@@ -361,7 +358,6 @@ config ARCH_FOOTBRIDGE
	bool "FootBridge"
	select CPU_SA110
	select FOOTBRIDGE
	select GENERIC_CLOCKEVENTS
	select HAVE_IDE
	select NEED_MACH_IO_H if !MMU
	select NEED_MACH_MEMORY_H
@@ -389,7 +385,6 @@ config ARCH_IXP4XX
	select ARCH_SUPPORTS_BIG_ENDIAN
	select CPU_XSCALE
	select DMABOUNCE if PCI
	select GENERIC_CLOCKEVENTS
	select GENERIC_IRQ_MULTI_HANDLER
	select GPIO_IXP4XX
	select GPIOLIB
@@ -405,7 +400,6 @@ config ARCH_IXP4XX
config ARCH_DOVE
	bool "Marvell Dove"
	select CPU_PJ4
	select GENERIC_CLOCKEVENTS
	select GENERIC_IRQ_MULTI_HANDLER
	select GPIOLIB
	select HAVE_PCI
@@ -429,7 +423,6 @@ config ARCH_PXA
	select CLKSRC_MMIO
	select TIMER_OF
	select CPU_XSCALE if !CPU_XSC3
	select GENERIC_CLOCKEVENTS
	select GENERIC_IRQ_MULTI_HANDLER
	select GPIO_PXA
	select GPIOLIB
@@ -470,7 +463,6 @@ config ARCH_SA1100
	select COMMON_CLK
	select CPU_FREQ
	select CPU_SA1100
	select GENERIC_CLOCKEVENTS
	select GENERIC_IRQ_MULTI_HANDLER
	select GPIOLIB
	select HAVE_IDE
@@ -485,7 +477,6 @@ config ARCH_S3C24XX
	bool "Samsung S3C24XX SoCs"
	select ATAGS
	select CLKSRC_SAMSUNG_PWM
	select GENERIC_CLOCKEVENTS
	select GPIO_SAMSUNG
	select GPIOLIB
	select GENERIC_IRQ_MULTI_HANDLER
@@ -509,7 +500,6 @@ config ARCH_OMAP1
	select ARCH_OMAP
	select CLKDEV_LOOKUP
	select CLKSRC_MMIO
	select GENERIC_CLOCKEVENTS
	select GENERIC_IRQ_CHIP
	select GENERIC_IRQ_MULTI_HANDLER
	select GPIOLIB
@@ -772,7 +762,6 @@ config ARCH_ACORN

config PLAT_IOP
	bool
	select GENERIC_CLOCKEVENTS

config PLAT_ORION
	bool
@@ -1163,7 +1152,6 @@ config HAVE_SMP
config SMP
	bool "Symmetric Multi-Processing"
	depends on CPU_V6K || CPU_V7
	depends on GENERIC_CLOCKEVENTS
	depends on HAVE_SMP
	depends on MMU || ARM_MPU
	select IRQ_WORK
+0 −1
Original line number Diff line number Diff line
@@ -101,7 +101,6 @@ config ARM64
	select FRAME_POINTER
	select GENERIC_ALLOCATOR
	select GENERIC_ARCH_TOPOLOGY
	select GENERIC_CLOCKEVENTS
	select GENERIC_CLOCKEVENTS_BROADCAST
	select GENERIC_CPU_AUTOPROBE
	select GENERIC_CPU_VULNERABILITIES
Loading