mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Golle <daniel@makrotopia.org>
To: Benjamin Gaignard <benjamin.gaignard@collabora.com>,
	Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Joerg Roedel <joerg.roedel@amd.com>,
	iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH] iommu/vsi: keep the runtime PM callbacks without PM_SLEEP
Date: Sun, 25 Oct 2026 13:27:08 +0000	[thread overview]
Message-ID: <e8114502dc91f5fb709509291fdd85e27545dfb6.1792716048.git.daniel@makrotopia.org> (raw)

The runtime PM operations are handed to the driver core through
pm_sleep_ptr(), which is NULL unless CONFIG_PM_SLEEP is set.

Without system sleep support the IOMMU has no runtime PM callbacks at
all: its clocks are never enabled by the driver, the page table is not
restored when the power domain comes back, and iommu->enable stays set
while genpd powers the domain off.
The TLB flush issued from vsi_iommu_map() then writes to the unpowered
IOMMU, and the first buffer allocation of the RK3588 AV1 decoder ends
in an asynchronous SError.

Use pm_ptr(), which keeps the operations whenever CONFIG_PM is set.

Fixes: 917ace84b770 ("iommu: Add verisilicon IOMMU driver")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
 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 5dac20b143a55..1b447c0693936 100644
--- a/drivers/iommu/vsi-iommu.c
+++ b/drivers/iommu/vsi-iommu.c
@@ -780,7 +780,7 @@ static struct platform_driver rockchip_vsi_iommu_driver = {
 	.driver = {
 		   .name = "vsi_iommu",
 		   .of_match_table = vsi_iommu_dt_ids,
-		   .pm = pm_sleep_ptr(&vsi_iommu_pm_ops),
+		   .pm = pm_ptr(&vsi_iommu_pm_ops),
 		   .suppress_bind_attrs = true,
 	},
 };

base-commit: bd1ecbb61afefc6a8b876ccbc31e9228b44e9eab
-- 
2.56.0

             reply	other threads:[~2026-10-25 13:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25 13:27 Daniel Golle [this message]
2026-10-26  8:33 ` Benjamin Gaignard

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=e8114502dc91f5fb709509291fdd85e27545dfb6.1792716048.git.daniel@makrotopia.org \
    --to=daniel@makrotopia.org \
    --cc=benjamin.gaignard@collabora.com \
    --cc=iommu@lists.linux.dev \
    --cc=joerg.roedel@amd.com \
    --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®