[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <875xfktna6.ffs@tglx>
Date: Tue, 22 Jul 2025 14:36:49 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Jiri Slaby <jirislaby@...nel.org>, LKML <linux-kernel@...r.kernel.org>
Cc: Liangyan <liangyan.peng@...edance.com>, Yicong Shen
<shenyicong.1023@...edance.com>
Subject: Re: [patch 2/4] genirq: Move irq_wait_for_poll() to call site
On Tue, Jul 22 2025 at 09:07, Jiri Slaby wrote:
>> + if (IS_ENABLED(CONFIG_SMP)) {
>> + do {
>> + raw_spin_unlock(&desc->lock);
>> + while (irqd_irq_inprogress(&desc->irq_data))
>> + cpu_relax();
>> + raw_spin_lock(&desc->lock);
>> + } while (irqd_irq_inprogress(&desc->irq_data));
>> + }
>> + /* Might have been disabled in meantime */
>> + return !irqd_irq_disabled(&desc->irq_data) && desc->action;
>
> Just noting that this line is newly evaluated on !SMP too. But it is
> still supposed to evaluate to false, given we are here on this only CPU.
It does not, but in that case the code is not reached because the check
at the call site which evaluates whether the polling CPU is the current
CPU triggers. So it does not really matter in this context.
But for the other case in handle_edge_irq() this has to return false. It
should not ever get there because interrupts are disabled while
INPROGRESS is set, emphasis on *should* :)
So I moved it back into the CONFIG_SMP conditional. Thanks for spotting
it!
tglx
Powered by blists - more mailing lists