tick/sched: fix build failure for CONFIG_NO_HZ_COMMON=n
Subsystems (4)
PATCH 1/2 tick/sched: fix build failure for CONFIG_NO_HZ_COMMON=n
From: Arnd Bergmann <[email protected]>
In configurations with CONFIG_TICK_ONESHOT but no CONFIG_NO_HZ or CONFIG_HIGH_RES_TIMERS, tick_sched_timer_dying() is stubbed out, but still defined as a global function as well:
kernel/time/tick-sched.c:1599:6: error: redefinition of 'tick_sched_timer_dying'
1599 | void tick_sched_timer_dying(int cpu)
| ^kernel/time/tick-sched.h:111:20: note: previous definition is here
111 | static inline void tick_sched_timer_dying(int cpu) { }
| ^
This configuration only appears with ARM CONFIG_ARCH_BCM_MOBILE, which should not actually select CONFIG_TICK_ONESHOT.
Adjust the #ifdef for the stub to match the condition for building the tick-sched.c file for consistency with the definition and to avoid the build regression.
--- kernel/time/tick-sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/tick-sched.h +1 -1
@@ -105,7 +105,7 @@ struct tick_sched {extern struct tick_sched *tick_get_tick_sched (int cpu);extern void tick_setup_sched_timer (bool hrtimer); -#if definedCONFIG_NO_HZ_COMMON || definedCONFIG_HIGH_RES_TIMERS +#if definedCONFIG_TICK_ONESHOT extern void tick_sched_timer_dying (int cpu);#else static inline void tick_sched_timer_dying (int cpu) { }
Signature · 1 line
2.39.2
PATCH 2/2 ARM: bcm: stop selecing CONFIG_TICK_ONESHOT
From: Arnd Bergmann <[email protected]>
ARCH_BCM_MOBILE is the only platform that selects CONFIG_TICK_ONESHOT, the others stopped 12 years ago in commit 98fab064d321 ("ARM: Remove unnecessary selection of TICK_ONESHOT").
This inconsistency caused a build regression after an otherwise correct change to the timers subsystem:
kernel/time/tick-sched.c:1599:6: error: redefinition of 'tick_sched_timer_dying'
1599 | void tick_sched_timer_dying(int cpu)
| ^kernel/time/tick-sched.h:111:20: note: previous definition is here
111 | static inline void tick_sched_timer_dying(int cpu) { }
Drop this dead select.
--- arch/arm/mach-bcm/Kconfig | 1 - 1 file changed, 1 deletion(-)
arch/arm/mach-bcm/Kconfig +0 -1
@@ -93,7 +93,6 @@ config ARCH_BCM_MOBILE select ARM_ERRATA_775420 select ARM_GIC select GPIO_BCM_KONA - select TICK_ONESHOT select HAVE_ARM_ARCH_TIMER select PINCTRL select ARCH_BCM_MOBILE_SMP if SMP
Signature · 1 line
2.39.2
Re: [PATCH 2/2] ARM: bcm: stop selecing CONFIG_TICK_ONESHOT
From: Florian Fainelli <[email protected]>
Quoted 15 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
ARCH_BCM_MOBILEis the only platform that selectsCONFIG_TICK_ONESHOT, the others stopped 12 years ago in commit98fab064d321("ARM: Remove unnecessary selection ofTICK_ONESHOT").This inconsistency caused a build regression after an otherwise correct change to the timers subsystem:
kernel/time/tick-sched.c:1599:6: error: redefinition of 'tick_sched_timer_dying'
1599 | voidtick_sched_timer_dying(int cpu)
| ^kernel/time/tick-sched.h:111:20: note: previous definition is here
111 | static inline voidtick_sched_timer_dying(int cpu){ }
Quoted 5 lines
Drop this dead select.
Fixes 3aedb7fcd88a ("tick/sched: Remove useless oneshot ifdeffery")Signed-off-by Arnd Bergmann <[email protected]>---
Applied to https://github.com/Broadcom/stblinux/commits/soc/next, thanks! --
Florian
[tip: timers/core] tick/sched: Fix build failure for CONFIG_NO_HZ_COMMON=n
In reply to Arnd BergmannThe following commit has been merged into the timers/core branch of tip:
The following commit has been merged into the timers/core branch of tip:
Commit-ID: a184d9835a0a689261ea6a4a8dbc18173a031b77 Gitweb: https://git.kernel.org/tip/a184d9835a0a689261ea6a4a8dbc18173a031b77 Author: Arnd Bergmann <[email protected]> AuthorDate: Wed, 28 Feb 2024 13:38:41 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 29 Feb 2024 17:41:29 +01:00
tick/sched: Fix build failure for CONFIG_NO_HZ_COMMON=n
In configurations with CONFIG_TICK_ONESHOT but no CONFIG_NO_HZ or CONFIG_HIGH_RES_TIMERS, tick_sched_timer_dying() is stubbed out, but still defined as a global function as well:
kernel/time/tick-sched.c:1599:6: error: redefinition of 'tick_sched_timer_dying'
1599 | void tick_sched_timer_dying(int cpu)
| ^kernel/time/tick-sched.h:111:20: note: previous definition is here
111 | static inline void tick_sched_timer_dying(int cpu) { }
| ^
This configuration only appears with ARM CONFIG_ARCH_BCM_MOBILE, which should not actually select CONFIG_TICK_ONESHOT.
Adjust the #ifdef for the stub to match the condition for building the tick-sched.c file for consistency with the definition and to avoid the build regression.
--- kernel/time/tick-sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/tick-sched.h +1 -1
@@ -105,7 +105,7 @@ struct tick_sched {extern struct tick_sched *tick_get_tick_sched (int cpu);extern void tick_setup_sched_timer (bool hrtimer); -#if definedCONFIG_NO_HZ_COMMON || definedCONFIG_HIGH_RES_TIMERS +#if definedCONFIG_TICK_ONESHOT extern void tick_sched_timer_dying (int cpu);#else static inline void tick_sched_timer_dying (int cpu) { }