Re: [PATCH] cpu: Make atomic callbacks run on UP with disabled interrupts

Sebastian Andrzej Siewior
2025-11-03T13:10:54Z

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