Re: [PATCH RFC 01/11] iommu: Add pasid_bits field in struct dev_iommu

Jean-Philippe Brucker
2022-03-21T11:22:38Z

Hi Baolu,

On Sun, Mar 20, 2022 at 02:40:20PM +0800, Lu Baolu wrote:
> diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> index 627a3ed5ee8f..8e262210b5ad 100644
> --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> @@ -2812,6 +2812,7 @@ static int arm_smmu_dev_enable_feature(struct device *dev,
> master->iopf_enabled = true;
> return 0;
> case IOMMU_DEV_FEAT_SVA:
> + dev->iommu->pasid_bits = master->ssid_bits;

This would be better in arm_smmu_probe_device()

Thanks,
Jean

> return arm_smmu_master_enable_sva(master);
> default:
> return -EINVAL;