* [RFC PATCH 05/49] cpuidle: Move CPUHP_AP_CPU_PM_STARTING post stop_machine()
[not found] <20261019130856.49711-1-frederic@kernel.org>
@ 2026-10-19 13:08 ` Frederic Weisbecker
2026-10-19 13:08 ` [RFC PATCH 07/49] irqchip/bcm2836: Move CPUHP_AP_IRQ_BCM2836_STARTING " Frederic Weisbecker
` (11 subsequent siblings)
12 siblings, 0 replies; 13+ messages in thread
From: Frederic Weisbecker @ 2026-10-19 13:08 UTC (permalink / raw)
To: LKML
Cc: Frederic Weisbecker, Rafael J. Wysocki, Christian Loehle,
Daniel Lezcano, Lorenzo Pieralisi, Marco Crivellari,
Peter Zijlstra, Phil Auld, Sudeep Holla, Thomas Gleixner,
Ulf Hansson, Waiman Long, linux-arm-kernel, linux-pm
Between CPUHP_TEARDOWN_CPU and CPUHP_AP_OFFLINE, stop_machine executes
all the teardown callbacks while stopping all CPUs in the system. This
doesn't mix-up well with running RT or isolated tasks.
In order to transition smoothly from global stop_machine to finer
grained synchronization between teardown callbacks and the other CPUs,
a new stop machine post function has been introduced to be executed
after the main one with IRQs still disabled while other CPUs can exit
stop_machine().
The teardown callback here only touches local data and also the local
power device under its power lock. Therefore it should be safe to run
against other CPUs.
Move this teardown callback to post stop_machine() accordingly.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
---
kernel/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index f22afb213d6f..68eb8de820d5 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1275,7 +1275,7 @@ void clear_tasks_mm_cpumask(int cpu)
static int take_cpu_down(void *_param)
{
struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
- enum cpuhp_state target = max((int)st->target, CPUHP_AP_RCUTREE_DYING);
+ enum cpuhp_state target = max((int)st->target, CPUHP_AP_CPU_PM_STARTING);
int err, cpu = smp_processor_id();
/* Ensure this CPU doesn't handle any more interrupts. */
@@ -1303,7 +1303,7 @@ static int take_cpu_down_post(void *_param)
enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE);
int cpu = smp_processor_id();
- WARN_ON(st->state != CPUHP_AP_RCUTREE_DYING);
+ WARN_ON(st->state != CPUHP_AP_CPU_PM_STARTING);
/*
* Invoke the former CPU_DYING callbacks. DYING must not fail!
*/
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [RFC PATCH 07/49] irqchip/bcm2836: Move CPUHP_AP_IRQ_BCM2836_STARTING post stop_machine()
[not found] <20261019130856.49711-1-frederic@kernel.org>
2026-10-19 13:08 ` [RFC PATCH 05/49] cpuidle: Move CPUHP_AP_CPU_PM_STARTING post stop_machine() Frederic Weisbecker
@ 2026-10-19 13:08 ` Frederic Weisbecker
2026-10-19 13:08 ` [RFC PATCH 17/49] ARM: vfp: Move CPUHP_AP_ARM_VFP_STARTING " Frederic Weisbecker
` (10 subsequent siblings)
12 siblings, 0 replies; 13+ messages in thread
From: Frederic Weisbecker @ 2026-10-19 13:08 UTC (permalink / raw)
To: LKML
Cc: Frederic Weisbecker, Broadcom internal kernel review list,
Florian Fainelli, Marco Crivellari, Peter Zijlstra, Phil Auld,
Radu Rendec, Ray Jui, Scott Branden, Thomas Gleixner, Waiman Long,
linux-arm-kernel, linux-rpi-kernel
Between CPUHP_TEARDOWN_CPU and CPUHP_AP_OFFLINE, stop_machine executes
all the teardown callbacks while stopping all CPUs in the system. This
doesn't mix-up well with running RT or isolated tasks.
In order to transition smoothly from global stop_machine to finer
grained synchronization between teardown callbacks and the other CPUs,
a new stop machine post function has been introduced to be executed
after the main one with IRQs still disabled while other CPUs can exit
stop_machine().
The teardown callback here just masks the per-cpu IRQ in the chip and
shouldn't race with other CPUs.
Move it to post stop_machine() accordingly.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
---
kernel/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 293dbb73d940..db73cdfbf1d0 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1275,7 +1275,7 @@ void clear_tasks_mm_cpumask(int cpu)
static int take_cpu_down(void *_param)
{
struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
- enum cpuhp_state target = max((int)st->target, CPUHP_AP_IRQ_ARMADA_XP_STARTING);
+ enum cpuhp_state target = max((int)st->target, CPUHP_AP_IRQ_BCM2836_STARTING);
int err, cpu = smp_processor_id();
/* Ensure this CPU doesn't handle any more interrupts. */
@@ -1303,7 +1303,7 @@ static int take_cpu_down_post(void *_param)
enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE);
int cpu = smp_processor_id();
- WARN_ON(st->state != CPUHP_AP_IRQ_ARMADA_XP_STARTING);
+ WARN_ON(st->state != CPUHP_AP_IRQ_BCM2836_STARTING);
/*
* Invoke the former CPU_DYING callbacks. DYING must not fail!
*/
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [RFC PATCH 17/49] ARM: vfp: Move CPUHP_AP_ARM_VFP_STARTING post stop_machine()
[not found] <20261019130856.49711-1-frederic@kernel.org>
2026-10-19 13:08 ` [RFC PATCH 05/49] cpuidle: Move CPUHP_AP_CPU_PM_STARTING post stop_machine() Frederic Weisbecker
2026-10-19 13:08 ` [RFC PATCH 07/49] irqchip/bcm2836: Move CPUHP_AP_IRQ_BCM2836_STARTING " Frederic Weisbecker
@ 2026-10-19 13:08 ` Frederic Weisbecker
2026-10-19 13:08 ` [RFC PATCH 19/49] perf/arm_pmu: Move CPUHP_AP_PERF_ARM_STARTING " Frederic Weisbecker
` (9 subsequent siblings)
12 siblings, 0 replies; 13+ messages in thread
From: Frederic Weisbecker @ 2026-10-19 13:08 UTC (permalink / raw)
To: LKML
Cc: Frederic Weisbecker, Marco Crivellari, Peter Zijlstra, Phil Auld,
Russell King, Thomas Gleixner, Waiman Long, linux-arm-kernel
Between CPUHP_TEARDOWN_CPU and CPUHP_AP_OFFLINE, stop_machine executes
all the teardown callbacks while stopping all CPUs in the system. This
doesn't mix-up well with running RT or isolated tasks.
In order to transition smoothly from global stop_machine to finer
grained synchronization between teardown callbacks and the other CPUs,
a new stop machine post function has been introduced to be executed
after the main one with IRQs still disabled while other CPUs can exit
stop_machine().
The teardown callback here only removes the local VFP state which is
never accessed remotely. As such it can run concurrently with other
CPUs.
Move it to post stop_machine() accordingly.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
---
kernel/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index c20a822df803..b7f5d0683ff7 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1275,7 +1275,7 @@ void clear_tasks_mm_cpumask(int cpu)
static int take_cpu_down(void *_param)
{
struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
- enum cpuhp_state target = max((int)st->target, CPUHP_AP_PERF_XTENSA_STARTING);
+ enum cpuhp_state target = max((int)st->target, CPUHP_AP_ARM_VFP_STARTING);
int err, cpu = smp_processor_id();
/* Ensure this CPU doesn't handle any more interrupts. */
@@ -1303,7 +1303,7 @@ static int take_cpu_down_post(void *_param)
enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE);
int cpu = smp_processor_id();
- WARN_ON(st->state != CPUHP_AP_PERF_XTENSA_STARTING);
+ WARN_ON(st->state != CPUHP_AP_ARM_VFP_STARTING);
/*
* Invoke the former CPU_DYING callbacks. DYING must not fail!
*/
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [RFC PATCH 19/49] perf/arm_pmu: Move CPUHP_AP_PERF_ARM_STARTING post stop_machine()
[not found] <20261019130856.49711-1-frederic@kernel.org>
` (2 preceding siblings ...)
2026-10-19 13:08 ` [RFC PATCH 17/49] ARM: vfp: Move CPUHP_AP_ARM_VFP_STARTING " Frederic Weisbecker
@ 2026-10-19 13:08 ` Frederic Weisbecker
2026-10-19 13:08 ` [RFC PATCH 20/49] perf: RISC-V: Move CPUHP_AP_PERF_RISCV_STARTING " Frederic Weisbecker
` (8 subsequent siblings)
12 siblings, 0 replies; 13+ messages in thread
From: Frederic Weisbecker @ 2026-10-19 13:08 UTC (permalink / raw)
To: LKML
Cc: Frederic Weisbecker, Marco Crivellari, Mark Rutland,
Peter Zijlstra, Phil Auld, Thomas Gleixner, Waiman Long,
Will Deacon, linux-arm-kernel, linux-perf-users
Between CPUHP_TEARDOWN_CPU and CPUHP_AP_OFFLINE, stop_machine executes
all the teardown callbacks while stopping all CPUs in the system. This
doesn't mix-up well with running RT or isolated tasks.
In order to transition smoothly from global stop_machine to finer
grained synchronization between teardown callbacks and the other CPUs,
a new stop machine post function has been introduced to be executed
after the main one with IRQs still disabled while other CPUs can exit
stop_machine().
The teardown callback here just disables the IRQs for each PMUs, which
shouldn't expose any specific race while other CPUs are running.
Move it to post stop_machine() accordingly.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
---
kernel/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 7d7e2d1eda9b..95cc6655cf7b 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1275,7 +1275,7 @@ void clear_tasks_mm_cpumask(int cpu)
static int take_cpu_down(void *_param)
{
struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
- enum cpuhp_state target = max((int)st->target, CPUHP_AP_PERF_ARM_ACPI_STARTING);
+ enum cpuhp_state target = max((int)st->target, CPUHP_AP_PERF_ARM_STARTING);
int err, cpu = smp_processor_id();
/* Ensure this CPU doesn't handle any more interrupts. */
@@ -1303,7 +1303,7 @@ static int take_cpu_down_post(void *_param)
enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE);
int cpu = smp_processor_id();
- WARN_ON(st->state != CPUHP_AP_PERF_ARM_ACPI_STARTING);
+ WARN_ON(st->state != CPUHP_AP_PERF_ARM_STARTING);
/*
* Invoke the former CPU_DYING callbacks. DYING must not fail!
*/
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [RFC PATCH 20/49] perf: RISC-V: Move CPUHP_AP_PERF_RISCV_STARTING post stop_machine()
[not found] <20261019130856.49711-1-frederic@kernel.org>
` (3 preceding siblings ...)
2026-10-19 13:08 ` [RFC PATCH 19/49] perf/arm_pmu: Move CPUHP_AP_PERF_ARM_STARTING " Frederic Weisbecker
@ 2026-10-19 13:08 ` Frederic Weisbecker
2026-10-19 13:08 ` [RFC PATCH 21/49] ARM: l2c: Move CPUHP_AP_ARM_L2X0_STARTING " Frederic Weisbecker
` (7 subsequent siblings)
12 siblings, 0 replies; 13+ messages in thread
From: Frederic Weisbecker @ 2026-10-19 13:08 UTC (permalink / raw)
To: LKML
Cc: Frederic Weisbecker, Albert Ou, Alexandre Ghiti, Anup Patel,
Atish Patra, Marco Crivellari, Mark Rutland, Palmer Dabbelt,
Paul Walmsley, Peter Zijlstra, Phil Auld, Thomas Gleixner,
Waiman Long, Will Deacon, linux-arm-kernel, linux-perf-users,
linux-riscv
Between CPUHP_TEARDOWN_CPU and CPUHP_AP_OFFLINE, stop_machine executes
all the teardown callbacks while stopping all CPUs in the system. This
doesn't mix-up well with running RT or isolated tasks.
In order to transition smoothly from global stop_machine to finer
grained synchronization between teardown callbacks and the other CPUs,
a new stop machine post function has been introduced to be executed
after the main one with IRQs still disabled while other CPUs can exit
stop_machine().
The teardown callback here:
* Disables the per-cpu IRQ
* Disables user-mode access to the CPU counter
* Disables the shared memory snapshot of the CPU PMU.
All these operations are local to the CPU and should be able to execute
concurrently with other CPUs.
Move this teardown callback to post stop_machine() accordingly.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
---
kernel/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 95cc6655cf7b..c69a265e4383 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1275,7 +1275,7 @@ void clear_tasks_mm_cpumask(int cpu)
static int take_cpu_down(void *_param)
{
struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
- enum cpuhp_state target = max((int)st->target, CPUHP_AP_PERF_ARM_STARTING);
+ enum cpuhp_state target = max((int)st->target, CPUHP_AP_PERF_RISCV_STARTING);
int err, cpu = smp_processor_id();
/* Ensure this CPU doesn't handle any more interrupts. */
@@ -1303,7 +1303,7 @@ static int take_cpu_down_post(void *_param)
enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE);
int cpu = smp_processor_id();
- WARN_ON(st->state != CPUHP_AP_PERF_ARM_STARTING);
+ WARN_ON(st->state != CPUHP_AP_PERF_RISCV_STARTING);
/*
* Invoke the former CPU_DYING callbacks. DYING must not fail!
*/
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [RFC PATCH 21/49] ARM: l2c: Move CPUHP_AP_ARM_L2X0_STARTING post stop_machine()
[not found] <20261019130856.49711-1-frederic@kernel.org>
` (4 preceding siblings ...)
2026-10-19 13:08 ` [RFC PATCH 20/49] perf: RISC-V: Move CPUHP_AP_PERF_RISCV_STARTING " Frederic Weisbecker
@ 2026-10-19 13:08 ` Frederic Weisbecker
2026-10-19 13:08 ` [RFC PATCH 22/49] clocksource/drivers/exynos_mct: Move CPUHP_AP_EXYNOS4_MCT_TIMER_STARTING " Frederic Weisbecker
` (6 subsequent siblings)
12 siblings, 0 replies; 13+ messages in thread
From: Frederic Weisbecker @ 2026-10-19 13:08 UTC (permalink / raw)
To: LKML
Cc: Frederic Weisbecker, Marco Crivellari, Peter Zijlstra, Phil Auld,
Russell King, Thomas Gleixner, Waiman Long, linux-arm-kernel
Between CPUHP_TEARDOWN_CPU and CPUHP_AP_OFFLINE, stop_machine executes
all the teardown callbacks while stopping all CPUs in the system. This
doesn't mix-up well with running RT or isolated tasks.
In order to transition smoothly from global stop_machine to finer
grained synchronization between teardown callbacks and the other CPUs,
a new stop machine post function has been introduced to be executed
after the main one with IRQs still disabled while other CPUs can exit
stop_machine().
The teardown callback here disables the L1/L2 cache prefetch and the
write full line of zeros mode. These operations should only impact the
outgoing CPU and can run concurrently with other CPUs.
Move it to post stop_machine() accordingly.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
---
kernel/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index c69a265e4383..c08ef67e3499 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1275,7 +1275,7 @@ void clear_tasks_mm_cpumask(int cpu)
static int take_cpu_down(void *_param)
{
struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
- enum cpuhp_state target = max((int)st->target, CPUHP_AP_PERF_RISCV_STARTING);
+ enum cpuhp_state target = max((int)st->target, CPUHP_AP_ARM_L2X0_STARTING);
int err, cpu = smp_processor_id();
/* Ensure this CPU doesn't handle any more interrupts. */
@@ -1303,7 +1303,7 @@ static int take_cpu_down_post(void *_param)
enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE);
int cpu = smp_processor_id();
- WARN_ON(st->state != CPUHP_AP_PERF_RISCV_STARTING);
+ WARN_ON(st->state != CPUHP_AP_ARM_L2X0_STARTING);
/*
* Invoke the former CPU_DYING callbacks. DYING must not fail!
*/
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [RFC PATCH 22/49] clocksource/drivers/exynos_mct: Move CPUHP_AP_EXYNOS4_MCT_TIMER_STARTING post stop_machine()
[not found] <20261019130856.49711-1-frederic@kernel.org>
` (5 preceding siblings ...)
2026-10-19 13:08 ` [RFC PATCH 21/49] ARM: l2c: Move CPUHP_AP_ARM_L2X0_STARTING " Frederic Weisbecker
@ 2026-10-19 13:08 ` Frederic Weisbecker
2026-10-19 13:08 ` [RFC PATCH 23/49] clocksource/drivers/arm_arch_timer: Move CPUHP_AP_ARM_ARCH_TIMER_STARTING " Frederic Weisbecker
` (5 subsequent siblings)
12 siblings, 0 replies; 13+ messages in thread
From: Frederic Weisbecker @ 2026-10-19 13:08 UTC (permalink / raw)
To: LKML
Cc: Frederic Weisbecker, Alim Akhtar, Daniel Lezcano,
Krzysztof Kozlowski, Marco Crivellari, Peter Griffin,
Peter Zijlstra, Phil Auld, Thomas Gleixner, Waiman Long,
linux-arm-kernel, linux-samsung-soc
Between CPUHP_TEARDOWN_CPU and CPUHP_AP_OFFLINE, stop_machine executes
all the teardown callbacks while stopping all CPUs in the system. This
doesn't mix-up well with running RT or isolated tasks.
In order to transition smoothly from global stop_machine to finer
grained synchronization between teardown callbacks and the other CPUs,
a new stop machine post function has been introduced to be executed
after the main one with IRQs still disabled while other CPUs can exit
stop_machine().
The teardown callback here simply disables the IRQ and clears/ack the
interrupt bit on the local device. All these operations can run
concurrently with other CPUs.
Move it to post stop_machine() accordingly.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
---
kernel/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index c08ef67e3499..27e6542fb6c4 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1275,7 +1275,7 @@ void clear_tasks_mm_cpumask(int cpu)
static int take_cpu_down(void *_param)
{
struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
- enum cpuhp_state target = max((int)st->target, CPUHP_AP_ARM_L2X0_STARTING);
+ enum cpuhp_state target = max((int)st->target, CPUHP_AP_EXYNOS4_MCT_TIMER_STARTING);
int err, cpu = smp_processor_id();
/* Ensure this CPU doesn't handle any more interrupts. */
@@ -1303,7 +1303,7 @@ static int take_cpu_down_post(void *_param)
enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE);
int cpu = smp_processor_id();
- WARN_ON(st->state != CPUHP_AP_ARM_L2X0_STARTING);
+ WARN_ON(st->state != CPUHP_AP_EXYNOS4_MCT_TIMER_STARTING);
/*
* Invoke the former CPU_DYING callbacks. DYING must not fail!
*/
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [RFC PATCH 23/49] clocksource/drivers/arm_arch_timer: Move CPUHP_AP_ARM_ARCH_TIMER_STARTING post stop_machine()
[not found] <20261019130856.49711-1-frederic@kernel.org>
` (6 preceding siblings ...)
2026-10-19 13:08 ` [RFC PATCH 22/49] clocksource/drivers/exynos_mct: Move CPUHP_AP_EXYNOS4_MCT_TIMER_STARTING " Frederic Weisbecker
@ 2026-10-19 13:08 ` Frederic Weisbecker
2026-10-19 13:08 ` [RFC PATCH 24/49] clocksource/drivers/arm_arch_timer: Move CPUHP_AP_ARM_ARCH_TIMER_EVTSTRM_STARTING " Frederic Weisbecker
` (4 subsequent siblings)
12 siblings, 0 replies; 13+ messages in thread
From: Frederic Weisbecker @ 2026-10-19 13:08 UTC (permalink / raw)
To: LKML
Cc: Frederic Weisbecker, Daniel Lezcano, Marc Zyngier,
Marco Crivellari, Mark Rutland, Peter Zijlstra, Phil Auld,
Thomas Gleixner, Waiman Long, linux-arm-kernel
Between CPUHP_TEARDOWN_CPU and CPUHP_AP_OFFLINE, stop_machine executes
all the teardown callbacks while stopping all CPUs in the system. This
doesn't mix-up well with running RT or isolated tasks.
In order to transition smoothly from global stop_machine to finer
grained synchronization between teardown callbacks and the other CPUs,
a new stop machine post function has been introduced to be executed
after the main one with IRQs still disabled while other CPUs can exit
stop_machine().
The teardown callback here simply performs IRQs disablement, which can run
concurrently with other CPUs.
Move it to post stop_machine() accordingly.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
---
kernel/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 27e6542fb6c4..90d37ee0f282 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1275,7 +1275,7 @@ void clear_tasks_mm_cpumask(int cpu)
static int take_cpu_down(void *_param)
{
struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
- enum cpuhp_state target = max((int)st->target, CPUHP_AP_EXYNOS4_MCT_TIMER_STARTING);
+ enum cpuhp_state target = max((int)st->target, CPUHP_AP_ARM_ARCH_TIMER_STARTING);
int err, cpu = smp_processor_id();
/* Ensure this CPU doesn't handle any more interrupts. */
@@ -1303,7 +1303,7 @@ static int take_cpu_down_post(void *_param)
enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE);
int cpu = smp_processor_id();
- WARN_ON(st->state != CPUHP_AP_EXYNOS4_MCT_TIMER_STARTING);
+ WARN_ON(st->state != CPUHP_AP_ARM_ARCH_TIMER_STARTING);
/*
* Invoke the former CPU_DYING callbacks. DYING must not fail!
*/
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [RFC PATCH 24/49] clocksource/drivers/arm_arch_timer: Move CPUHP_AP_ARM_ARCH_TIMER_EVTSTRM_STARTING post stop_machine()
[not found] <20261019130856.49711-1-frederic@kernel.org>
` (7 preceding siblings ...)
2026-10-19 13:08 ` [RFC PATCH 23/49] clocksource/drivers/arm_arch_timer: Move CPUHP_AP_ARM_ARCH_TIMER_STARTING " Frederic Weisbecker
@ 2026-10-19 13:08 ` Frederic Weisbecker
2026-10-19 13:08 ` [RFC PATCH 25/49] clocksource/drivers/arm_global_timer: Move CPUHP_AP_ARM_GLOBAL_TIMER_STARTING " Frederic Weisbecker
` (3 subsequent siblings)
12 siblings, 0 replies; 13+ messages in thread
From: Frederic Weisbecker @ 2026-10-19 13:08 UTC (permalink / raw)
To: LKML
Cc: Frederic Weisbecker, Daniel Lezcano, Marc Zyngier,
Marco Crivellari, Mark Rutland, Peter Zijlstra, Phil Auld,
Thomas Gleixner, Waiman Long, linux-arm-kernel
Between CPUHP_TEARDOWN_CPU and CPUHP_AP_OFFLINE, stop_machine executes
all the teardown callbacks while stopping all CPUs in the system. This
doesn't mix-up well with running RT or isolated tasks.
In order to transition smoothly from global stop_machine to finer
grained synchronization between teardown callbacks and the other CPUs,
a new stop machine post function has been introduced to be executed
after the main one with IRQs still disabled while other CPUs can exit
stop_machine().
The teardown callback here only clears the CPU from the
evtstrm_available cpumask, which is only ever checked locally for the
current CPU. And set/clear from other CPUs are atomic.
Therefore this callback is safe to run concurrently with other CPUs.
Move it to post stop_machine() accordingly.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
---
kernel/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 90d37ee0f282..ca335111abb2 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1275,7 +1275,7 @@ void clear_tasks_mm_cpumask(int cpu)
static int take_cpu_down(void *_param)
{
struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
- enum cpuhp_state target = max((int)st->target, CPUHP_AP_ARM_ARCH_TIMER_STARTING);
+ enum cpuhp_state target = max((int)st->target, CPUHP_AP_ARM_ARCH_TIMER_EVTSTRM_STARTING);
int err, cpu = smp_processor_id();
/* Ensure this CPU doesn't handle any more interrupts. */
@@ -1303,7 +1303,7 @@ static int take_cpu_down_post(void *_param)
enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE);
int cpu = smp_processor_id();
- WARN_ON(st->state != CPUHP_AP_ARM_ARCH_TIMER_STARTING);
+ WARN_ON(st->state != CPUHP_AP_ARM_ARCH_TIMER_EVTSTRM_STARTING);
/*
* Invoke the former CPU_DYING callbacks. DYING must not fail!
*/
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [RFC PATCH 25/49] clocksource/drivers/arm_global_timer: Move CPUHP_AP_ARM_GLOBAL_TIMER_STARTING post stop_machine()
[not found] <20261019130856.49711-1-frederic@kernel.org>
` (8 preceding siblings ...)
2026-10-19 13:08 ` [RFC PATCH 24/49] clocksource/drivers/arm_arch_timer: Move CPUHP_AP_ARM_ARCH_TIMER_EVTSTRM_STARTING " Frederic Weisbecker
@ 2026-10-19 13:08 ` Frederic Weisbecker
2026-10-19 13:08 ` [RFC PATCH 27/49] ARM: smp_twd: Move CPUHP_AP_ARM_TWD_STARTING " Frederic Weisbecker
` (2 subsequent siblings)
12 siblings, 0 replies; 13+ messages in thread
From: Frederic Weisbecker @ 2026-10-19 13:08 UTC (permalink / raw)
To: LKML
Cc: Frederic Weisbecker, Daniel Lezcano, Marco Crivellari,
Patrice Chotard, Peter Zijlstra, Phil Auld, Thomas Gleixner,
Waiman Long, linux-arm-kernel
Between CPUHP_TEARDOWN_CPU and CPUHP_AP_OFFLINE, stop_machine executes
all the teardown callbacks while stopping all CPUs in the system. This
doesn't mix-up well with running RT or isolated tasks.
In order to transition smoothly from global stop_machine to finer
grained synchronization between teardown callbacks and the other CPUs,
a new stop machine post function has been introduced to be executed
after the main one with IRQs still disabled while other CPUs can exit
stop_machine().
The teardown callback here simply performs IRQ disablement, which can
run concurrently with other CPUs.
Move it to post stop_machine() accordingly.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
---
kernel/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index ca335111abb2..7bc94829b68c 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1275,7 +1275,7 @@ void clear_tasks_mm_cpumask(int cpu)
static int take_cpu_down(void *_param)
{
struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
- enum cpuhp_state target = max((int)st->target, CPUHP_AP_ARM_ARCH_TIMER_EVTSTRM_STARTING);
+ enum cpuhp_state target = max((int)st->target, CPUHP_AP_ARM_GLOBAL_TIMER_STARTING);
int err, cpu = smp_processor_id();
/* Ensure this CPU doesn't handle any more interrupts. */
@@ -1303,7 +1303,7 @@ static int take_cpu_down_post(void *_param)
enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE);
int cpu = smp_processor_id();
- WARN_ON(st->state != CPUHP_AP_ARM_ARCH_TIMER_EVTSTRM_STARTING);
+ WARN_ON(st->state != CPUHP_AP_ARM_GLOBAL_TIMER_STARTING);
/*
* Invoke the former CPU_DYING callbacks. DYING must not fail!
*/
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [RFC PATCH 27/49] ARM: smp_twd: Move CPUHP_AP_ARM_TWD_STARTING post stop_machine()
[not found] <20261019130856.49711-1-frederic@kernel.org>
` (9 preceding siblings ...)
2026-10-19 13:08 ` [RFC PATCH 25/49] clocksource/drivers/arm_global_timer: Move CPUHP_AP_ARM_GLOBAL_TIMER_STARTING " Frederic Weisbecker
@ 2026-10-19 13:08 ` Frederic Weisbecker
2026-10-19 13:08 ` [RFC PATCH 41/49] ARM: xen: Move CPUHP_AP_ARM_XEN_STARTING " Frederic Weisbecker
2026-10-19 13:08 ` [RFC PATCH 49/49] ARM: mm: Move CPUHP_AP_ARM_CACHE_B15_RAC_DYING " Frederic Weisbecker
12 siblings, 0 replies; 13+ messages in thread
From: Frederic Weisbecker @ 2026-10-19 13:08 UTC (permalink / raw)
To: LKML
Cc: Frederic Weisbecker, Marco Crivellari, Peter Zijlstra, Phil Auld,
Russell King, Thomas Gleixner, Waiman Long, linux-arm-kernel
Between CPUHP_TEARDOWN_CPU and CPUHP_AP_OFFLINE, stop_machine executes
all the teardown callbacks while stopping all CPUs in the system. This
doesn't mix-up well with running RT or isolated tasks.
In order to transition smoothly from global stop_machine to finer
grained synchronization between teardown callbacks and the other CPUs,
a new stop machine post function has been introduced to be executed
after the main one with IRQs still disabled while other CPUs can exit
stop_machine().
The teardown callback here simply performs IRQ disablement, which can
run concurrently with other CPUs.
Move it to post stop_machine() accordingly.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
---
kernel/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 1b3942012f2d..1a98d05c7f55 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1275,7 +1275,7 @@ void clear_tasks_mm_cpumask(int cpu)
static int take_cpu_down(void *_param)
{
struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
- enum cpuhp_state target = max((int)st->target, CPUHP_AP_JCORE_TIMER_STARTING);
+ enum cpuhp_state target = max((int)st->target, CPUHP_AP_ARM_TWD_STARTING);
int err, cpu = smp_processor_id();
/* Ensure this CPU doesn't handle any more interrupts. */
@@ -1303,7 +1303,7 @@ static int take_cpu_down_post(void *_param)
enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE);
int cpu = smp_processor_id();
- WARN_ON(st->state != CPUHP_AP_JCORE_TIMER_STARTING);
+ WARN_ON(st->state != CPUHP_AP_ARM_TWD_STARTING);
/*
* Invoke the former CPU_DYING callbacks. DYING must not fail!
*/
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [RFC PATCH 41/49] ARM: xen: Move CPUHP_AP_ARM_XEN_STARTING post stop_machine()
[not found] <20261019130856.49711-1-frederic@kernel.org>
` (10 preceding siblings ...)
2026-10-19 13:08 ` [RFC PATCH 27/49] ARM: smp_twd: Move CPUHP_AP_ARM_TWD_STARTING " Frederic Weisbecker
@ 2026-10-19 13:08 ` Frederic Weisbecker
2026-10-19 13:08 ` [RFC PATCH 49/49] ARM: mm: Move CPUHP_AP_ARM_CACHE_B15_RAC_DYING " Frederic Weisbecker
12 siblings, 0 replies; 13+ messages in thread
From: Frederic Weisbecker @ 2026-10-19 13:08 UTC (permalink / raw)
To: LKML
Cc: Frederic Weisbecker, Marco Crivellari, Peter Zijlstra, Phil Auld,
Russell King, Stefano Stabellini, Thomas Gleixner, Waiman Long,
linux-arm-kernel, xen-devel
Between CPUHP_TEARDOWN_CPU and CPUHP_AP_OFFLINE, stop_machine executes
all the teardown callbacks while stopping all CPUs in the system. This
doesn't mix-up well with running RT or isolated tasks.
In order to transition smoothly from global stop_machine to finer
grained synchronization between teardown callbacks and the other CPUs,
a new stop machine post function has been introduced to be executed
after the main one with IRQs still disabled while other CPUs can exit
stop_machine().
The teardown callback here simply performs IRQ disablement, which can
run concurrently with other CPUs.
Move it to post stop_machine() accordingly.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
---
kernel/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index bc06cb1f0282..8509c6377a61 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1275,7 +1275,7 @@ void clear_tasks_mm_cpumask(int cpu)
static int take_cpu_down(void *_param)
{
struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
- enum cpuhp_state target = max((int)st->target, CPUHP_AP_DUMMY_TIMER_STARTING);
+ enum cpuhp_state target = max((int)st->target, CPUHP_AP_ARM_XEN_STARTING);
int err, cpu = smp_processor_id();
/* Ensure this CPU doesn't handle any more interrupts. */
@@ -1303,7 +1303,7 @@ static int take_cpu_down_post(void *_param)
enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE);
int cpu = smp_processor_id();
- WARN_ON(st->state != CPUHP_AP_DUMMY_TIMER_STARTING);
+ WARN_ON(st->state != CPUHP_AP_ARM_XEN_STARTING);
/*
* Invoke the former CPU_DYING callbacks. DYING must not fail!
*/
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [RFC PATCH 49/49] ARM: mm: Move CPUHP_AP_ARM_CACHE_B15_RAC_DYING post stop_machine()
[not found] <20261019130856.49711-1-frederic@kernel.org>
` (11 preceding siblings ...)
2026-10-19 13:08 ` [RFC PATCH 41/49] ARM: xen: Move CPUHP_AP_ARM_XEN_STARTING " Frederic Weisbecker
@ 2026-10-19 13:08 ` Frederic Weisbecker
12 siblings, 0 replies; 13+ messages in thread
From: Frederic Weisbecker @ 2026-10-19 13:08 UTC (permalink / raw)
To: LKML
Cc: Frederic Weisbecker, Broadcom internal kernel review list,
Florian Fainelli, Marco Crivellari, Peter Zijlstra, Phil Auld,
Russell King, Thomas Gleixner, Waiman Long, linux-arm-kernel
Between CPUHP_TEARDOWN_CPU and CPUHP_AP_OFFLINE, stop_machine executes
all the teardown callbacks while stopping all CPUs in the system. This
doesn't mix-up well with running RT or isolated tasks.
In order to transition smoothly from global stop_machine to finer
grained synchronization between teardown callbacks and the other CPUs,
a new stop machine post function has been introduced to be executed
after the main one with IRQs still disabled while other CPUs can exit
stop_machine().
It *looks ok* to disable the cache readahead globally while the other
CPUs are running.
Move this teardown callback to post stop_machine() accordingly.
But please double check.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
---
kernel/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 87680f7c6493..36f8e6588196 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1275,7 +1275,7 @@ void clear_tasks_mm_cpumask(int cpu)
static int take_cpu_down(void *_param)
{
struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
- enum cpuhp_state target = max((int)st->target, CPUHP_AP_X86_TBOOT_DYING);
+ enum cpuhp_state target = max((int)st->target, CPUHP_AP_ONLINE);
int err, cpu = smp_processor_id();
/* Ensure this CPU doesn't handle any more interrupts. */
@@ -1303,7 +1303,7 @@ static int take_cpu_down_post(void *_param)
enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE);
int cpu = smp_processor_id();
- WARN_ON(st->state != CPUHP_AP_X86_TBOOT_DYING);
+ WARN_ON(st->state != CPUHP_AP_ONLINE);
/*
* Invoke the former CPU_DYING callbacks. DYING must not fail!
*/
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread