Re: [PATCH] cpu: Make atomic callbacks run on UP with disabled interrupts
From: Sebastian Andrzej Siewior
Date: Mon Nov 03 2025 - 08:13:26 EST
On 2025-11-03 13:42:54 [+0100], Peter Zijlstra wrote:
> How about:
>
> if (cpuhp_is_atomic_state(state)) {
> guard(irqsave)();
> ret = cpuhp_invoke_callback(cpu, state, bringup, node, NULL);
> /*
> * STARTING/DYING must not fail!
> */
> WARN_ON_ONCE(ret);
> } else {
> ret = cpuhp_invoke_callback(cpu, state, bringup, node, NULL);
> }
>
> which is a little more like cpuhp_thread_fun()
very nice indeed. What about WARN_ON_ONCE(ret && bringup) given the
BUG_ON(ret && !bringup) below?
>
Sebastian