From: Thomas Gleixner <tglx@linutronix.de>
To: Bo Ye <bo.ye@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Cc: dicken.ding@mediatek.com, hanks.chen@mediatek.com,
xiujuan.tan@mediatek.co, Bosser Ye <bo.ye@mediatek.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] genirq: clear IRQS_PENDING in irq descriptor
Date: Thu, 13 Feb 2025 12:39:21 +0100 [thread overview]
Message-ID: <871pw2kr9y.ffs@tglx> (raw)
In-Reply-To: <20250211023040.180330-1-bo.ye@mediatek.com>
On Tue, Feb 11 2025 at 10:30, Bo Ye wrote:
> In the kernel-6.6 IRQ subsystem, there is a case of IRQ retrigger:
How is kernel 6.6 relevant here?
> Due to the possibility of electrical signal glitches causing false
> interrupts for edge-triggered type IRQs, it is necessary to clear any
> potential false interrupts or re-triggered interrupt signals from the
> interrupt source between disabling and enabling the edge-triggered
> IRQ.
This claim is just wrong.
A disable_irq(); enable_irq(); sequence must preserve the pending bit so
that interrupts do not get lost. The lazy disabling mechanism is there
to guarantee that.
> When the module using this IRQ may disable the IRQ as needed and then
> If the disabled IRQ is triggered, the IRQ subsystem will set the
> istate of the corresponding IRQ descriptor to pending.
Rightfully so.
> After the module using this IRQ completes other tasks, it clears the
> pending state on the GIC using irq_set_irqchip_state().
So this is a problem related to a specific out of tree driver and the
GIC, right?
> However, the pending state in the IRQ descriptor's istate is not
> cleared, which leads to the module receiving the IRQ again after
> enabling it, even though the interrupt source has not triggered,
> because the IRQ subsystem retriggers the interrupt based on the
> pending state in the IRQ descriptor.
What's the actual problem here? A driver has to be able to handle
spurious interrupts at any given time.
> Solution: the corresponding upstream patch modifies the
> irq_set_irqchip_state(...) in the IRQ subsystem.
Which corresponding upstream patch?
> The purpose is to clear the pending state in the IRQ descriptor's
> istate when successfully clearing the corresponding IRQ on the GIC.
Sure that's the purpose, but you fail to explain the actual problem and
the interaction with irq_set_irqchip_state().
Thanks,
tglx
prev parent reply other threads:[~2025-02-13 11:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-11 2:30 [PATCH] genirq: clear IRQS_PENDING in irq descriptor Bo Ye
2025-02-13 11:39 ` Thomas Gleixner [this message]
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=871pw2kr9y.ffs@tglx \
--to=tglx@linutronix.de \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bo.ye@mediatek.com \
--cc=dicken.ding@mediatek.com \
--cc=hanks.chen@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=xiujuan.tan@mediatek.co \
/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;
as well as URLs for NNTP newsgroup(s).