clockevents: Rearrange cpuhotplug operations v2
Subsystems (10)
Frederic Weisbecker
maintainercover clockevents: Rearrange cpuhotplug operations v2
Some recent RCU issues triggered with offline ticks uncovered hotplug behaviour differences between oneshot and periodic ticks. The former is disabled on the dying CPU but not the latter. Also the clockevents hotplug code is quite chaotic. This is a proposal to fix the situation.
Changes since v1:
* Fix build error
* Fix commits prefixes
Thanks.
Frederic Weisbecker (10):
clockevents: Improve clockevents_notify_released() comment
clockevents: Shutdown and unregister current clockevents at
CPUHP_AP_TICK_DYING
tick: Remove now unneeded low-res tick stop on CPUHP_AP_TICK_DYING
ARM: smp_twd: Remove clockevents shutdown call on offlining clocksource/drivers/arm_arch_timer: Remove clockevents shutdown call
on offlining
clocksource/drivers/arm_global_timer: Remove clockevents shutdown call
on offlining
clocksource/drivers/exynos_mct: Remove clockevents shutdown call on
offlining
clocksource/drivers/armada-370-xp: Remove clockevents shutdown call on
offlining
clocksource/drivers/qcom: Remove clockevents shutdown call on
offlining
clocksource/drivers/timer-tegra: Remove clockevents shutdown call on
offlining
arch/arm/kernel/smp_twd.c | 1 - drivers/clocksource/arm_arch_timer.c | 2 - drivers/clocksource/arm_global_timer.c | 1 - drivers/clocksource/exynos_mct.c | 1 - drivers/clocksource/timer-armada-370-xp.c | 1 - drivers/clocksource/timer-qcom.c | 1 - drivers/clocksource/timer-tegra.c | 1 - include/linux/tick.h | 2 - kernel/cpu.c | 2 - kernel/time/clockevents.c | 45 ++++++++++++----------- kernel/time/tick-internal.h | 3 +- kernel/time/tick-sched.c | 25 +++---------- 12 files changed, 31 insertions(+), 54 deletions(-)
Signature · 1 line
2.46.0
Frederic Weisbecker
maintainerPATCH 1/10 clockevents: Improve clockevents_notify_released() comment
When a new clockevent device is added and replaces a previous device, the latter is put into the released list. Then the released list is added back.
This may look counter-intuitive but the reason is that released device might be suitable for other uses. For example a released CPU regular clockevent can be a better replacement for the current broadcast event. Similarly a released broadcast clockevent can be a better replacement for the current regular clockevent of a given CPU.
Improve comments stating about these subtleties.
--- kernel/time/clockevents.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
kernel/time/clockevents.c +10 -2
@@ -337,13 +337,21 @@ int clockevents_program_event(struct clock_event_device *dev, ktime_t expires, }/* -* Called after a notify add to make devices available which were -* released from the notifier call. +* Called after a clockevent has been added which might +* have replaced a current regular or broadcast device. A +* released normal device might be a suitable replacement +* for the current broadcast device. Similarly a released +* broadcast device might be a suitable replacement for a +* normal device. */ static void clockevents_notify_released (void ) {struct clock_event_device *dev; +/* +* Keep iterating as long as tick_check_new_device() +* replaces a device. +*/ while (!list_empty (&clockevents_released)) { dev =list_entry (clockevents_released.next, struct clock_event_device, list);
Signature · 1 line
2.46.0
[tip: timers/core] clockevents: Improve clockevents_notify_released() comment
The 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: 679f8484cafa08f49a19e2947d05e96321fbed9d Gitweb: https://git.kernel.org/tip/679f8484cafa08f49a19e2947d05e96321fbed9d Author: Frederic Weisbecker <[email protected]> AuthorDate: Tue, 29 Oct 2024 13:54:42 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 30 Oct 2024 21:02:21 +01:00
clockevents: Improve clockevents_notify_released() comment
When a new clockevent device is added and replaces a previous device, the latter is put into the released list. Then the released list is added back.
This may look counter-intuitive but the reason is that released device might be suitable for other uses. For example a released CPU regular clockevent can be a better replacement for the current broadcast event. Similarly a released broadcast clockevent can be a better replacement for the current regular clockevent of a given CPU.
Improve comments stating about these subtleties.
--- kernel/time/clockevents.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
kernel/time/clockevents.c +10 -2
@@ -337,13 +337,21 @@ int clockevents_program_event(struct clock_event_device *dev, ktime_t expires, }/* -* Called after a notify add to make devices available which were -* released from the notifier call. +* Called after a clockevent has been added which might +* have replaced a current regular or broadcast device. A +* released normal device might be a suitable replacement +* for the current broadcast device. Similarly a released +* broadcast device might be a suitable replacement for a +* normal device. */ static void clockevents_notify_released (void ) {struct clock_event_device *dev; +/* +* Keep iterating as long as tick_check_new_device() +* replaces a device. +*/ while (!list_empty (&clockevents_released)) { dev =list_entry (clockevents_released.next, struct clock_event_device, list);
[tip: timers/core] clockevents: Improve clockevents_notify_released() comment
In reply to Frederic WeisbeckerThe 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: 17a8945f369ce2de2532ba8abdb93bb5b2d1c118 Gitweb: https://git.kernel.org/tip/17a8945f369ce2de2532ba8abdb93bb5b2d1c118 Author: Frederic Weisbecker <[email protected]> AuthorDate: Tue, 29 Oct 2024 13:54:42 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 31 Oct 2024 10:41:42 +01:00
clockevents: Improve clockevents_notify_released() comment
When a new clockevent device is added and replaces a previous device, the latter is put into the released list. Then the released list is added back.
This may look counter-intuitive but the reason is that released device might be suitable for other uses. For example a released CPU regular clockevent can be a better replacement for the current broadcast event. Similarly a released broadcast clockevent can be a better replacement for the current regular clockevent of a given CPU.
Improve comments stating about these subtleties.
--- kernel/time/clockevents.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
kernel/time/clockevents.c +10 -2
@@ -337,13 +337,21 @@ int clockevents_program_event(struct clock_event_device *dev, ktime_t expires, }/* -* Called after a notify add to make devices available which were -* released from the notifier call. +* Called after a clockevent has been added which might +* have replaced a current regular or broadcast device. A +* released normal device might be a suitable replacement +* for the current broadcast device. Similarly a released +* broadcast device might be a suitable replacement for a +* normal device. */ static void clockevents_notify_released (void ) {struct clock_event_device *dev; +/* +* Keep iterating as long as tick_check_new_device() +* replaces a device. +*/ while (!list_empty (&clockevents_released)) { dev =list_entry (clockevents_released.next, struct clock_event_device, list);
Frederic Weisbecker
maintainerPATCH 2/10 clockevents: Shutdown and unregister current clockevents at CPUHP_AP_TICK_DYING
In reply to Frederic WeisbeckerThe way the clockevent devices are finally stopped while a CPU is offlining is currently chaotic. The layout being by order:
1) tick_sched_timer_dying() stops the tick and the underlying clockevent but only for oneshot case. The periodic tick and its related clockevent still runs.
2) tick_broadcast_offline() detaches and stops the per-cpu oneshot broadcast and append it to the released list.
3) Some individual clockevent drivers stop the clockevents (a second time if the tick is oneshot)
4) Once the CPU is dead, a control CPU remotely detaches and stops (a 3rd time if oneshot mode) the CPU clockevent and adds it to the released list.
5) The released list containing the broadcast device released on step 2) and the remotely detached clockevent from step 4) are unregistered.
These random events can be factorized if the current clockevent is detached and stopped by the dying CPU at the generic layer, that is from the dying CPU:
a) Stop the tick
b) Stop/detach the underlying per-cpu oneshot broadcast clockevent
c) Stop/detach the underlying clockevent
d) Release / unregister the clockevents from b) and c)
e) Release / unregister the remaining clockevents from the dying CPU. This part could be performed by the dying CPU
This way the drivers and the tick layer don't need to care about clockevent operations during cpuhotplug down. This also unifies the tick behaviour on offline CPUs between oneshot and periodic modes, avoiding offline ticks altogether for sanity.
Adopt the simplification and verify no further clockevent can be registered for the dying CPU after the final release.
--- include/linux/tick.h | 2 -- kernel/cpu.c | 2 -- kernel/time/clockevents.c | 33 ++++++++++++++------------------- kernel/time/tick-internal.h | 3 +-- 4 files changed, 15 insertions(+), 25 deletions(-)
include/linux/tick.h +0 -2
@@ -20,12 +20,10 @@ extern void __init tick_init(void);extern void tick_suspend_local (void );/* Should be core only, but XEN resume magic and ARM BL switcher require it */ extern void tick_resume_local (void ); -extern void tick_cleanup_dead_cpu (int cpu);#else /* CONFIG_GENERIC_CLOCKEVENTS */ static inline void tick_init (void ) { }static inline void tick_suspend_local (void ) { }static inline void tick_resume_local (void ) { } -static inline void tick_cleanup_dead_cpu (int cpu) { }#endif /* !CONFIG_GENERIC_CLOCKEVENTS */ #if defined(CONFIG_GENERIC_CLOCKEVENTS ) && defined(CONFIG_HOTPLUG_CPU )
kernel/cpu.c +0 -2
@@ -1338,8 +1338,6 @@ static int takedown_cpu(unsigned int cpu)cpuhp_bp_sync_dead (cpu); -tick_cleanup_dead_cpu (cpu); -/* * Callbacks must be re-integrated right away to the RCU state machine. * Otherwise an RCU callback could block a further teardown function
kernel/time/clockevents.c +14 -19
@@ -452,6 +452,9 @@ void clockevents_register_device(struct clock_event_device *dev) {unsigned long flags; +if (WARN_ON_ONCE (cpu_is_offline (raw_smp_processor_id ()))) +return ; +/* Initialize state to DETACHED */ clockevent_set_state (dev,CLOCK_EVT_STATE_DETACHED );
@@ -618,39 +621,30 @@ void clockevents_resume(void)#ifdef CONFIG_HOTPLUG_CPU -# ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST /** -* tick_offline_cpu - Take CPU out of the broadcast mechanism +* tick_offline_cpu - Shutdown all clock events related +* to this CPU and take it out of the +* broadcast mechanism. * @cpu: The outgoing CPU * -* Called on the outgoing CPU after it took itself offline. +* Called by the dying CPU during teardown. */ void tick_offline_cpu (unsigned int cpu) -{ -raw_spin_lock (&clockevents_lock); -tick_broadcast_offline (cpu); -raw_spin_unlock (&clockevents_lock); -} -# endif - -/** -* tick_cleanup_dead_cpu - Cleanup the tick and clockevents of a dead cpu -* @cpu: The dead CPU -*/ -void tick_cleanup_dead_cpu (int cpu) {struct clock_event_device *dev, *tmp; -unsigned long flags; -raw_spin_lock_irqsave (&clockevents_lock, flags); +raw_spin_lock (&clockevents_lock); +tick_broadcast_offline (cpu);tick_shutdown (cpu); +/* * Unregister the clock event devices which were -* released from the users in the notify chain. +* released above. */ list_for_each_entry_safe (dev, tmp, &clockevents_released, list)list_del (&dev->list); +/* * Now check whether the CPU has left unused per cpu devices */
@@ -662,7 +656,8 @@ void tick_cleanup_dead_cpu(int cpu) list_del(&dev->list); } } -raw_spin_unlock_irqrestore (&clockevents_lock, flags); + +raw_spin_unlock (&clockevents_lock); }#endif
kernel/time/tick-internal.h +1 -2
@@ -25,6 +25,7 @@ extern int tick_do_timer_cpu __read_mostly;extern void tick_setup_periodic (struct clock_event_device *dev,int broadcast);extern void tick_handle_periodic (struct clock_event_device *dev);extern void tick_check_new_device (struct clock_event_device *dev); +extern void tick_offline_cpu (unsigned int cpu);extern void tick_shutdown (unsigned int cpu);extern void tick_suspend (void );extern void tick_resume (void );
@@ -142,10 +143,8 @@ static inline bool tick_broadcast_oneshot_available(void) { return tick_oneshot_#endif /* !(BROADCAST && ONESHOT) */ #if defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST ) && defined(CONFIG_HOTPLUG_CPU ) -extern void tick_offline_cpu (unsigned int cpu);extern void tick_broadcast_offline (unsigned int cpu);#else -static inline void tick_offline_cpu (unsigned int cpu) { }static inline void tick_broadcast_offline (unsigned int cpu) { }#endif
Signature · 1 line
2.46.0
[tip: timers/core] clockevents: Shutdown and unregister current clockevents at CPUHP_AP_TICK_DYING
The 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: c80e6e9de6aec2a9e9c7671872b75f3fcae810a7 Gitweb: https://git.kernel.org/tip/c80e6e9de6aec2a9e9c7671872b75f3fcae810a7 Author: Frederic Weisbecker <[email protected]> AuthorDate: Tue, 29 Oct 2024 13:54:43 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 30 Oct 2024 21:02:21 +01:00
clockevents: Shutdown and unregister current clockevents at CPUHP_AP_TICK_DYING
The way the clockevent devices are finally stopped while a CPU is offlining is currently chaotic. The layout being by order:
1) tick_sched_timer_dying() stops the tick and the underlying clockevent but only for oneshot case. The periodic tick and its related clockevent still runs.
2) tick_broadcast_offline() detaches and stops the per-cpu oneshot broadcast and append it to the released list.
3) Some individual clockevent drivers stop the clockevents (a second time if the tick is oneshot)
4) Once the CPU is dead, a control CPU remotely detaches and stops (a 3rd time if oneshot mode) the CPU clockevent and adds it to the released list.
5) The released list containing the broadcast device released on step 2) and the remotely detached clockevent from step 4) are unregistered.
These random events can be factorized if the current clockevent is detached and stopped by the dying CPU at the generic layer, that is from the dying CPU:
a) Stop the tick
b) Stop/detach the underlying per-cpu oneshot broadcast clockevent
c) Stop/detach the underlying clockevent
d) Release / unregister the clockevents from b) and c)
e) Release / unregister the remaining clockevents from the dying CPU. This part could be performed by the dying CPU
This way the drivers and the tick layer don't need to care about clockevent operations during cpuhotplug down. This also unifies the tick behaviour on offline CPUs between oneshot and periodic modes, avoiding offline ticks altogether for sanity.
Adopt the simplification and verify no further clockevent can be registered for the dying CPU after the final release.
--- include/linux/tick.h | 2 -- kernel/cpu.c | 2 -- kernel/time/clockevents.c | 33 ++++++++++++++------------------- kernel/time/tick-internal.h | 3 +-- 4 files changed, 15 insertions(+), 25 deletions(-)
include/linux/tick.h +0 -2
@@ -20,12 +20,10 @@ extern void __init tick_init(void);extern void tick_suspend_local (void );/* Should be core only, but XEN resume magic and ARM BL switcher require it */ extern void tick_resume_local (void ); -extern void tick_cleanup_dead_cpu (int cpu);#else /* CONFIG_GENERIC_CLOCKEVENTS */ static inline void tick_init (void ) { }static inline void tick_suspend_local (void ) { }static inline void tick_resume_local (void ) { } -static inline void tick_cleanup_dead_cpu (int cpu) { }#endif /* !CONFIG_GENERIC_CLOCKEVENTS */ #if defined(CONFIG_GENERIC_CLOCKEVENTS ) && defined(CONFIG_HOTPLUG_CPU )
kernel/cpu.c +0 -2
@@ -1338,8 +1338,6 @@ static int takedown_cpu(unsigned int cpu)cpuhp_bp_sync_dead (cpu); -tick_cleanup_dead_cpu (cpu); -/* * Callbacks must be re-integrated right away to the RCU state machine. * Otherwise an RCU callback could block a further teardown function
kernel/time/clockevents.c +14 -19
@@ -452,6 +452,9 @@ void clockevents_register_device(struct clock_event_device *dev) {unsigned long flags; +if (WARN_ON_ONCE (cpu_is_offline (raw_smp_processor_id ()))) +return ; +/* Initialize state to DETACHED */ clockevent_set_state (dev,CLOCK_EVT_STATE_DETACHED );
@@ -618,39 +621,30 @@ void clockevents_resume(void)#ifdef CONFIG_HOTPLUG_CPU -# ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST /** -* tick_offline_cpu - Take CPU out of the broadcast mechanism +* tick_offline_cpu - Shutdown all clock events related +* to this CPU and take it out of the +* broadcast mechanism. * @cpu: The outgoing CPU * -* Called on the outgoing CPU after it took itself offline. +* Called by the dying CPU during teardown. */ void tick_offline_cpu (unsigned int cpu) { -raw_spin_lock (&clockevents_lock); -tick_broadcast_offline (cpu); -raw_spin_unlock (&clockevents_lock); -} -# endif - -/** -* tick_cleanup_dead_cpu - Cleanup the tick and clockevents of a dead cpu -* @cpu: The dead CPU -*/ -void tick_cleanup_dead_cpu (int cpu) -{struct clock_event_device *dev, *tmp; -unsigned long flags; -raw_spin_lock_irqsave (&clockevents_lock, flags); +raw_spin_lock (&clockevents_lock); +tick_broadcast_offline (cpu);tick_shutdown (cpu); +/* * Unregister the clock event devices which were -* released from the users in the notify chain. +* released above. */ list_for_each_entry_safe (dev, tmp, &clockevents_released, list)list_del (&dev->list); +/* * Now check whether the CPU has left unused per cpu devices */
@@ -662,7 +656,8 @@ void tick_cleanup_dead_cpu(int cpu) list_del(&dev->list); } } -raw_spin_unlock_irqrestore (&clockevents_lock, flags); + +raw_spin_unlock (&clockevents_lock); }#endif
kernel/time/tick-internal.h +1 -2
@@ -25,6 +25,7 @@ extern int tick_do_timer_cpu __read_mostly;extern void tick_setup_periodic (struct clock_event_device *dev,int broadcast);extern void tick_handle_periodic (struct clock_event_device *dev);extern void tick_check_new_device (struct clock_event_device *dev); +extern void tick_offline_cpu (unsigned int cpu);extern void tick_shutdown (unsigned int cpu);extern void tick_suspend (void );extern void tick_resume (void );
@@ -142,10 +143,8 @@ static inline bool tick_broadcast_oneshot_available(void) { return tick_oneshot_#endif /* !(BROADCAST && ONESHOT) */ #if defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST ) && defined(CONFIG_HOTPLUG_CPU ) -extern void tick_offline_cpu (unsigned int cpu);extern void tick_broadcast_offline (unsigned int cpu);#else -static inline void tick_offline_cpu (unsigned int cpu) { }static inline void tick_broadcast_offline (unsigned int cpu) { }#endif
[tip: timers/core] clockevents: Shutdown and unregister current clockevents at CPUHP_AP_TICK_DYING
In reply to Frederic WeisbeckerThe 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: 3b1596a21fbf210f5b763fd3c0be280650475b52 Gitweb: https://git.kernel.org/tip/3b1596a21fbf210f5b763fd3c0be280650475b52 Author: Frederic Weisbecker <[email protected]> AuthorDate: Tue, 29 Oct 2024 13:54:43 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 31 Oct 2024 10:41:42 +01:00
clockevents: Shutdown and unregister current clockevents at CPUHP_AP_TICK_DYING
The way the clockevent devices are finally stopped while a CPU is offlining is currently chaotic. The layout being by order:
1) tick_sched_timer_dying() stops the tick and the underlying clockevent but only for oneshot case. The periodic tick and its related clockevent still runs.
2) tick_broadcast_offline() detaches and stops the per-cpu oneshot broadcast and append it to the released list.
3) Some individual clockevent drivers stop the clockevents (a second time if the tick is oneshot)
4) Once the CPU is dead, a control CPU remotely detaches and stops (a 3rd time if oneshot mode) the CPU clockevent and adds it to the released list.
5) The released list containing the broadcast device released on step 2) and the remotely detached clockevent from step 4) are unregistered.
These random events can be factorized if the current clockevent is detached and stopped by the dying CPU at the generic layer, that is from the dying CPU:
a) Stop the tick
b) Stop/detach the underlying per-cpu oneshot broadcast clockevent
c) Stop/detach the underlying clockevent
d) Release / unregister the clockevents from b) and c)
e) Release / unregister the remaining clockevents from the dying CPU. This part could be performed by the dying CPU
This way the drivers and the tick layer don't need to care about clockevent operations during cpuhotplug down. This also unifies the tick behaviour on offline CPUs between oneshot and periodic modes, avoiding offline ticks altogether for sanity.
Adopt the simplification.
[ tglx: Remove the WARN_ON() in clockevents_register_device() as that
is called from an upcoming CPU before the CPU is marked online ]
--- include/linux/tick.h | 2 -- kernel/cpu.c | 2 -- kernel/time/clockevents.c | 30 +++++++++++------------------- kernel/time/tick-internal.h | 3 +-- 4 files changed, 12 insertions(+), 25 deletions(-)
include/linux/tick.h +0 -2
@@ -20,12 +20,10 @@ extern void __init tick_init(void);extern void tick_suspend_local (void );/* Should be core only, but XEN resume magic and ARM BL switcher require it */ extern void tick_resume_local (void ); -extern void tick_cleanup_dead_cpu (int cpu);#else /* CONFIG_GENERIC_CLOCKEVENTS */ static inline void tick_init (void ) { }static inline void tick_suspend_local (void ) { }static inline void tick_resume_local (void ) { } -static inline void tick_cleanup_dead_cpu (int cpu) { }#endif /* !CONFIG_GENERIC_CLOCKEVENTS */ #if defined(CONFIG_GENERIC_CLOCKEVENTS ) && defined(CONFIG_HOTPLUG_CPU )
kernel/cpu.c +0 -2
@@ -1338,8 +1338,6 @@ static int takedown_cpu(unsigned int cpu)cpuhp_bp_sync_dead (cpu); -tick_cleanup_dead_cpu (cpu); -/* * Callbacks must be re-integrated right away to the RCU state machine. * Otherwise an RCU callback could block a further teardown function
kernel/time/clockevents.c +11 -19
@@ -618,39 +618,30 @@ void clockevents_resume(void)#ifdef CONFIG_HOTPLUG_CPU -# ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST /** -* tick_offline_cpu - Take CPU out of the broadcast mechanism +* tick_offline_cpu - Shutdown all clock events related +* to this CPU and take it out of the +* broadcast mechanism. * @cpu: The outgoing CPU * -* Called on the outgoing CPU after it took itself offline. +* Called by the dying CPU during teardown. */ void tick_offline_cpu (unsigned int cpu) { -raw_spin_lock (&clockevents_lock); -tick_broadcast_offline (cpu); -raw_spin_unlock (&clockevents_lock); -} -# endif - -/** -* tick_cleanup_dead_cpu - Cleanup the tick and clockevents of a dead cpu -* @cpu: The dead CPU -*/ -void tick_cleanup_dead_cpu (int cpu) -{struct clock_event_device *dev, *tmp; -unsigned long flags; -raw_spin_lock_irqsave (&clockevents_lock, flags); +raw_spin_lock (&clockevents_lock); +tick_broadcast_offline (cpu);tick_shutdown (cpu); +/* * Unregister the clock event devices which were -* released from the users in the notify chain. +* released above. */ list_for_each_entry_safe (dev, tmp, &clockevents_released, list)list_del (&dev->list); +/* * Now check whether the CPU has left unused per cpu devices */
@@ -662,7 +653,8 @@ void tick_cleanup_dead_cpu(int cpu) list_del(&dev->list); } } -raw_spin_unlock_irqrestore (&clockevents_lock, flags); + +raw_spin_unlock (&clockevents_lock); }#endif
kernel/time/tick-internal.h +1 -2
@@ -25,6 +25,7 @@ extern int tick_do_timer_cpu __read_mostly;extern void tick_setup_periodic (struct clock_event_device *dev,int broadcast);extern void tick_handle_periodic (struct clock_event_device *dev);extern void tick_check_new_device (struct clock_event_device *dev); +extern void tick_offline_cpu (unsigned int cpu);extern void tick_shutdown (unsigned int cpu);extern void tick_suspend (void );extern void tick_resume (void );
@@ -142,10 +143,8 @@ static inline bool tick_broadcast_oneshot_available(void) { return tick_oneshot_#endif /* !(BROADCAST && ONESHOT) */ #if defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST ) && defined(CONFIG_HOTPLUG_CPU ) -extern void tick_offline_cpu (unsigned int cpu);extern void tick_broadcast_offline (unsigned int cpu);#else -static inline void tick_offline_cpu (unsigned int cpu) { }static inline void tick_broadcast_offline (unsigned int cpu) { }#endif
Re: [PATCH 02/10] clockevents: Shutdown and unregister current clockevents at CPUHP_AP_TICK_DYING
In reply to Frederic WeisbeckerQuoted 36 lines · Frederic Weisbecker
The way the clockevent devices are finally stopped while a CPU is offlining is currently chaotic. The layout being by order:
1)
tick_sched_timer_dying()stops the tick and the underlying clockevent but only for oneshot case. The periodic tick and its related clockevent still runs.2)
tick_broadcast_offline()detaches and stops the per-cpu oneshot broadcast and append it to the released list.3) Some individual clockevent drivers stop the clockevents (a second time if the tick is oneshot)
4) Once the CPU is dead, a control CPU remotely detaches and stops (a 3rd time if oneshot mode) the CPU clockevent and adds it to the released list.
5) The released list containing the broadcast device released on step 2) and the remotely detached clockevent from step 4) are unregistered.
These random events can be factorized if the current clockevent is detached and stopped by the dying CPU at the generic layer, that is from the dying CPU:
a) Stop the tick
b) Stop/detach the underlying per-cpu oneshot broadcast clockevent
c) Stop/detach the underlying clockevent
d) Release / unregister the clockevents from b) and c)
e) Release / unregister the remaining clockevents from the dying CPU. This part could be performed by the dying CPUThis way the drivers and the tick layer don't need to care about clockevent operations during cpuhotplug down. This also unifies the tick behaviour on offline CPUs between oneshot and periodic modes, avoiding offline ticks altogether for sanity.
Quoted 4 lines
Adopt the simplification and verify no further clockevent can be registered for the dying CPU after the final release.
Signed-off-by Frederic Weisbecker <[email protected]>
This patch landed in today's linux-next as commit c80e6e9de6ae ("clockevents: Shutdown and unregister current clockevents at CPUHP_AP_TICK_DYING"). Unfortunately it breaks booting most of my test systems (ARM 32bit, ARM 64bit and RISC-V 64bit). Reverting $subject on top of linux-next (and fixing the merge conflict) seems to be restoring proper boot sequence. Here is a log observed on QEMU's ARM64 'virt' machine:
--->8---
smp: Bringing up secondary CPUs ...
Detected PIPT I-cache on CPU1
------------[ cut here ]------------ WARNING: CPU: 1 PID: 0 at kernel/time/clockevents.c:455 clockevents_register_device+0x170/0x180 Modules linked in: CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Not tainted 6.12.0-rc1+ #9324 Hardware name: linux,dummy-virt (DT) pstate: 200003c5 (nzCv DAIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : clockevents_register_device+0x170/0x180 lr : clockevents_config_and_register+0x2c/0x3c ... Call trace: clockevents_register_device+0x170/0x180 clockevents_config_and_register+0x2c/0x3c arch_timer_starting_cpu+0x170/0x294 cpuhp_invoke_callback+0x16c/0x2b0 __cpuhp_invoke_callback_range+0x90/0x118 notify_cpu_starting+0x80/0xac secondary_start_kernel+0xe0/0x15c __secondary_switched+0xb8/0xbc irq event stamp: 0 hardirqs last enabled at (0): [<0000000000000000>] 0x0 hardirqs last disabled at (0): [<ffff800080050f2c>] copy_process+0x67c/0x198c softirqs last enabled at (0): [<ffff800080050f2c>] copy_process+0x67c/0x198c softirqs last disabled at (0): [<0000000000000000>] 0x0 ---[ end trace 0000000000000000 ]---
CPU1: Booted secondary processor 0x0000000001 [0x411fd070]
smp: Brought up 1 node, 2 CPUs
SMP: Total of 2 processors activated.
CPU: All CPU(s) started at EL1
CPU features: detected: 32-bit EL0 Support
CPU features: detected: CRC32 instructions
alternatives: applying system-wide alternatives
Memory: 855068K/1048576K available (19008K kernel code, 6526K rwdata, 15852K rodata, 13824K init, 11422K bss, 90156K reserved, 98304K cma-reserved)
devtmpfs: initialized
Callback from call_rcu_tasks() invoked.
Running RCU synchronous self tests
Running RCU synchronous self tests
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff,max_idle_ns: 7645041785100000 ns
futex hash table entries: 512 (order: 4, 65536 bytes, linear) 16048 pages in range for non-PLT usage
507568 pages in range for PLT usage
pinctrl core: initialized pinctrl subsystem
NET: Registered PF_NETLINK/PF_ROUTE protocol family
DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
audit: initializing netlink subsys (disabled)
audit: type=2000 audit(0.580:1): state=initialized audit_enabled=0 res=1thermal_sys: Registered thermal governor 'step_wise'thermal_sys: Registered thermal governor 'power_allocator'
cpuidle: using governor menu
hw-breakpoint: found 6 breakpoint and 4 watchpoint registers. ASID allocator initialised with 65536 entries
Serial: AMBA PL011 UART driver
9000000.pl011: ttyAMA0 at MMIO 0x9000000 (irq = 13, base_baud = 0) is a PL011 rev1
printk: legacy console [ttyAMA0] enabled
HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
iommu: Default domain type: Translated
iommu: DMA domain TLB invalidation policy: strict mode
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usbpps_core: LinuxPPS API ver. 1 registeredpps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
PTP clock support registered
EDAC MC: Ver: 3.0.0scmi_core: SCMI protocol bus registered
FPGA manager framework
Advanced Linux Sound Architecture Driver Initialized.
vgaarb: loaded
clocksource: Switched to clocksource arch_sys_counter
VFS: Disk quotas dquot_6.6.0
VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
NET: Registered PF_INET protocol family
IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear) tcp_listen_portaddr_hash hash table entries: 512 (order: 3, 36864 bytes, linear)
Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear) TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear) TCP bind hash table entries: 8192 (order: 8, 1179648 bytes, linear)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 4, 81920 bytes, linear) UDP-Lite hash table entries: 512 (order: 4, 81920 bytes, linear)
NET: Registered PF_UNIX/PF_LOCAL protocol family
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp-with-tls transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 0 bytes, default 64
Initialise system trusted keyrings
workingset: timestamp_bits=42 max_order=18 bucket_order=0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registerednfs4filelayout_init: NFSv4 File Layout Driver Registering...nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering... 9p: Installing v9fs 9p2000 file system support
Key type asymmetric registered
Asymmetric key parser 'x509' registered
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244) io scheduler mq-deadline registered
io scheduler kyber registered
io scheduler bfq registeredpl061_gpio 9030000.pl061: PL061 GPIO chip registered
ledtrig-cpu: registered to indicate activity on CPUs pci-host-generic 4010000000.pcie: host bridge /pcie@10000000 ranges:
pci-host-generic 4010000000.pcie: IO 0x003eff0000..0x003effffff -> 0x0000000000
pci-host-generic 4010000000.pcie: MEM 0x0010000000..0x003efeffff -> 0x0010000000
pci-host-generic 4010000000.pcie: MEM 0x8000000000..0xffffffffff -> 0x8000000000
pci-host-generic 4010000000.pcie: Memory resource size exceeds max for 32 bits
pci-host-generic 4010000000.pcie: ECAM at [mem 0x4010000000-0x401fffffff] for [bus 00-ff]
pci-host-generic 4010000000.pcie: PCI host bridge to bus 0000:00 pci_bus 0000:00: root bus resource [bus 00-ff]pci_bus 0000:00: root bus resource [io 0x0000-0xffff]pci_bus 0000:00: root bus resource [mem 0x10000000-0x3efeffff] pci_bus 0000:00: root bus resource [mem 0x8000000000-0xffffffffff] pci 0000:00:00.0: [1b36:0008] type 00 class 0x060000 conventional PCI endpointpci_bus 0000:00: resource 4 [io 0x0000-0xffff]pci_bus 0000:00: resource 5 [mem 0x10000000-0x3efeffff]pci_bus 0000:00: resource 6 [mem 0x8000000000-0xffffffffff]
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabledmsm_serial: driver initialized
SuperH (H)SCI(F) driver initialized
STM32 USART driver initialized
brd: module loaded
loop: module loadedvirtio_blk virtio2: 1/0/0 default/read/poll queuesvirtio_blk virtio2: [vda] 15106048 512-byte logical blocks (7.73 GB/7.20 GiB)virtio_blk virtio3: 1/0/0 default/read/poll queuesvirtio_blk virtio3: [vdb] 154688 512-byte logical blocks (79.2 MB/75.5 MiB)
megasas: 07.727.03.00-rc1
physmap-flash 0.flash: physmap platform flash device: [mem 0x00000000-0x03ffffff]
0.flash: Found 2 x16 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000
Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
physmap-flash 0.flash: physmap platform flash device: [mem 0x04000000-0x07ffffff]
0.flash: Found 2 x16 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000
Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
Concatenating MTD devices:
(0): "0.flash"
(1): "0.flash"
into device "0.flash"
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 1-...!: (0 ticks this GP) idle=81c8/0/0x0 softirq=0/0 fqs=0 (false positive?)
rcu: (detected by 0, t=6502 jiffies, g=-1167, q=164 ncpus=2) Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1 skipped: idling at default_idle_call+0xa8/0x1f0
rcu: rcu_preempt kthread timer wakeup didn't happen for 6501 jiffies! g-1167 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402
rcu: Possible timer handling issue on cpu=1 timer-softirq=0
rcu: rcu_preempt kthread starved for 6502 jiffies! g-1167 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=1
rcu: Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior.
rcu: RCU grace-period kthread stack dump:
task:rcu_preempt state:I stack:0 pid:16 tgid:16 ppid:2 flags:0x00000008
Call trace: __switch_to+0xf4/0x168 __schedule+0x2ec/0xb90 schedule+0x50/0x15c schedule_timeout+0x7c/0x100 rcu_gp_fqs_loop+0x170/0x8b8 rcu_gp_kthread+0x27c/0x310 kthread+0x124/0x128 ret_from_fork+0x10/0x20
--->8---
Quoted 123 lines
--- include/linux/tick.h | 2 -- kernel/cpu.c | 2 -- kernel/time/clockevents.c | 33 ++++++++++++++------------------- kernel/time/tick-internal.h | 3 +-- 4 files changed, 15 insertions(+), 25 deletions(-)include/linux/tick.h +0
-2@@ -20,12 +20,10 @@ extern void __init tick_init(void);extern void tick_suspend_local (void );/* Should be core only, but XEN resume magic and ARM BL switcher require it */ extern void tick_resume_local (void ); -extern void tick_cleanup_dead_cpu (int cpu);#else /* CONFIG_GENERIC_CLOCKEVENTS */ static inline void tick_init (void ) { }static inline void tick_suspend_local (void ) { }static inline void tick_resume_local (void ) { } -static inline void tick_cleanup_dead_cpu (int cpu) { }#endif /* !CONFIG_GENERIC_CLOCKEVENTS */ #if defined(CONFIG_GENERIC_CLOCKEVENTS ) && defined(CONFIG_HOTPLUG_CPU )kernel/cpu.c +0
-2@@ -1338,8 +1338,6 @@ static int takedown_cpu(unsigned int cpu)cpuhp_bp_sync_dead (cpu); -tick_cleanup_dead_cpu (cpu); -/* * Callbacks must be re-integrated right away to the RCU state machine. * Otherwise an RCU callback could block a further teardown function kernel/time/clockevents.c +14
-19@@ -452,6 +452,9 @@ void clockevents_register_device(struct clock_event_device *dev) {unsigned long flags; +if (WARN_ON_ONCE (cpu_is_offline (raw_smp_processor_id ()))) +return ; +/* Initialize state to DETACHED */ clockevent_set_state (dev,CLOCK_EVT_STATE_DETACHED );@@ -618,39 +621,30 @@ void clockevents_resume(void)#ifdef CONFIG_HOTPLUG_CPU -# ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST /** -* tick_offline_cpu - Take CPU out of the broadcast mechanism +* tick_offline_cpu - Shutdown all clock events related +* to this CPU and take it out of the +* broadcast mechanism. * @cpu: The outgoing CPU * -* Called on the outgoing CPU after it took itself offline. +* Called by the dying CPU during teardown. */ void tick_offline_cpu (unsigned int cpu) -{ -raw_spin_lock (&clockevents_lock); -tick_broadcast_offline (cpu); -raw_spin_unlock (&clockevents_lock); -} -# endif - -/** -* tick_cleanup_dead_cpu - Cleanup the tick and clockevents of a dead cpu -* @cpu: The dead CPU -*/ -void tick_cleanup_dead_cpu (int cpu) {struct clock_event_device *dev, *tmp; -unsigned long flags; -raw_spin_lock_irqsave (&clockevents_lock, flags); +raw_spin_lock (&clockevents_lock); +tick_broadcast_offline (cpu);tick_shutdown (cpu); +/* * Unregister the clock event devices which were -* released from the users in the notify chain. +* released above. */ list_for_each_entry_safe (dev, tmp, &clockevents_released, list)list_del (&dev->list); +/* * Now check whether the CPU has left unused per cpu devices */ @@ -662,7 +656,8 @@ void tick_cleanup_dead_cpu(int cpu) list_del(&dev->list); } } -raw_spin_unlock_irqrestore (&clockevents_lock, flags); + +raw_spin_unlock (&clockevents_lock); }#endif kernel/time/tick-internal.h +1
-0@@ -25,6 +25,7 @@ extern int tick_do_timer_cpu __read_mostly;extern void tick_setup_periodic (struct clock_event_device *dev,int broadcast);extern void tick_handle_periodic (struct clock_event_device *dev);extern void tick_check_new_device (struct clock_event_device *dev); +extern void tick_offline_cpu (unsigned int cpu);extern void tick_shutdown (unsigned int cpu);extern void tick_suspend (void );extern void tick_resume (void );
kernel/time/tick-internal.h static inline bool tick_broadcast_oneshot_available(void) { return tick_oneshot_ · line 150
Quoted 10 lines
kernel/time/tick-internal.h +0
-2@@ -142,10 +143,8 @@ static inline bool tick_broadcast_oneshot_available(void) { return tick_oneshot_#endif /* !(BROADCAST && ONESHOT) */ #if defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST ) && defined(CONFIG_HOTPLUG_CPU ) -extern void tick_offline_cpu (unsigned int cpu);extern void tick_broadcast_offline (unsigned int cpu);#else -static inline void tick_offline_cpu (unsigned int cpu) { }static inline void tick_broadcast_offline (unsigned int cpu) { }#endif
Best regards
Signature · 2 lines
Marek Szyprowski, PhD Samsung R&D Institute Poland
Re: [PATCH 02/10] clockevents: Shutdown and unregister current clockevents at CPUHP_AP_TICK_DYING
Quoted 7 lines · Marek Szyprowski
On 29.10.2024 13:54, Frederic Weisbecker wrote:
This patch landed in today's linux-next as commitc80e6e9de6ae("clockevents: Shutdown and unregister current clockevents atCPUHP_AP_TICK_DYING"). Unfortunately it breaks booting most of my test systems (ARM 32bit, ARM 64bit and RISC-V 64bit). Reverting $subject on top of linux-next (and fixing the merge conflict) seems to be restoring proper boot sequence. Here is a log observed on QEMU's ARM64 'virt' machine:
It's fixed already. Refetch the branch (force updated).
Thanks,
tglx
Frederic Weisbecker
maintainerPATCH 3/10 tick: Remove now unneeded low-res tick stop on CPUHP_AP_TICK_DYING
In reply to Frederic WeisbeckerThe generic clockevent layer now detaches and stops the underlying clockevent from the dying CPU, unifying the tick behaviour for both periodic and oneshot mode on offline CPUs. There is no more need for the tick layer to care about that.
--- kernel/time/tick-sched.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-)
kernel/time/tick-sched.c +6 -19
@@ -311,14 +311,6 @@ static enum hrtimer_restart tick_nohz_handler(struct hrtimer *timer)return HRTIMER_RESTART ; } -static void tick_sched_timer_cancel (struct tick_sched *ts) -{ -if (tick_sched_flag_test (ts,TS_FLAG_HIGHRES )) -hrtimer_cancel (&ts->sched_timer); -else if (tick_sched_flag_test (ts,TS_FLAG_NOHZ )) -tick_program_event (KTIME_MAX ,1 ); -} -#ifdef CONFIG_NO_HZ_FULL cpumask_var_t tick_nohz_full_mask;EXPORT_SYMBOL_GPL (tick_nohz_full_mask);
@@ -1055,7 +1047,10 @@ static void tick_nohz_stop_tick(struct tick_sched *ts, int cpu)* the tick timer. */ if (unlikely (expires ==KTIME_MAX )) { -tick_sched_timer_cancel (ts); +if (tick_sched_flag_test (ts,TS_FLAG_HIGHRES )) +hrtimer_cancel (&ts->sched_timer); +else +tick_program_event (KTIME_MAX ,1 );return ; }
@@ -1604,21 +1599,13 @@ void tick_setup_sched_timer(bool hrtimer)*/ void tick_sched_timer_dying (int cpu) { -struct tick_device *td = &per_cpu (tick_cpu_device, cpu);struct tick_sched *ts = &per_cpu (tick_cpu_sched, cpu); -struct clock_event_device *dev = td->evtdev;ktime_t idle_sleeptime, iowait_sleeptime;unsigned long idle_calls, idle_sleeps;/* This must happen before hrtimers are migrated! */ -tick_sched_timer_cancel (ts); - -/* -* If the clockevents doesn't support CLOCK_EVT_STATE_ONESHOT_STOPPED, -* make sure not to call low-res tick handler. -*/ -if (tick_sched_flag_test (ts,TS_FLAG_NOHZ )) - dev->event_handler = clockevents_handle_noop; +if (tick_sched_flag_test (ts,TS_FLAG_HIGHRES )) +hrtimer_cancel (&ts->sched_timer); idle_sleeptime = ts->idle_sleeptime; iowait_sleeptime = ts->iowait_sleeptime;
Signature · 1 line
2.46.0
[tip: timers/core] tick: Remove now unneeded low-res tick stop on CPUHP_AP_TICK_DYING
The 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: 8d7784373a498aaeed597edaefda35fe40162e5d Gitweb: https://git.kernel.org/tip/8d7784373a498aaeed597edaefda35fe40162e5d Author: Frederic Weisbecker <[email protected]> AuthorDate: Tue, 29 Oct 2024 13:54:44 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 30 Oct 2024 21:02:21 +01:00
tick: Remove now unneeded low-res tick stop on CPUHP_AP_TICK_DYING
The generic clockevent layer now detaches and stops the underlying clockevent from the dying CPU, unifying the tick behaviour for both periodic and oneshot mode on offline CPUs. There is no more need for the tick layer to care about that.
--- kernel/time/tick-sched.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-)
kernel/time/tick-sched.c +6 -19
@@ -311,14 +311,6 @@ static enum hrtimer_restart tick_nohz_handler(struct hrtimer *timer)return HRTIMER_RESTART ; } -static void tick_sched_timer_cancel (struct tick_sched *ts) -{ -if (tick_sched_flag_test (ts,TS_FLAG_HIGHRES )) -hrtimer_cancel (&ts->sched_timer); -else if (tick_sched_flag_test (ts,TS_FLAG_NOHZ )) -tick_program_event (KTIME_MAX ,1 ); -} -#ifdef CONFIG_NO_HZ_FULL cpumask_var_t tick_nohz_full_mask;EXPORT_SYMBOL_GPL (tick_nohz_full_mask);
@@ -1055,7 +1047,10 @@ static void tick_nohz_stop_tick(struct tick_sched *ts, int cpu)* the tick timer. */ if (unlikely (expires ==KTIME_MAX )) { -tick_sched_timer_cancel (ts); +if (tick_sched_flag_test (ts,TS_FLAG_HIGHRES )) +hrtimer_cancel (&ts->sched_timer); +else +tick_program_event (KTIME_MAX ,1 );return ; }
@@ -1604,21 +1599,13 @@ void tick_setup_sched_timer(bool hrtimer)*/ void tick_sched_timer_dying (int cpu) { -struct tick_device *td = &per_cpu (tick_cpu_device, cpu);struct tick_sched *ts = &per_cpu (tick_cpu_sched, cpu); -struct clock_event_device *dev = td->evtdev;ktime_t idle_sleeptime, iowait_sleeptime;unsigned long idle_calls, idle_sleeps;/* This must happen before hrtimers are migrated! */ -tick_sched_timer_cancel (ts); - -/* -* If the clockevents doesn't support CLOCK_EVT_STATE_ONESHOT_STOPPED, -* make sure not to call low-res tick handler. -*/ -if (tick_sched_flag_test (ts,TS_FLAG_NOHZ )) - dev->event_handler = clockevents_handle_noop; +if (tick_sched_flag_test (ts,TS_FLAG_HIGHRES )) +hrtimer_cancel (&ts->sched_timer); idle_sleeptime = ts->idle_sleeptime; iowait_sleeptime = ts->iowait_sleeptime;
[tip: timers/core] tick: Remove now unneeded low-res tick stop on CPUHP_AP_TICK_DYING
In reply to Frederic WeisbeckerThe 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: a6347864d97506a021c469dad35875088edc03fc Gitweb: https://git.kernel.org/tip/a6347864d97506a021c469dad35875088edc03fc Author: Frederic Weisbecker <[email protected]> AuthorDate: Tue, 29 Oct 2024 13:54:44 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 31 Oct 2024 10:41:42 +01:00
tick: Remove now unneeded low-res tick stop on CPUHP_AP_TICK_DYING
The generic clockevent layer now detaches and stops the underlying clockevent from the dying CPU, unifying the tick behaviour for both periodic and oneshot mode on offline CPUs. There is no more need for the tick layer to care about that.
--- kernel/time/tick-sched.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-)
kernel/time/tick-sched.c +6 -19
@@ -311,14 +311,6 @@ static enum hrtimer_restart tick_nohz_handler(struct hrtimer *timer)return HRTIMER_RESTART ; } -static void tick_sched_timer_cancel (struct tick_sched *ts) -{ -if (tick_sched_flag_test (ts,TS_FLAG_HIGHRES )) -hrtimer_cancel (&ts->sched_timer); -else if (tick_sched_flag_test (ts,TS_FLAG_NOHZ )) -tick_program_event (KTIME_MAX ,1 ); -} -#ifdef CONFIG_NO_HZ_FULL cpumask_var_t tick_nohz_full_mask;EXPORT_SYMBOL_GPL (tick_nohz_full_mask);
@@ -1055,7 +1047,10 @@ static void tick_nohz_stop_tick(struct tick_sched *ts, int cpu)* the tick timer. */ if (unlikely (expires ==KTIME_MAX )) { -tick_sched_timer_cancel (ts); +if (tick_sched_flag_test (ts,TS_FLAG_HIGHRES )) +hrtimer_cancel (&ts->sched_timer); +else +tick_program_event (KTIME_MAX ,1 );return ; }
@@ -1604,21 +1599,13 @@ void tick_setup_sched_timer(bool hrtimer)*/ void tick_sched_timer_dying (int cpu) { -struct tick_device *td = &per_cpu (tick_cpu_device, cpu);struct tick_sched *ts = &per_cpu (tick_cpu_sched, cpu); -struct clock_event_device *dev = td->evtdev;ktime_t idle_sleeptime, iowait_sleeptime;unsigned long idle_calls, idle_sleeps;/* This must happen before hrtimers are migrated! */ -tick_sched_timer_cancel (ts); - -/* -* If the clockevents doesn't support CLOCK_EVT_STATE_ONESHOT_STOPPED, -* make sure not to call low-res tick handler. -*/ -if (tick_sched_flag_test (ts,TS_FLAG_NOHZ )) - dev->event_handler = clockevents_handle_noop; +if (tick_sched_flag_test (ts,TS_FLAG_HIGHRES )) +hrtimer_cancel (&ts->sched_timer); idle_sleeptime = ts->idle_sleeptime; iowait_sleeptime = ts->iowait_sleeptime;
Frederic Weisbecker
maintainerPATCH 4/10 ARM: smp_twd: Remove clockevents shutdown call on offlining
In reply to Frederic WeisbeckerThe clockevents core already detached and unregistered it at this stage.
--- arch/arm/kernel/smp_twd.c | 1 - 1 file changed, 1 deletion(-)
arch/arm/kernel/smp_twd.c +0 -1
@@ -93,7 +93,6 @@ static void twd_timer_stop(void) {struct clock_event_device *clk =raw_cpu_ptr (twd_evt); -twd_shutdown (clk);disable_percpu_irq (clk->irq); }
Signature · 1 line
2.46.0
[tip: timers/core] ARM: smp_twd: Remove clockevents shutdown call on offlining
The 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: f17faf114efbe9d99d8e093cb20f8b58a0f9f31f Gitweb: https://git.kernel.org/tip/f17faf114efbe9d99d8e093cb20f8b58a0f9f31f Author: Frederic Weisbecker <[email protected]> AuthorDate: Tue, 29 Oct 2024 13:54:45 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 30 Oct 2024 21:02:22 +01:00
ARM: smp_twd: Remove clockevents shutdown call on offlining
The clockevents core already detached and unregistered it at this stage.
--- arch/arm/kernel/smp_twd.c | 1 - 1 file changed, 1 deletion(-)
arch/arm/kernel/smp_twd.c +0 -1
@@ -93,7 +93,6 @@ static void twd_timer_stop(void) {struct clock_event_device *clk =raw_cpu_ptr (twd_evt); -twd_shutdown (clk);disable_percpu_irq (clk->irq); }
[tip: timers/core] ARM: smp_twd: Remove clockevents shutdown call on offlining
In reply to Frederic WeisbeckerThe 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: 900053d9eedfc3f731e59a27d24da938907f5407 Gitweb: https://git.kernel.org/tip/900053d9eedfc3f731e59a27d24da938907f5407 Author: Frederic Weisbecker <[email protected]> AuthorDate: Tue, 29 Oct 2024 13:54:45 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 31 Oct 2024 10:41:42 +01:00
ARM: smp_twd: Remove clockevents shutdown call on offlining
The clockevents core already detached and unregistered it at this stage.
--- arch/arm/kernel/smp_twd.c | 1 - 1 file changed, 1 deletion(-)
arch/arm/kernel/smp_twd.c +0 -1
@@ -93,7 +93,6 @@ static void twd_timer_stop(void) {struct clock_event_device *clk =raw_cpu_ptr (twd_evt); -twd_shutdown (clk);disable_percpu_irq (clk->irq); }
Frederic Weisbecker
maintainerPATCH 5/10 clocksource/drivers/arm_arch_timer: Remove clockevents shutdown call on offlining
In reply to Frederic WeisbeckerThe clockevents core already detached and unregistered it at this stage.
--- drivers/clocksource/arm_arch_timer.c | 2 -- 1 file changed, 2 deletions(-)
drivers/clocksource/arm_arch_timer.c +0 -2
@@ -1179,8 +1179,6 @@ static void arch_timer_stop(struct clock_event_device *clk)disable_percpu_irq (arch_timer_ppi[arch_timer_uses_ppi]);if (arch_timer_has_nonsecure_ppi ())disable_percpu_irq (arch_timer_ppi[ARCH_TIMER_PHYS_NONSECURE_PPI ]); - - clk->set_state_shutdown (clk); }static int arch_timer_dying_cpu (unsigned int cpu)
Signature · 1 line
2.46.0
[tip: timers/core] clocksource/drivers/arm_arch_timer: Remove clockevents shutdown call on offlining
The 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: 5f2fa3a59a715ccd7dfe041fe99d21bd504dd4f9 Gitweb: https://git.kernel.org/tip/5f2fa3a59a715ccd7dfe041fe99d21bd504dd4f9 Author: Frederic Weisbecker <[email protected]> AuthorDate: Tue, 29 Oct 2024 13:54:46 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 30 Oct 2024 21:02:22 +01:00
clocksource/drivers/arm_arch_timer: Remove clockevents shutdown call on offlining
The clockevents core already detached and unregistered it at this stage.
--- drivers/clocksource/arm_arch_timer.c | 2 -- 1 file changed, 2 deletions(-)
drivers/clocksource/arm_arch_timer.c +0 -2
@@ -1179,8 +1179,6 @@ static void arch_timer_stop(struct clock_event_device *clk)disable_percpu_irq (arch_timer_ppi[arch_timer_uses_ppi]);if (arch_timer_has_nonsecure_ppi ())disable_percpu_irq (arch_timer_ppi[ARCH_TIMER_PHYS_NONSECURE_PPI ]); - - clk->set_state_shutdown (clk); }static int arch_timer_dying_cpu (unsigned int cpu)
[tip: timers/core] clocksource/drivers/arm_arch_timer: Remove clockevents shutdown call on offlining
In reply to Frederic WeisbeckerThe 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: 78b5c2ca5f27534dc04fbbe0b491dd3bd4ec814b Gitweb: https://git.kernel.org/tip/78b5c2ca5f27534dc04fbbe0b491dd3bd4ec814b Author: Frederic Weisbecker <[email protected]> AuthorDate: Tue, 29 Oct 2024 13:54:46 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 31 Oct 2024 10:41:42 +01:00
clocksource/drivers/arm_arch_timer: Remove clockevents shutdown call on offlining
The clockevents core already detached and unregistered it at this stage.
--- drivers/clocksource/arm_arch_timer.c | 2 -- 1 file changed, 2 deletions(-)
drivers/clocksource/arm_arch_timer.c +0 -2
@@ -1179,8 +1179,6 @@ static void arch_timer_stop(struct clock_event_device *clk)disable_percpu_irq (arch_timer_ppi[arch_timer_uses_ppi]);if (arch_timer_has_nonsecure_ppi ())disable_percpu_irq (arch_timer_ppi[ARCH_TIMER_PHYS_NONSECURE_PPI ]); - - clk->set_state_shutdown (clk); }static int arch_timer_dying_cpu (unsigned int cpu)
Frederic Weisbecker
maintainerPATCH 6/10 clocksource/drivers/arm_global_timer: Remove clockevents shutdown call on offlining
In reply to Frederic WeisbeckerThe clockevents core already detached and unregistered it at this stage.
--- drivers/clocksource/arm_global_timer.c | 1 - 1 file changed, 1 deletion(-)
drivers/clocksource/arm_global_timer.c +0 -1
@@ -195,7 +195,6 @@ static int gt_dying_cpu(unsigned int cpu) {struct clock_event_device *clk =this_cpu_ptr (gt_evt); -gt_clockevent_shutdown (clk);disable_percpu_irq (clk->irq);return 0 ; }
Signature · 1 line
2.46.0
[tip: timers/core] clocksource/drivers/arm_global_timer: Remove clockevents shutdown call on offlining
The 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: 8dfb95f57be9a0ef163d0202e106fdfbf2634b99 Gitweb: https://git.kernel.org/tip/8dfb95f57be9a0ef163d0202e106fdfbf2634b99 Author: Frederic Weisbecker <[email protected]> AuthorDate: Tue, 29 Oct 2024 13:54:47 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 30 Oct 2024 21:02:22 +01:00
clocksource/drivers/arm_global_timer: Remove clockevents shutdown call on offlining
The clockevents core already detached and unregistered it at this stage.
--- drivers/clocksource/arm_global_timer.c | 1 - 1 file changed, 1 deletion(-)
drivers/clocksource/arm_global_timer.c +0 -1
@@ -195,7 +195,6 @@ static int gt_dying_cpu(unsigned int cpu) {struct clock_event_device *clk =this_cpu_ptr (gt_evt); -gt_clockevent_shutdown (clk);disable_percpu_irq (clk->irq);return 0 ; }
[tip: timers/core] clocksource/drivers/arm_global_timer: Remove clockevents shutdown call on offlining
In reply to Frederic WeisbeckerThe 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: 15b810e0496eba62ca5a70d1545d1e4757c0a1ee Gitweb: https://git.kernel.org/tip/15b810e0496eba62ca5a70d1545d1e4757c0a1ee Author: Frederic Weisbecker <[email protected]> AuthorDate: Tue, 29 Oct 2024 13:54:47 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 31 Oct 2024 10:41:42 +01:00
clocksource/drivers/arm_global_timer: Remove clockevents shutdown call on offlining
The clockevents core already detached and unregistered it at this stage.
--- drivers/clocksource/arm_global_timer.c | 1 - 1 file changed, 1 deletion(-)
drivers/clocksource/arm_global_timer.c +0 -1
@@ -195,7 +195,6 @@ static int gt_dying_cpu(unsigned int cpu) {struct clock_event_device *clk =this_cpu_ptr (gt_evt); -gt_clockevent_shutdown (clk);disable_percpu_irq (clk->irq);return 0 ; }
Frederic Weisbecker
maintainerPATCH 7/10 clocksource/drivers/exynos_mct: Remove clockevents shutdown call on offlining
In reply to Frederic WeisbeckerThe clockevents core already detached and unregistered it at this stage.
--- drivers/clocksource/exynos_mct.c | 1 - 1 file changed, 1 deletion(-)
drivers/clocksource/exynos_mct.c +0 -1
@@ -496,7 +496,6 @@ static int exynos4_mct_dying_cpu(unsigned int cpu)per_cpu_ptr (&percpu_mct_tick, cpu);struct clock_event_device *evt = &mevt->evt; - evt->set_state_shutdown (evt);if (mct_int_type ==MCT_INT_SPI ) {if (evt->irq !=-1 )disable_irq_nosync (evt->irq);
Signature · 1 line
2.46.0
[tip: timers/core] clocksource/drivers/exynos_mct: Remove clockevents shutdown call on offlining
The 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: 0f3032a3d8bb33ae98106024d289f03fb390fa34 Gitweb: https://git.kernel.org/tip/0f3032a3d8bb33ae98106024d289f03fb390fa34 Author: Frederic Weisbecker <[email protected]> AuthorDate: Tue, 29 Oct 2024 13:54:48 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 30 Oct 2024 21:02:22 +01:00
clocksource/drivers/exynos_mct: Remove clockevents shutdown call on offlining
The clockevents core already detached and unregistered it at this stage.
--- drivers/clocksource/exynos_mct.c | 1 - 1 file changed, 1 deletion(-)
drivers/clocksource/exynos_mct.c +0 -1
@@ -496,7 +496,6 @@ static int exynos4_mct_dying_cpu(unsigned int cpu)per_cpu_ptr (&percpu_mct_tick, cpu);struct clock_event_device *evt = &mevt->evt; - evt->set_state_shutdown (evt);if (mct_int_type ==MCT_INT_SPI ) {if (evt->irq !=-1 )disable_irq_nosync (evt->irq);
[tip: timers/core] clocksource/drivers/exynos_mct: Remove clockevents shutdown call on offlining
In reply to Frederic WeisbeckerThe 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: ba23b6c7f97428dc5dd1898edbae397f1a524b13 Gitweb: https://git.kernel.org/tip/ba23b6c7f97428dc5dd1898edbae397f1a524b13 Author: Frederic Weisbecker <[email protected]> AuthorDate: Tue, 29 Oct 2024 13:54:48 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 31 Oct 2024 10:41:43 +01:00
clocksource/drivers/exynos_mct: Remove clockevents shutdown call on offlining
The clockevents core already detached and unregistered it at this stage.
--- drivers/clocksource/exynos_mct.c | 1 - 1 file changed, 1 deletion(-)
drivers/clocksource/exynos_mct.c +0 -1
@@ -496,7 +496,6 @@ static int exynos4_mct_dying_cpu(unsigned int cpu)per_cpu_ptr (&percpu_mct_tick, cpu);struct clock_event_device *evt = &mevt->evt; - evt->set_state_shutdown (evt);if (mct_int_type ==MCT_INT_SPI ) {if (evt->irq !=-1 )disable_irq_nosync (evt->irq);
Frederic Weisbecker
maintainerPATCH 8/10 clocksource/drivers/armada-370-xp: Remove clockevents shutdown call on offlining
In reply to Frederic WeisbeckerThe clockevents core already detached and unregistered it at this stage.
--- drivers/clocksource/timer-armada-370-xp.c | 1 - 1 file changed, 1 deletion(-)
drivers/clocksource/timer-armada-370-xp.c +0 -1
@@ -201,7 +201,6 @@ static int armada_370_xp_timer_dying_cpu(unsigned int cpu) {struct clock_event_device *evt =per_cpu_ptr (armada_370_xp_evt, cpu); - evt->set_state_shutdown (evt);disable_percpu_irq (evt->irq);return 0 ; }
Signature · 1 line
2.46.0
[tip: timers/core] clocksource/drivers/armada-370-xp: Remove clockevents shutdown call on offlining
The 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: 8eca91eb53cdf054d16b03c1cf8e78bf0a33f2da Gitweb: https://git.kernel.org/tip/8eca91eb53cdf054d16b03c1cf8e78bf0a33f2da Author: Frederic Weisbecker <[email protected]> AuthorDate: Tue, 29 Oct 2024 13:54:49 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 30 Oct 2024 21:02:22 +01:00
clocksource/drivers/armada-370-xp: Remove clockevents shutdown call on offlining
The clockevents core already detached and unregistered it at this stage.
--- drivers/clocksource/timer-armada-370-xp.c | 1 - 1 file changed, 1 deletion(-)
drivers/clocksource/timer-armada-370-xp.c +0 -1
@@ -201,7 +201,6 @@ static int armada_370_xp_timer_dying_cpu(unsigned int cpu) {struct clock_event_device *evt =per_cpu_ptr (armada_370_xp_evt, cpu); - evt->set_state_shutdown (evt);disable_percpu_irq (evt->irq);return 0 ; }
[tip: timers/core] clocksource/drivers/armada-370-xp: Remove clockevents shutdown call on offlining
In reply to Frederic WeisbeckerThe 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: 30f8c70a85bcb756b9247c27fff5f0fabf6d5c6e Gitweb: https://git.kernel.org/tip/30f8c70a85bcb756b9247c27fff5f0fabf6d5c6e Author: Frederic Weisbecker <[email protected]> AuthorDate: Tue, 29 Oct 2024 13:54:49 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 31 Oct 2024 10:41:43 +01:00
clocksource/drivers/armada-370-xp: Remove clockevents shutdown call on offlining
The clockevents core already detached and unregistered it at this stage.
--- drivers/clocksource/timer-armada-370-xp.c | 1 - 1 file changed, 1 deletion(-)
drivers/clocksource/timer-armada-370-xp.c +0 -1
@@ -201,7 +201,6 @@ static int armada_370_xp_timer_dying_cpu(unsigned int cpu) {struct clock_event_device *evt =per_cpu_ptr (armada_370_xp_evt, cpu); - evt->set_state_shutdown (evt);disable_percpu_irq (evt->irq);return 0 ; }
Frederic Weisbecker
maintainerPATCH 9/10 clocksource/drivers/qcom: Remove clockevents shutdown call on offlining
In reply to Frederic WeisbeckerThe clockevents core already detached and unregistered it at this stage.
--- drivers/clocksource/timer-qcom.c | 1 - 1 file changed, 1 deletion(-)
drivers/clocksource/timer-qcom.c +0 -1
@@ -130,7 +130,6 @@ static int msm_local_timer_dying_cpu(unsigned int cpu) {struct clock_event_device *evt =per_cpu_ptr (msm_evt, cpu); - evt->set_state_shutdown (evt);disable_percpu_irq (evt->irq);return 0 ; }
Signature · 1 line
2.46.0
[tip: timers/core] clocksource/drivers/qcom: Remove clockevents shutdown call on offlining
The 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: 31522de0f764246ed1e583aa3b2acebd1f7c05fd Gitweb: https://git.kernel.org/tip/31522de0f764246ed1e583aa3b2acebd1f7c05fd Author: Frederic Weisbecker <[email protected]> AuthorDate: Tue, 29 Oct 2024 13:54:50 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 30 Oct 2024 21:02:22 +01:00
clocksource/drivers/qcom: Remove clockevents shutdown call on offlining
The clockevents core already detached and unregistered it at this stage.
--- drivers/clocksource/timer-qcom.c | 1 - 1 file changed, 1 deletion(-)
drivers/clocksource/timer-qcom.c +0 -1
@@ -130,7 +130,6 @@ static int msm_local_timer_dying_cpu(unsigned int cpu) {struct clock_event_device *evt =per_cpu_ptr (msm_evt, cpu); - evt->set_state_shutdown (evt);disable_percpu_irq (evt->irq);return 0 ; }
[tip: timers/core] clocksource/drivers/qcom: Remove clockevents shutdown call on offlining
In reply to Frederic WeisbeckerThe 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: cd165ce8314f8b91b171c1f0d4cf144c0f88f757 Gitweb: https://git.kernel.org/tip/cd165ce8314f8b91b171c1f0d4cf144c0f88f757 Author: Frederic Weisbecker <[email protected]> AuthorDate: Tue, 29 Oct 2024 13:54:50 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 31 Oct 2024 10:41:43 +01:00
clocksource/drivers/qcom: Remove clockevents shutdown call on offlining
The clockevents core already detached and unregistered it at this stage.
--- drivers/clocksource/timer-qcom.c | 1 - 1 file changed, 1 deletion(-)
drivers/clocksource/timer-qcom.c +0 -1
@@ -130,7 +130,6 @@ static int msm_local_timer_dying_cpu(unsigned int cpu) {struct clock_event_device *evt =per_cpu_ptr (msm_evt, cpu); - evt->set_state_shutdown (evt);disable_percpu_irq (evt->irq);return 0 ; }
Frederic Weisbecker
maintainerPATCH 10/10 clocksource/drivers/timer-tegra: Remove clockevents shutdown call on offlining
In reply to Frederic WeisbeckerThe clockevents core already detached and unregistered it at this stage.
--- drivers/clocksource/timer-tegra.c | 1 - 1 file changed, 1 deletion(-)
drivers/clocksource/timer-tegra.c +0 -1
@@ -158,7 +158,6 @@ static int tegra_timer_stop(unsigned int cpu) {struct timer_of *to =per_cpu_ptr (&tegra_to, cpu); - to->clkevt.set_state_shutdown (&to->clkevt);disable_irq_nosync (to->clkevt.irq);return 0 ;
Signature · 1 line
2.46.0
[tip: timers/core] clocksource/drivers/timer-tegra: Remove clockevents shutdown call on offlining
The 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: 875cf0b1f0eb4fcd9007a0ac0891125d2ce9766b Gitweb: https://git.kernel.org/tip/875cf0b1f0eb4fcd9007a0ac0891125d2ce9766b Author: Frederic Weisbecker <[email protected]> AuthorDate: Tue, 29 Oct 2024 13:54:51 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 30 Oct 2024 21:02:22 +01:00
clocksource/drivers/timer-tegra: Remove clockevents shutdown call on offlining
The clockevents core already detached and unregistered it at this stage.
--- drivers/clocksource/timer-tegra.c | 1 - 1 file changed, 1 deletion(-)
drivers/clocksource/timer-tegra.c +0 -1
@@ -158,7 +158,6 @@ static int tegra_timer_stop(unsigned int cpu) {struct timer_of *to =per_cpu_ptr (&tegra_to, cpu); - to->clkevt.set_state_shutdown (&to->clkevt);disable_irq_nosync (to->clkevt.irq);return 0 ;
[tip: timers/core] clocksource/drivers/timer-tegra: Remove clockevents shutdown call on offlining
In reply to Frederic WeisbeckerThe 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: bf9a001fb8e46a23c43d4964523963e717d9e972 Gitweb: https://git.kernel.org/tip/bf9a001fb8e46a23c43d4964523963e717d9e972 Author: Frederic Weisbecker <[email protected]> AuthorDate: Tue, 29 Oct 2024 13:54:51 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 31 Oct 2024 10:41:43 +01:00
clocksource/drivers/timer-tegra: Remove clockevents shutdown call on offlining
The clockevents core already detached and unregistered it at this stage.
--- drivers/clocksource/timer-tegra.c | 1 - 1 file changed, 1 deletion(-)
drivers/clocksource/timer-tegra.c +0 -1
@@ -158,7 +158,6 @@ static int tegra_timer_stop(unsigned int cpu) {struct timer_of *to =per_cpu_ptr (&tegra_to, cpu); - to->clkevt.set_state_shutdown (&to->clkevt);disable_irq_nosync (to->clkevt.irq);return 0 ;