Re: [PATCH] cpu/hotplug: disallow writing any state in atomic AP section to sysfs target

From: Thomas Gleixner
Date: Thu Jan 16 2025 - 08:21:23 EST


On Fri, Dec 20 2024 at 23:15, Koichiro Den wrote:
> diff --git a/kernel/cpu.c b/kernel/cpu.c
> index 34f1a09349fc..c877443f5888 100644
> --- a/kernel/cpu.c
> +++ b/kernel/cpu.c
> @@ -2127,6 +2127,7 @@ static struct cpuhp_step cpuhp_hp_states[] = {
> [CPUHP_BP_KICK_AP] = {
> .name = "cpu:kick_ap",
> .startup.single = cpuhp_kick_ap_alive,
> + .cant_stop = true,

Why? If it stops here, then no harm is done. The AP just waits for being
released. It won't change the state as that's a seperate handshake
mechanism.

> },
>
> /*
> @@ -2192,6 +2193,7 @@ static struct cpuhp_step cpuhp_hp_states[] = {
> * state for synchronsization */
> [CPUHP_AP_ONLINE] = {
> .name = "ap:online",
> + .cant_stop = true,

Your change log is pretty unclear about the reason for this change.

Thanks,

tglx