mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] tick/sched: fix build failure for CONFIG_NO_HZ_COMMON=n
@ 2024-02-28 12:38 Arnd Bergmann
  2024-02-28 12:38 ` [PATCH 2/2] ARM: bcm: stop selecing CONFIG_TICK_ONESHOT Arnd Bergmann
  2024-02-29 16:50 ` [tip: timers/core] tick/sched: Fix build failure for CONFIG_NO_HZ_COMMON=n tip-bot2 for Arnd Bergmann
  0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2024-02-28 12:38 UTC (permalink / raw)
  To: Frederic Weisbecker, Thomas Gleixner, Ingo Molnar
  Cc: Arnd Bergmann, Peter Zijlstra (Intel), Peng Liu, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

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.

Fixes: 3aedb7fcd88a ("tick/sched: Remove useless oneshot ifdeffery")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 kernel/time/tick-sched.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/tick-sched.h b/kernel/time/tick-sched.h
index 58d8d1c49dd3..e11c4dc65bcb 100644
--- a/kernel/time/tick-sched.h
+++ b/kernel/time/tick-sched.h
@@ -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 defined CONFIG_NO_HZ_COMMON || defined CONFIG_HIGH_RES_TIMERS
+#if defined CONFIG_TICK_ONESHOT
 extern void tick_sched_timer_dying(int cpu);
 #else
 static inline void tick_sched_timer_dying(int cpu) { }
-- 
2.39.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ARM: bcm: stop selecing CONFIG_TICK_ONESHOT
  2024-02-28 12:38 [PATCH 1/2] tick/sched: fix build failure for CONFIG_NO_HZ_COMMON=n Arnd Bergmann
@ 2024-02-28 12:38 ` Arnd Bergmann
  2024-02-28 18:32   ` Florian Fainelli
  2024-02-29 16:50 ` [tip: timers/core] tick/sched: Fix build failure for CONFIG_NO_HZ_COMMON=n tip-bot2 for Arnd Bergmann
  1 sibling, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2024-02-28 12:38 UTC (permalink / raw)
  To: Frederic Weisbecker, Thomas Gleixner, Ingo Molnar
  Cc: Arnd Bergmann, Florian Fainelli, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, linux-arm-kernel,
	linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

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.

Fixes: 3aedb7fcd88a ("tick/sched: Remove useless oneshot ifdeffery")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-bcm/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
index 8df4b23e2699..ed6415e7e3a4 100644
--- a/arch/arm/mach-bcm/Kconfig
+++ b/arch/arm/mach-bcm/Kconfig
@@ -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
-- 
2.39.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] ARM: bcm: stop selecing CONFIG_TICK_ONESHOT
  2024-02-28 12:38 ` [PATCH 2/2] ARM: bcm: stop selecing CONFIG_TICK_ONESHOT Arnd Bergmann
@ 2024-02-28 18:32   ` Florian Fainelli
  0 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2024-02-28 18:32 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Arnd Bergmann, Frederic Weisbecker,
	Thomas Gleixner, Ingo Molnar
  Cc: Florian Fainelli, Arnd Bergmann, Ray Jui, Scott Branden,
	linux-arm-kernel, linux-kernel

From: Florian Fainelli <f.fainelli@gmail.com>

On Wed, 28 Feb 2024 13:38:42 +0100, Arnd Bergmann <arnd@kernel.org> wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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.
> 
> Fixes: 3aedb7fcd88a ("tick/sched: Remove useless oneshot ifdeffery")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/soc/next, thanks!
--
Florian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip: timers/core] tick/sched: Fix build failure for CONFIG_NO_HZ_COMMON=n
  2024-02-28 12:38 [PATCH 1/2] tick/sched: fix build failure for CONFIG_NO_HZ_COMMON=n Arnd Bergmann
  2024-02-28 12:38 ` [PATCH 2/2] ARM: bcm: stop selecing CONFIG_TICK_ONESHOT Arnd Bergmann
@ 2024-02-29 16:50 ` tip-bot2 for Arnd Bergmann
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot2 for Arnd Bergmann @ 2024-02-29 16:50 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Arnd Bergmann, Thomas Gleixner, x86, linux-kernel

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 <arnd@arndb.de>
AuthorDate:    Wed, 28 Feb 2024 13:38:41 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
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.

Fixes: 3aedb7fcd88a ("tick/sched: Remove useless oneshot ifdeffery")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240228123850.3499024-1-arnd@kernel.org

---
 kernel/time/tick-sched.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/tick-sched.h b/kernel/time/tick-sched.h
index 58d8d1c..e11c4dc 100644
--- a/kernel/time/tick-sched.h
+++ b/kernel/time/tick-sched.h
@@ -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 defined CONFIG_NO_HZ_COMMON || defined CONFIG_HIGH_RES_TIMERS
+#if defined CONFIG_TICK_ONESHOT
 extern void tick_sched_timer_dying(int cpu);
 #else
 static inline void tick_sched_timer_dying(int cpu) { }

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-29 16:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-28 12:38 [PATCH 1/2] tick/sched: fix build failure for CONFIG_NO_HZ_COMMON=n Arnd Bergmann
2024-02-28 12:38 ` [PATCH 2/2] ARM: bcm: stop selecing CONFIG_TICK_ONESHOT Arnd Bergmann
2024-02-28 18:32   ` Florian Fainelli
2024-02-29 16:50 ` [tip: timers/core] tick/sched: Fix build failure for CONFIG_NO_HZ_COMMON=n tip-bot2 for Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®