From: Arun Iyengar via B4 Relay <devnull+aiyengar1990.gmail.com@kernel.org>
To: Benjamin Gaignard <benjamin.gaignard@collabora.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,
Arun Iyengar <aiyengar1990@gmail.com>
Subject: [PATCH 2/2] iommu/vsi: Don't resume the IOMMU in its interrupt handler
Date: Fri, 13 Nov 2026 20:04:37 +0000 [thread overview]
Message-ID: <20261113-vsi-iommu-pm-ref-v1-2-fd917eebdf18@gmail.com> (raw)
In-Reply-To: <20261113-vsi-iommu-pm-ref-v1-0-fd917eebdf18@gmail.com>
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>
---
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);
--
2.55.0
prev parent reply other threads:[~2026-11-13 20:04 UTC|newest]
Thread overview: 3+ 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-13 20:04 ` Arun Iyengar via B4 Relay [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=20261113-vsi-iommu-pm-ref-v1-2-fd917eebdf18@gmail.com \
--to=devnull+aiyengar1990.gmail.com@kernel.org \
--cc=aiyengar1990@gmail.com \
--cc=benjamin.gaignard@collabora.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®