[PATCH 0/3] Cleanup around iommu_set_fault_handler()

Jason Gunthorpe
2025-10-22T17:12:58Z

report_iommu_fault() is an older API that has been superseded by
iommu_report_device_fault() which is capable to support PRI.

Only three external drivers consume this via iommu_set_fault_handler()
drivers/remoteproc
drivers/gpu/drm/msm
drivers/infiniband/hw/usnic

Remove the use in usnic as the iommu driver logging is good enough these
days.

Remove generation support from the AMD iommu driver since msm and
remoteproc are not used on AMD x86 CPUs.

Fail iommu_set_fault_handler() if the underlying iommu driver does not
support it.

Jason Gunthorpe (3):
RDMA/usnic: Remove iommu_set_fault_handler()
iommu/amd: Don't call report_iommu_fault()
iommu: Allow drivers to say if they use report_iommu_fault()

drivers/infiniband/hw/usnic/usnic_uiom.c | 13 -------------
drivers/iommu/amd/iommu.c | 24 ------------------------
drivers/iommu/arm/arm-smmu/arm-smmu.c | 1 +
drivers/iommu/arm/arm-smmu/qcom_iommu.c | 1 +
drivers/iommu/iommu.c | 6 +++++-
drivers/iommu/ipmmu-vmsa.c | 1 +
drivers/iommu/mtk_iommu.c | 1 +
drivers/iommu/mtk_iommu_v1.c | 1 +
drivers/iommu/omap-iommu.c | 1 +
drivers/iommu/rockchip-iommu.c | 1 +
drivers/iommu/sun50i-iommu.c | 1 +
include/linux/iommu.h | 3 +++
12 files changed, 16 insertions(+), 38 deletions(-)

base-commit: 211ddde0823f1442e4ad052a2f30f050145ccada
--
2.43.0