Re: [PATCH v4] iommu/arm-smmu: Use pm_runtime in fault handlers
From: Ninad Naik
Date: Wed Nov 25 2026 - 08:45:43 EST
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