From: Peter Zijlstra <peterz@infradead.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH] cpu: Make atomic callbacks run on UP with disabled interrupts
Date: Mon, 3 Nov 2025 15:10:11 +0100 [thread overview]
Message-ID: <20251103141011.GC3245006@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20251103131051._qx__Noh@linutronix.de>
On Mon, Nov 03, 2025 at 02:10:51PM +0100, Sebastian Andrzej Siewior wrote:
> 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?
That would be confusing to read, the condition here is any failure. And
yes, this way you'll get a WARN and then a BUG, but meh :-)
next prev parent reply other threads:[~2025-11-03 14:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-03 12:03 [PATCH] cpu: Make atomic callbacks run on UP with disabled interrupts Sebastian Andrzej Siewior
2025-11-03 12:42 ` Peter Zijlstra
2025-11-03 13:10 ` Sebastian Andrzej Siewior
2025-11-03 14:10 ` Peter Zijlstra [this message]
2025-11-03 13:28 ` [PATCH v2] " Sebastian Andrzej Siewior
2025-11-03 14:10 ` Peter Zijlstra
2025-11-03 14:31 ` Sebastian Andrzej Siewior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251103141011.GC3245006@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bigeasy@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox