Re: [PATCH v7 1/3] iommu/arm-smmu-v3: Factor out CMDQ batch force-sync conditions
Jason Gunthorpe <[email protected]>
| Newsgroups | org.kernel.vger.linux-tegra,dev.linux.lists.iommu,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Jul 14, 2026 at 10:42:00AM +0000, Ashish Mhetre wrote: > From: Nicolin Chen <[email protected]> > > arm_smmu_cmdq_batch_add_cmd_p() carries two distinct reasons for > flushing the current batch with a CMD_SYNC before appending the > new command: > > - The batch's pre-assigned cmdq does not support the new command. > - The Arm erratum 2812531 workaround (ARM_SMMU_OPT_CMDQ_FORCE_SYNC) > forces a SYNC at one entry before the batch is full. > > Lift those checks into a new arm_smmu_cmdq_batch_force_sync() helper > so that adding another force-sync condition becomes a one-line > addition. No functional change. > > Signed-off-by: Nicolin Chen <[email protected]> > Signed-off-by: Ashish Mhetre <[email protected]> > --- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 23 +++++++++++++++------ > 1 file changed, 17 insertions(+), 6 deletions(-) Reviewed-by: Jason Gunthorpe <[email protected]> Jason