[RFC PATCH] iommu/arm-smmu-v3: Set CMDQ_PROD_OWNED_FLAG to bit 29

Sukadev Bhattiprolu sukadev at qti.qualcomm.com
Tue Nov 10 18:01:29 PST 2026


From: Sukadev Bhattiprolu <sukadev at qti.qualcomm.com>
Date: Mon, 9 Nov 2026 20:45:29 -0800
Subject: [RFC PATCH] iommu/arm-smmu-v3: Set CMDQ_PROD_OWNED_FLAG to bit 29

CMDQ_PROD_OWNED_FLAG is currently set to bit 31 but with support for
ECMDQs in ARM SMMU spec v3.3, bit 31 is used for SMMU_ECMDQ_PROD.EN.

Since CMDQ_PROD_OWNED_FLAG is only used by software, use bit 29 instead.

Change-Id: Ia171b73ca7b012fc25a2a8f3d7e1dc71f4c2b528
Signed-off-by: Sukadev Bhattiprolu <sukadev at qti.qualcomm.com>

---
- Would it be safe to change the OWNED_FLAG to one of the RES0 bits in
  the SMMU_ECMDQ_PROD register (30:24)?

- https://lore.kernel.org/all/20260908171712.356645-11-praan@google.com/
proposes using bit 30 for CMDQ_PROD_STOP_FLAG.

---
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 bb048e08d613..f79353582909 100644
--- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h
+++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h
@@ -398,7 +398,7 @@ static inline unsigned int arm_smmu_cdtab_l2_idx(unsigned int ssid)
 #define CMDQ_ERR_CERROR_ABT_IDX		2
 #define CMDQ_ERR_CERROR_ATC_INV_IDX	3
 
-#define CMDQ_PROD_OWNED_FLAG		Q_OVERFLOW_FLAG
+#define CMDQ_PROD_OWNED_FLAG		(1U << 29)
 
 struct arm_smmu_cmd {
 	u64 data[CMDQ_ENT_DWORDS];
-- 
2.34.1




More information about the linux-arm-kernel mailing list