On Tue, Sep 29, 2026 at 03:44:57AM +0000, Pranjal Shrivastava wrote:
quoted hunk ↗ jump to hunk
+/**
+ * arm_smmu_drain_queue - Drain an SMMU queue
+ * @smmu: the SMMU device
+ * @q: the queue to drain
+ * @until_empty: target selection
+ *
+ * With @until_empty == true (for CMDQ), exit once the queue is observed empty:
+ *
+ * cons0 cons prod
+ * | | |
+ * ---+###################+=====================+=============+--->
+ * |<--------- undrained==0? --------->|
Jason gave some remarks against this API:
https://lore.kernel.org/linux-iommu/179018862538.3334538.17643821143626392419.b4-review@b4/ (local)
So, my PRI series would drop this patch. I suspect that it still
has some value for the RPM/CMDQ case, compared to a busy-waiting
alternative. Yet, it probably should be simplified for CMDQ case
only.
In RPM case, the "prod" would be fixed/stable right? IOW, there
should be no new commands added to the cmdq, so it only needs to
wait for cons == prod?
Nicolin