[PATCH v7 02/11] iommu/arm-smmu-v3: Add a helper to drain cmd queues

Nicolin Chen nicolinc at nvidia.com
Wed May 27 18:35:56 PDT 2026


On Wed, May 27, 2026 at 10:13:58PM +0000, Pranjal Shrivastava wrote:
> +static int arm_smmu_drain_queues(struct arm_smmu_device *smmu)

So, this function has a very generic name for queues but its use
case is limited to cmdq in a suspend context, and might not work
for other queues.

I am adding another helper for in-flight evetq and priq:
 - Drain a queue for a detaching master; other attached masters
   might still advance the prod, so queue wouldn't be empty.
 - evtq and priq sets wfe=false.

So, there is a naming conflict here.

Maybe:
  arm_smmu_drain_queue_for_cmdq()
  arm_smmu_drain_queue_for_iopf()
?

Nicolin



More information about the linux-arm-kernel mailing list