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

From: Nicolin Chen <[email-masked]>
Date: Mon, 1 Jun 2026 17:12:39 -0700

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.

Nicolin