Re: [PATCH v8 3/4] iommu/arm-smmu-v3: Standardize ATS enablement failure reporting
From: Jason Gunthorpe
Date: Fri Jun 12 2026 - 09:38:52 EST
On Thu, Jun 04, 2026 at 06:21:15PM +0000, Pranjal Shrivastava wrote:
> 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(-)
Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
> + /*
> + * 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);
> }
I would fold the dev_err string into the WARN though
Jason