Subject: Re: [PATCH v8 02/12] iommu/arm-smmu-v3: Add a helper to drain cmd queues

From: Pranjal Shrivastava <[email-masked]>
Date: Tue, 2 Jun 2026 03:28:59 +0000

On Mon, Jun 01, 2026 at 05:12:39PM -0700, Nicolin Chen wrote:
> On Mon, Jun 01, 2026 at 09:58:59PM +0000, Pranjal Shrivastava wrote:
> > +int arm_smmu_queue_poll_until_empty(struct arm_smmu_device *smmu,
> > +				    struct arm_smmu_queue *q)
> > +{
> > +	struct arm_smmu_queue_poll qp;
> > +	struct arm_smmu_ll_queue *llq = &q->llq;
> > +	int ret = 0;
> > +
> > +	queue_poll_init(smmu, &qp);
> > +	do {
> > +		if (queue_empty(llq))
> > +			break;
> > +
> > +		ret = queue_poll(&qp);
> > +		WRITE_ONCE(llq->cons, readl_relaxed(q->cons_reg));
> > +
> > +	} while (!ret);
> > +
> > +	return ret;
> > +}
> 
> Hmm, this is not the unified arm_smmu_drain_queue() that you sent
> me lately? Do you want me to change this function to that version
> in my series? I thought it could go in with yours.

Yes.. I thought it could go with your series 
   
If I were to include the full unified version here, I'd essentially have
to include changes from the PRI support, which is still in its early
stages. I'm keen to keep this RPM series standalone to avoid coupling 
its progress to the PRI review cycle.

Anyway it's just a clean up?

Praan