From: "Vaidya, Mahesh" <mahesh.vaidya@altera.com>
To: Manivannan Sadhasivam <mani@kernel.org>,
Thomas Gleixner <tglx@kernel.org>,
Krzysztof Wilczynski <kwilczynski@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>
Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>,
Dinh Nguyen <dinguyen@kernel.org>, Rob Herring <robh@kernel.org>,
Marc Zyngier <maz@kernel.org>,
subhransu.sekhar.prusty@altera.com, linux-pci@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Radu Rendec <radu@rendec.net>
Subject: Re: [PATCH] PCI: altera: Convert root port IRQ to a requested handler
Date: Fri, 4 Dec 2026 15:21:11 +0530 [thread overview]
Message-ID: <0b7b2629-1a31-429d-bbce-dc1062b8e211@altera.com> (raw)
In-Reply-To: <auRrmtLrRv3fOsXA@debian>
On 30-10-2026 15:35, Manivannan Sadhasivam wrote:
> On Wed, Oct 14, 2026 at 06:07:23PM +0800, Mahesh Vaidya wrote:
>> altera_pcie_irq_teardown() removes the chained handler before removing
>> the INTx domain. Removing the handler prevents new invocations, but does
>> not wait for one already running on another CPU. Such a handler can
>> therefore access pcie or pcie->irq_domain after they have been freed.
>>
>> Chained handlers bypass handle_irq_event(), so synchronize_irq() cannot
>> rely on IRQD_IRQ_INPROGRESS and may return without waiting if the parent
>> irqchip does not report IRQCHIP_STATE_ACTIVE.
>>
>> Convert the chained handler to a requested hard IRQ. Request it only
>> after creating the INTx domain and call free_irq() before removing the
>> domain. free_irq() then synchronizes against any in-flight handler.
>>
>> Use IRQF_NO_THREAD because generic_handle_domain_irq() requires hardirq
>> context. Use IRQF_NO_SUSPEND to preserve the suspend behavior of the
>> previous chained cascade. Request and free the IRQ explicitly because
>> automatic devres cleanup happens after remove() returns.
>>
>> Fixes: ec15c4d0d5d2 ("PCI: altera: Allow building as module")
>> Reported-by: Bjorn Helgaas <bhelgaas@google.com>
>> Link: https://lore.kernel.org/linux-pci/20260430204330.3121003-3-mahesh.vaidya@altera.com/
>> Suggested-by: Dinh Nguyen <dinguyen@kernel.org>
>> Assisted-by: ChatGPT:GPT-5
>> Signed-off-by: Mahesh Vaidya <mahesh.vaidya@altera.com>
>
> Thomas, can you please share your review?
Thomas/Bjorn/Krzysztof
Gentle ping. Anything you need from me here, or is this still waiting on
an IRQ review?
Still applies cleanly to v7.4-rc1 and pci/next.
The sashiko review of this posting came back with no issues found:
https://sashiko.dev/#/patchset/20261014100723.1643089-1-mahesh.vaidya@altera.com?part=1
I do not think this needs an IRQ maintainer ruling, IRQF_NO_SUSPEND
just preserves what the chained parent already did, since
suspend_device_irqs() skips chained descriptors. Happy to drop the flag
if anyone would rather, or to send a v2 without the Assisted-by: tag,
which the process docs have since removed.
- Mahesh
>
> - Mani
>
prev parent reply other threads:[~2026-12-04 9:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 10:07 Mahesh Vaidya
2026-10-30 10:05 ` Manivannan Sadhasivam
2026-12-04 9:51 ` Vaidya, Mahesh [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=0b7b2629-1a31-429d-bbce-dc1062b8e211@altera.com \
--to=mahesh.vaidya@altera.com \
--cc=bhelgaas@google.com \
--cc=dinguyen@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=maz@kernel.org \
--cc=radu@rendec.net \
--cc=robh@kernel.org \
--cc=subhransu.sekhar.prusty@altera.com \
--cc=tglx@kernel.org \
/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
all inboxes | Powered by JetHome®