[PATCH v7 07/11] iommu/arm-smmu-v3: Add CMDQ_PROD_STOP_FLAG to gate CMDQ submissions
Pranjal Shrivastava
praan at google.com
Thu May 28 14:57:53 PDT 2026
On Thu, May 28, 2026 at 12:41:35PM -0700, Nicolin Chen wrote:
> On Wed, May 27, 2026 at 10:14:03PM +0000, Pranjal Shrivastava wrote:
> > Introduce a new bit flag, CMDQ_PROD_STOP_FLAG (bit 30), in the command
> > queue's producer index to safely gate command submissions during device
> > suspension.
> >
> > The flag embeds the suspend state directly into the existing global state
> > The flag checked in the compxchg loop in arm_smmu_cmdq_issue_cmdlist(),
>
> s/compxchg/cmpxchg
Ack. I'll fix it.
>
> > which acts as a Point of Commitment, ensuring that no indices are
> > reserved or committed once the SMMU begins suspending.
> >
> > This prevents a situation of "abandoned batches" where indices are
> > incremented but commands are never written, which would otherwise
> > lead to timeout during the drain poll.
> >
> > Update queue_inc_prod_n() to preserve this flag during index
> > calculations, ensuring that any in-flight commands that successfully
> > passed the point of commitment can proceed to completion while the
> > flag remains set.
> >
> > Suggested-by: Daniel Mentz <danielmentz at google.com>
> > Signed-off-by: Pranjal Shrivastava <praan at google.com>
>
> Reviewed-by: Nicolin Chen <nicolinc at nvidia.com>
Thanks!
Praan
More information about the linux-arm-kernel
mailing list