[PATCH v1 08/11] iommu/tegra241-cmdqv: Require exactly one Stream ID for a vSID

Nicolin Chen nicolinc at nvidia.com
Fri Jul 3 00:11:37 PDT 2026


On Thu, Jul 02, 2026 at 10:31:34PM -0700, Nicolin Chen wrote:
> diff --git a/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c b/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c
> index 812cc500b4a1e..aa0568e328356 100644
> --- a/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c
> +++ b/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c
> @@ -1249,7 +1249,8 @@ static int tegra241_vintf_init_vsid(struct iommufd_vdevice *vdev)
>  	if (virt_sid > FIELD_MAX(VINTF_SID_MATCH_VIRT_SID))
>  		return -EINVAL;
>  
> -	WARN_ON_ONCE(master->num_streams != 1);
> +	if (master->num_streams != 1)
> +		return -EINVAL;

Kevin pointed out in the other smmu patch that this should return
-EOPNOTSUPP instead.
https://lore.kernel.org/linux-iommu/SA2PR11MB4844DD8A0367D8E909123F868CF42@SA2PR11MB4844.namprd11.prod.outlook.com/

So, it'd be better to return -EOPNOTSUPP in both places. I'll fix
this when doing a v2.

Nicolin



More information about the linux-arm-kernel mailing list