linux-stable/drivers/iommu
Nicolin Chen f4a1477357 iommu: Use EINVAL for incompatible device/domain in ->attach_dev
Following the new rules in include/linux/iommu.h kdocs, update all drivers
->attach_dev callback functions to return EINVAL in the failure paths that
are related to domain incompatibility.

Also, drop adjacent error prints to prevent a kernel log spam.

Link: https://lore.kernel.org/r/f52a07f7320da94afe575c9631340d0019a203a7.1666042873.git.nicolinc@nvidia.com
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2022-11-01 14:39:59 -03:00
..
amd iommu/amd: Drop unnecessary checks in amd_iommu_attach_device() 2022-11-01 14:39:59 -03:00
arm iommu: Use EINVAL for incompatible device/domain in ->attach_dev 2022-11-01 14:39:59 -03:00
intel iommu: Use EINVAL for incompatible device/domain in ->attach_dev 2022-11-01 14:39:59 -03:00
apple-dart.c iommu: Add gfp parameter to iommu_alloc_resv_region 2022-10-21 10:49:32 +02:00
dma-iommu.c iommu/dma: Make header private 2022-09-09 09:26:22 +02:00
dma-iommu.h iommu/dma: Make header private 2022-09-09 09:26:22 +02:00
exynos-iommu.c iommu/exynos: Clean up bus_set_iommu() 2022-09-07 14:26:14 +02:00
fsl_pamu.c iommu: Regulate EINVAL in ->attach_dev callback functions 2022-11-01 14:39:59 -03:00
fsl_pamu.h iommu/fsl_pamu: hardcode the window address and size in pamu_config_ppaace 2021-04-07 10:56:52 +02:00
fsl_pamu_domain.c iommu: Regulate EINVAL in ->attach_dev callback functions 2022-11-01 14:39:59 -03:00
fsl_pamu_domain.h iommu/fsl_pamu: remove the snoop_id field 2021-04-07 10:56:52 +02:00
hyperv-iommu.c iommu/hyper-v: Use helper instead of directly accessing affinity 2022-08-04 10:02:09 +01:00
io-pgfault.c iommu: Add a page fault handler 2021-04-07 10:54:29 +02:00
io-pgtable-arm-v7s.c iommu/io-pgtable-arm-v7s: Add a quirk to allow pgtable PA up to 35bit 2022-07-07 09:42:59 +02:00
io-pgtable-arm.c Merge branches 'apple/dart', 'arm/mediatek', 'arm/omap', 'arm/smmu', 'virtio', 'x86/vt-d', 'x86/amd' and 'core' into next 2022-09-26 15:52:31 +02:00
io-pgtable-arm.h iommu/io-pgtable-arm: Move some definitions to a header 2020-09-28 23:48:06 +01:00
io-pgtable-dart.c iommu/io-pgtable-dart: Add DART PTE support for t6000 2022-09-26 13:49:40 +02:00
io-pgtable.c Merge branches 'apple/dart', 'arm/mediatek', 'arm/omap', 'arm/smmu', 'virtio', 'x86/vt-d', 'x86/amd' and 'core' into next 2022-09-26 15:52:31 +02:00
ioasid.c iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit 2022-02-15 11:31:35 +01:00
iommu-debugfs.c
iommu-sva-lib.c iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit 2022-02-15 11:31:35 +01:00
iommu-sva-lib.h iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit 2022-02-15 11:31:35 +01:00
iommu-sysfs.c
iommu-traces.c
iommu.c iommu: Add return value rules to attach_dev op and APIs 2022-11-01 14:39:59 -03:00
iova.c iova: Remove iovad->rcaches check in iova_rcache_get() 2022-09-09 09:27:03 +02:00
ipmmu-vmsa.c iommu: Use EINVAL for incompatible device/domain in ->attach_dev 2022-11-01 14:39:59 -03:00
irq_remapping.c x86: Kill all traces of irq_remapping_get_irq_domain() 2020-10-28 20:26:28 +01:00
irq_remapping.h x86: Kill all traces of irq_remapping_get_irq_domain() 2020-10-28 20:26:28 +01:00
Kconfig Merge branches 'apple/dart', 'arm/mediatek', 'arm/omap', 'arm/smmu', 'virtio', 'x86/vt-d', 'x86/amd' and 'core' into next 2022-09-26 15:52:31 +02:00
Makefile iommu/io-pgtable: Move Apple DART support to its own file 2022-09-26 13:48:40 +02:00
msm_iommu.c iommu: Clean up bus_set_iommu() 2022-09-07 14:26:17 +02:00
msm_iommu.h
msm_iommu_hw-8xxx.h
mtk_iommu.c iommu: Regulate EINVAL in ->attach_dev callback functions 2022-11-01 14:39:59 -03:00
mtk_iommu_v1.c iommu/mtk: Clean up bus_set_iommu() 2022-09-07 14:26:15 +02:00
of_iommu.c Revert "iommu/of: Delete usage of driver_deferred_probe_check_state()" 2022-08-23 13:14:02 +02:00
omap-iommu-debug.c iommu/omap: Fix buffer overflow in debugfs 2022-09-07 10:42:28 +02:00
omap-iommu.c iommu: Use EINVAL for incompatible device/domain in ->attach_dev 2022-11-01 14:39:59 -03:00
omap-iommu.h
omap-iopgtable.h iommu/omap: Fix -Woverflow warnings when compiling on 64-bit architectures 2020-03-04 16:24:46 +01:00
rockchip-iommu.c iommu: Clean up bus_set_iommu() 2022-09-07 14:26:17 +02:00
s390-iommu.c iommu: Clean up bus_set_iommu() 2022-09-07 14:26:17 +02:00
sprd-iommu.c iommu: Use EINVAL for incompatible device/domain in ->attach_dev 2022-11-01 14:39:59 -03:00
sun50i-iommu.c iommu: Clean up bus_set_iommu() 2022-09-07 14:26:17 +02:00
tegra-gart.c iommu: Use EINVAL for incompatible device/domain in ->attach_dev 2022-11-01 14:39:59 -03:00
tegra-smmu.c iommu/tegra-smmu: Clean up bus_set_iommu() 2022-09-07 14:26:16 +02:00
virtio-iommu.c iommu: Use EINVAL for incompatible device/domain in ->attach_dev 2022-11-01 14:39:59 -03:00