[PATCH v8 3/4] iommu/arm-smmu-v3: Standardize ATS enablement failure reporting

From: Pranjal Shrivastava

Date: Thu Jun 04 2026 - 14:22:19 EST


Update arm_smmu_enable_ats() to wrap the pci_enable_ats() call in
WARN_ON(). Since probe-time checks now preclude configuration errors
any failure during hardware enablement is considered a kernel bug.

Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>
Signed-off-by: Pranjal Shrivastava <praan@xxxxxxxxxx>
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

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 a10affb483a4..0494c68daa19 100644
--- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
+++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
@@ -2956,7 +2956,12 @@ static void arm_smmu_enable_ats(struct arm_smmu_master *master)
* ATC invalidation of PASID 0 causes the entire ATC to be flushed.
*/
arm_smmu_atc_inv_master(master, IOMMU_NO_PASID);
- if (pci_enable_ats(pdev, stu))
+
+ /*
+ * Since pci_prepare_ats() has already verified the HW capability
+ * and programmed the STE, pci_enable_ats() should not fail here.
+ */
+ if (WARN_ON(pci_enable_ats(pdev, stu)))
dev_err(master->dev, "Failed to enable ATS (STU %zu)\n", stu);
}

--
2.54.0.1032.g2f8565e1d1-goog