From: Benjamin Gaignard <benjamin.gaignard@collabora.com>
To: aiyengar1990@gmail.com, "Joerg Roedel (AMD)" <joro@8bytes.org>,
Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>
Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] iommu/vsi: Don't resume the IOMMU in its interrupt handler
Date: Mon, 16 Nov 2026 09:11:35 +0100 [thread overview]
Message-ID: <1eaddafd-e243-47a2-b418-ec310071b61a@collabora.com> (raw)
In-Reply-To: <20261113-vsi-iommu-pm-ref-v1-2-fd917eebdf18@gmail.com>
Le 13/11/2026 à 21:04, Arun Iyengar via B4 Relay a écrit :
> From: Arun Iyengar <aiyengar1990@gmail.com>
>
> The interrupt handler calls pm_runtime_resume_and_get(), which can
> sleep, in hard IRQ context. Handle the interrupt only if the IOMMU is
> active.
>
> Fixes: 917ace84b770 ("iommu: Add verisilicon IOMMU driver")
> Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> ---
> drivers/iommu/vsi-iommu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iommu/vsi-iommu.c b/drivers/iommu/vsi-iommu.c
> index 5d581be95333..3dec58224953 100644
> --- a/drivers/iommu/vsi-iommu.c
> +++ b/drivers/iommu/vsi-iommu.c
> @@ -196,7 +196,7 @@ static irqreturn_t vsi_iommu_irq(int irq, void *dev_id)
> dma_addr_t iova;
> u32 status;
>
> - if (pm_runtime_resume_and_get(iommu->dev) < 0)
> + if (pm_runtime_get_if_active(iommu->dev) <= 0)
> return IRQ_NONE;
>
> spin_lock_irqsave(&iommu->lock, flags);
>
prev parent reply other threads:[~2026-11-16 8:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 20:04 [PATCH 0/2] iommu/vsi: Fix the runtime PM of the IOMMU Arun Iyengar via B4 Relay
2026-11-13 20:04 ` [PATCH 1/2] iommu/vsi: Don't leak a runtime PM reference in the TLB flush Arun Iyengar via B4 Relay
2026-11-16 8:11 ` Benjamin Gaignard
2026-11-13 20:04 ` [PATCH 2/2] iommu/vsi: Don't resume the IOMMU in its interrupt handler Arun Iyengar via B4 Relay
2026-11-16 8:11 ` Benjamin Gaignard [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=1eaddafd-e243-47a2-b418-ec310071b61a@collabora.com \
--to=benjamin.gaignard@collabora.com \
--cc=aiyengar1990@gmail.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=will@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®