[PATCH v7 02/11] iommu/arm-smmu-v3: Add a helper to drain cmd queues
Nicolin Chen
nicolinc at nvidia.com
Thu May 28 15:09:03 PDT 2026
On Thu, May 28, 2026 at 10:34:42AM +0000, Pranjal Shrivastava wrote:
> 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?
That sounds okay.
Though my series is still at the early review stage, I would like
to merge those two functions at some point
Do you know if my implementation can work for cmdq too? Seems that
only the WFE would be different, which can be a bool?
Nicolin
More information about the linux-arm-kernel
mailing list