Re: [PATCH v5 4/6] iommu: Regulate EINVAL in ->attach_dev callback functions
From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2022-09-22 17:26:01
Also in:
linux-iommu, linux-mediatek, lkml
From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2022-09-22 17:26:01
Also in:
linux-iommu, linux-mediatek, lkml
On Thu, Sep 22, 2022 at 01:54:20AM -0700, Nicolin Chen wrote:
Following the new rules in include/linux/iommu.h kdocs, EINVAL now can be used to indicate that domain and device are incompatible by a caller that treats it as a soft failure and tries attaching to another domain. On the other hand, there are ->attach_dev callback functions returning it for obvious device-specific errors. They will result in some inefficiency in the caller handling routine. Update these places to corresponding errnos following the new rules. Reviewed-by: Jean-Philippe Brucker <redacted> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Signed-off-by: Nicolin Chen <redacted> --- drivers/iommu/fsl_pamu.c | 2 +- drivers/iommu/fsl_pamu_domain.c | 4 ++-- drivers/iommu/intel/pasid.c | 6 ++++-- drivers/iommu/mtk_iommu.c | 2 +- drivers/iommu/omap-iommu.c | 4 ++-- drivers/iommu/virtio-iommu.c | 2 +- 6 files changed, 11 insertions(+), 9 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Jason _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel