diff options
author | Nicolin Chen <nicolinc@nvidia.com> | 2022-10-18 01:02:21 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2022-11-01 18:39:59 +0100 |
commit | f4a14773579302e5f0c4bf80b03f0db7ce67f2ce (patch) | |
tree | b3a260911369cf6b131b7926874c4ae69cd005c6 /drivers/iommu/ipmmu-vmsa.c | |
parent | iommu: Regulate EINVAL in ->attach_dev callback functions (diff) | |
download | linux-f4a14773579302e5f0c4bf80b03f0db7ce67f2ce.tar.xz linux-f4a14773579302e5f0c4bf80b03f0db7ce67f2ce.zip |
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>
Diffstat (limited to 'drivers/iommu/ipmmu-vmsa.c')
-rw-r--r-- | drivers/iommu/ipmmu-vmsa.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c index 3b30c0752274..22230cc15dcd 100644 --- a/drivers/iommu/ipmmu-vmsa.c +++ b/drivers/iommu/ipmmu-vmsa.c @@ -628,8 +628,6 @@ static int ipmmu_attach_device(struct iommu_domain *io_domain, * Something is wrong, we can't attach two devices using * different IOMMUs to the same domain. */ - dev_err(dev, "Can't attach IPMMU %s to domain on IPMMU %s\n", - dev_name(mmu->dev), dev_name(domain->mmu->dev)); ret = -EINVAL; } else dev_info(dev, "Reusing IPMMU context %u\n", domain->context_id); |