mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ninad Naik <ninad.naik@oss.qualcomm.com>
To: Prakash Gupta <prakash.gupta@oss.qualcomm.com>
Cc: Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Joerg Roedel <joro@8bytes.org>,
	Rob Clark <robin.clark@oss.qualcomm.com>,
	Connor Abbott <cwabbott0@gmail.com>,
	Akhil P Oommen <akhilpo@oss.qualcomm.com>,
	Pranjal Shrivastava <praan@google.com>,
	Pratyush Brahma <pratyush.brahma@oss.qualcomm.com>,
	linux-arm-msm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] iommu/arm-smmu: Use pm_runtime in fault handlers
Date: Wed, 25 Nov 2026 19:15:27 +0530	[thread overview]
Message-ID: <20261125134527.2427608-1-ninad.naik@oss.qualcomm.com> (raw)
In-Reply-To: <20260806-smmu-rpm-v4-1-8183d007331c@oss.qualcomm.com>

On Thu, Aug 06, 2026 at 03:52:41PM +0530, Prakash Gupta wrote:
> +static inline int arm_smmu_rpm_get_if_active(struct arm_smmu_device *smmu)

arm_smmu_flush_iotlb_all() needs the same treatment. It's called from
the iommu-dma flush queue timer, so arm_smmu_rpm_get() there can end up
sleeping in softirq context if the SMMU has suspended in the meantime.
With a firmware-managed power domain the resume actually blocks, and
we see an RCU stall:

  rpm_resume+0x18c/0x768
  __pm_runtime_resume+0x50/0x98
  arm_smmu_flush_iotlb_all+0x94/0x118
  fq_flush_iotlb+0x3c/0xa8
  fq_flush_timeout+0x54/0xd0
  run_timer_softirq+0x28/0x50

Skipping the flush when the SMMU isn't active should be fine, since
arm_smmu_device_reset() invalidates the TLBs on resume.

If this looks right, can you fold it in, or would you prefer a
separate patch?

Ninad

      parent reply	other threads:[~2026-11-25 13:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06 10:22 Prakash Gupta
2026-10-02 16:43 ` Will Deacon
2026-11-25 13:45 ` Ninad Naik [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=20261125134527.2427608-1-ninad.naik@oss.qualcomm.com \
    --to=ninad.naik@oss.qualcomm.com \
    --cc=akhilpo@oss.qualcomm.com \
    --cc=cwabbott0@gmail.com \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=praan@google.com \
    --cc=prakash.gupta@oss.qualcomm.com \
    --cc=pratyush.brahma@oss.qualcomm.com \
    --cc=robin.clark@oss.qualcomm.com \
    --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®