Re: [PATCH v5 1/3] iommu/arm-smmu-v3: Factor out CMDQ batch force-sync conditions

From: Ashish Mhetre

Date: Fri Jul 10 2026 - 02:39:31 EST




On 7/10/2026 9:58 AM, Nicolin Chen wrote:
On Thu, Jul 09, 2026 at 09:56:07AM +0000, Ashish Mhetre wrote:
From: Nicolin Chen <nicolinc@xxxxxxxxxx>

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.
Patch is fine, but you're missing the cover-letter and changelogs.

Nicolin

I had sent out the cover-letter along with change logs.
The sequence got messed up while sending. Here's the cover letter.
https://lore.kernel.org/linux-tegra/20260709095613.831769-4-amhetre@xxxxxxxxxx/T/#u

I will fix this in next version.

Thanks,
Ashish Mhetre