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

Pranjal Shrivastava praan at google.com
Thu May 28 03:34:42 PDT 2026


On Wed, May 27, 2026 at 06:35:56PM -0700, Nicolin Chen wrote:
> 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()
> ?

Ack. Sorry about that, the earlier versions were draining the other
queues too but that has changed from the last few versions.

I'm planning to rename it to arm_smmu_drain_cmdq(), sounds good?

Thanks,
Praan



More information about the linux-arm-kernel mailing list