mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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] iommu/vsi: Don't write the enable register on suspend
Date: Mon, 16 Nov 2026 09:12:29 +0100	[thread overview]
Message-ID: <a1eb584f-abf1-4213-b27c-dbda8c18df4e@collabora.com> (raw)
In-Reply-To: <20261113-vsi-iommu-disable-v1-1-94f7f44540b3@gmail.com>


Le 13/11/2026 à 21:06, Arun Iyengar via B4 Relay a écrit :
> From: Arun Iyengar <aiyengar1990@gmail.com>
>
> Benjamin Gaignard pointed out that, per the IOMMU documentation, the
> IOMMU can't be disabled once enabled. Drop the write on suspend:
> resume reprograms the IOMMU anyway.
>
> Suggested-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>

Reviewed-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>

> ---
> Benjamin suggested this in the hantro-robust review:
> https://lore.kernel.org/r/f212840b-92fd-4d97-a6a7-2768a55483f7@collabora.com
>
> Identity attach keeps the write. On RK3588 it does clear the enable
> bit (AHB_CONTROL reads 0x1 before, 0x0 after), and without it the
> IOMMU would keep using the old domain's page table. Benjamin, should
> that one go too?
>
> Tested on RK3588S (Orange Pi 5), v7.3-based kernel with [1] and
> hantro-robust v3 [2]: AV1 fluster unchanged (203/242), 20 AV1 decoder
> unbind/bind cycles, 3 s2idle cycles. The IOMMU runtime suspended
> after each step; no SError or IOMMU fault.
> Not tested: identity domains, suspend to RAM.
> No conflict with [1] or with patch 10 of [2].
>
> Developed with Claude (Anthropic), which wrote the code and the commit
> message. I reviewed it.
>
> [1] https://lore.kernel.org/r/20261113-vsi-iommu-pm-ref-v1-0-fd917eebdf18@gmail.com
> [2] https://lore.kernel.org/r/20261113-hantro-robust-v3-0-82383c722ad2@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 5dac20b143a5..bd984060253b 100644
> --- a/drivers/iommu/vsi-iommu.c
> +++ b/drivers/iommu/vsi-iommu.c
> @@ -740,7 +740,7 @@ static int __maybe_unused vsi_iommu_suspend(struct device *dev)
>   {
>   	struct vsi_iommu *iommu = dev_get_drvdata(dev);
>   
> -	vsi_iommu_disable(iommu);
> +	iommu->enable = false;
>   
>   	clk_bulk_disable(iommu->num_clocks, iommu->clocks);
>   
>
> ---
> base-commit: 2cf4be57b301ed2d7af82e70cff5dfd96894d8de
> change-id: 20261113-vsi-iommu-disable-42edd626d009
>
> Best regards,
> --
> Arun Iyengar <aiyengar1990@gmail.com>

      reply	other threads:[~2026-11-16  8:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 20:06 Arun Iyengar via B4 Relay
2026-11-16  8:12 ` 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=a1eb584f-abf1-4213-b27c-dbda8c18df4e@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®