* [PATCH 1/2] iommu/arm-smmu-v3: Do not continue in __arm_smmu_domain_inv_range()
2026-03-21 22:50 [PATCH 0/2] iommu/arm-smmu-v3: Fix bugs and typos in arm_smmu_invs series Nicolin Chen
@ 2026-03-21 22:50 ` Nicolin Chen
2026-03-23 23:39 ` Jason Gunthorpe
2026-03-24 14:40 ` Pranjal Shrivastava
2026-03-21 22:50 ` [PATCH 2/2] iommu/arm-smmu-v3: Fix typos introduced by arm_smmu_invs Nicolin Chen
2026-03-24 15:08 ` [PATCH 0/2] iommu/arm-smmu-v3: Fix bugs and typos in arm_smmu_invs series Will Deacon
2 siblings, 2 replies; 7+ messages in thread
From: Nicolin Chen @ 2026-03-21 22:50 UTC (permalink / raw)
To: will; +Cc: robin.murphy, joro, jgg, linux-arm-kernel, iommu, linux-kernel
The loop in the __arm_smmu_domain_inv_range() is a while loop, not a for
loop. So, using "continue" is wrong that would fail to move the needle.
Meanwhile, though the current command is skipped, the batch still has to
go through arm_smmu_invs_end_batch() to be issued accordingly.
Thus, use "break" to fix the issue.
Fixes: 587bb3e56a2c ("iommu/arm-smmu-v3: Add arm_smmu_invs based arm_smmu_domain_inv_range()")
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
index 01030ffd2fe23..c3c6987da9506 100644
--- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
+++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
@@ -2688,7 +2688,7 @@ static void __arm_smmu_domain_inv_range(struct arm_smmu_invs *invs,
case INV_TYPE_S2_VMID_S1_CLEAR:
/* CMDQ_OP_TLBI_S12_VMALL already flushed S1 entries */
if (arm_smmu_inv_size_too_big(cur->smmu, size, granule))
- continue;
+ break;
cmd.tlbi.vmid = cur->id;
arm_smmu_cmdq_batch_add(smmu, &cmds, &cmd);
break;
@@ -2704,7 +2704,7 @@ static void __arm_smmu_domain_inv_range(struct arm_smmu_invs *invs,
break;
default:
WARN_ON_ONCE(1);
- continue;
+ break;
}
/* Skip any trash entry in-between */
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 1/2] iommu/arm-smmu-v3: Do not continue in __arm_smmu_domain_inv_range()
2026-03-21 22:50 ` [PATCH 1/2] iommu/arm-smmu-v3: Do not continue in __arm_smmu_domain_inv_range() Nicolin Chen
@ 2026-03-23 23:39 ` Jason Gunthorpe
2026-03-24 14:40 ` Pranjal Shrivastava
1 sibling, 0 replies; 7+ messages in thread
From: Jason Gunthorpe @ 2026-03-23 23:39 UTC (permalink / raw)
To: Nicolin Chen
Cc: will, robin.murphy, joro, linux-arm-kernel, iommu, linux-kernel
On Sat, Mar 21, 2026 at 03:50:40PM -0700, Nicolin Chen wrote:
> The loop in the __arm_smmu_domain_inv_range() is a while loop, not a for
> loop. So, using "continue" is wrong that would fail to move the needle.
>
> Meanwhile, though the current command is skipped, the batch still has to
> go through arm_smmu_invs_end_batch() to be issued accordingly.
>
> Thus, use "break" to fix the issue.
>
> Fixes: 587bb3e56a2c ("iommu/arm-smmu-v3: Add arm_smmu_invs based arm_smmu_domain_inv_range()")
> Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
> ---
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Jason
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 1/2] iommu/arm-smmu-v3: Do not continue in __arm_smmu_domain_inv_range()
2026-03-21 22:50 ` [PATCH 1/2] iommu/arm-smmu-v3: Do not continue in __arm_smmu_domain_inv_range() Nicolin Chen
2026-03-23 23:39 ` Jason Gunthorpe
@ 2026-03-24 14:40 ` Pranjal Shrivastava
1 sibling, 0 replies; 7+ messages in thread
From: Pranjal Shrivastava @ 2026-03-24 14:40 UTC (permalink / raw)
To: Nicolin Chen
Cc: will, robin.murphy, joro, jgg, linux-arm-kernel, iommu,
linux-kernel
On Sat, Mar 21, 2026 at 03:50:40PM -0700, Nicolin Chen wrote:
> The loop in the __arm_smmu_domain_inv_range() is a while loop, not a for
> loop. So, using "continue" is wrong that would fail to move the needle.
>
> Meanwhile, though the current command is skipped, the batch still has to
> go through arm_smmu_invs_end_batch() to be issued accordingly.
>
> Thus, use "break" to fix the issue.
>
> Fixes: 587bb3e56a2c ("iommu/arm-smmu-v3: Add arm_smmu_invs based arm_smmu_domain_inv_range()")
> Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
> ---
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Reviewed-by: Pranjal Shrivastava <praan@google.com>
Thanks,
Praan
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] iommu/arm-smmu-v3: Fix typos introduced by arm_smmu_invs
2026-03-21 22:50 [PATCH 0/2] iommu/arm-smmu-v3: Fix bugs and typos in arm_smmu_invs series Nicolin Chen
2026-03-21 22:50 ` [PATCH 1/2] iommu/arm-smmu-v3: Do not continue in __arm_smmu_domain_inv_range() Nicolin Chen
@ 2026-03-21 22:50 ` Nicolin Chen
2026-03-23 22:11 ` Jason Gunthorpe
2026-03-24 15:08 ` [PATCH 0/2] iommu/arm-smmu-v3: Fix bugs and typos in arm_smmu_invs series Will Deacon
2 siblings, 1 reply; 7+ messages in thread
From: Nicolin Chen @ 2026-03-21 22:50 UTC (permalink / raw)
To: will; +Cc: robin.murphy, joro, jgg, linux-arm-kernel, iommu, linux-kernel
These are introduced by separate commits, so not submitting with a "Fixes"
line, since they aren't critical.
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 6 +++---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
index c3c6987da9506..b841efbcc9e9b 100644
--- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
+++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
@@ -1128,7 +1128,7 @@ static inline int arm_smmu_invs_iter_next_cmp(struct arm_smmu_invs *invs_l,
* Both @invs and @to_merge must be sorted, to ensure the returned array will be
* sorted as well.
*
- * Caller is resposible for freeing the @invs and the returned new one.
+ * Caller is responsible for freeing the @invs and the returned new one.
*
* Entries marked as trash will be purged in the returned array.
*/
@@ -1258,7 +1258,7 @@ EXPORT_SYMBOL_IF_KUNIT(arm_smmu_invs_unref);
* This function must be locked and serialized with arm_smmu_invs_merge() and
* arm_smmu_invs_unref(), but do not lockdep on any lock for KUNIT test.
*
- * Caller is resposible for freeing the @invs and the returned new one.
+ * Caller is responsible for freeing the @invs and the returned new one.
*/
VISIBLE_IF_KUNIT
struct arm_smmu_invs *arm_smmu_invs_purge(struct arm_smmu_invs *invs)
@@ -2739,7 +2739,7 @@ void arm_smmu_domain_inv_range(struct arm_smmu_domain *smmu_domain,
* But in a race, these two can be interdependent, making it a special
* case requiring an additional smp_mb() for the write->read ordering.
* Pairing with the dma_wmb() in arm_smmu_install_ste_for_dev(), this
- * makes sure that IOPTE update prior to this point is visable to SMMU
+ * makes sure that IOPTE update prior to this point is visible to SMMU
* hardware before we load the updated invalidation array.
*
* [CPU0] | [CPU1]
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h
index 36de2b0b2ebe6..ef42df4753ec4 100644
--- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h
+++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h
@@ -687,7 +687,7 @@ static inline bool arm_smmu_inv_is_ats(const struct arm_smmu_inv *inv)
* greater than @max_invs
* @num_trashes: number of trash entries in the array for arm_smmu_invs_purge().
* Must not be greater than @num_invs
- * @rwlock: optional rwlock to fench ATS operations
+ * @rwlock: optional rwlock to fence ATS operations
* @has_ats: flag if the array contains an INV_TYPE_ATS or INV_TYPE_ATS_FULL
* @rcu: rcu head for kfree_rcu()
* @inv: flexible invalidation array
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] iommu/arm-smmu-v3: Fix typos introduced by arm_smmu_invs
2026-03-21 22:50 ` [PATCH 2/2] iommu/arm-smmu-v3: Fix typos introduced by arm_smmu_invs Nicolin Chen
@ 2026-03-23 22:11 ` Jason Gunthorpe
0 siblings, 0 replies; 7+ messages in thread
From: Jason Gunthorpe @ 2026-03-23 22:11 UTC (permalink / raw)
To: Nicolin Chen
Cc: will, robin.murphy, joro, linux-arm-kernel, iommu, linux-kernel
On Sat, Mar 21, 2026 at 03:50:41PM -0700, Nicolin Chen wrote:
> These are introduced by separate commits, so not submitting with a "Fixes"
> line, since they aren't critical.
>
> Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
> ---
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 6 +++---
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 2 +-
> 2 files changed, 4 insertions(+), 4 deletions(-)
Some of those might have come from me
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Jason
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] iommu/arm-smmu-v3: Fix bugs and typos in arm_smmu_invs series
2026-03-21 22:50 [PATCH 0/2] iommu/arm-smmu-v3: Fix bugs and typos in arm_smmu_invs series Nicolin Chen
2026-03-21 22:50 ` [PATCH 1/2] iommu/arm-smmu-v3: Do not continue in __arm_smmu_domain_inv_range() Nicolin Chen
2026-03-21 22:50 ` [PATCH 2/2] iommu/arm-smmu-v3: Fix typos introduced by arm_smmu_invs Nicolin Chen
@ 2026-03-24 15:08 ` Will Deacon
2 siblings, 0 replies; 7+ messages in thread
From: Will Deacon @ 2026-03-24 15:08 UTC (permalink / raw)
To: Nicolin Chen
Cc: catalin.marinas, kernel-team, Will Deacon, robin.murphy, joro,
linux-arm-kernel, iommu, linux-kernel, Jason Gunthorpe
On Sat, 21 Mar 2026 15:50:39 -0700, Nicolin Chen wrote:
> Thank you for taking the series!
>
> I found a couple of small issues in those commits. And here are the fixes.
>
> Thanks
> Nicolin
>
> [...]
Applied to iommu (arm/smmu/updates), thanks!
[1/2] iommu/arm-smmu-v3: Do not continue in __arm_smmu_domain_inv_range()
https://git.kernel.org/iommu/c/6a01b9f0a5ec
[2/2] iommu/arm-smmu-v3: Fix typos introduced by arm_smmu_invs
https://git.kernel.org/iommu/c/86bf8580d5b8
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
^ permalink raw reply [flat|nested] 7+ messages in thread