[PATCH v6 12/14] iommu/arm-smmu-v3: Introduce struct arm_smmu_vmaster

Jason Gunthorpe jgg at nvidia.com
Tue Feb 18 09:08:24 PST 2025


On Fri, Jan 24, 2025 at 04:30:41PM -0800, Nicolin Chen wrote:
> +	int ret;
>  	struct arm_smmu_ste ste;
>  	struct arm_smmu_master *master = dev_iommu_priv_get(dev);
> +	struct arm_smmu_attach_state state = {
> +		.master = master,
> +	};
> +
> +	ret = arm_smmu_attach_prepare_vmaster(&state, domain);
> +	if (ret)
> +		return ret;
> +	arm_smmu_attach_commit_vmaster(&state);

I think you should make this into just a arm_smmu_clear_vmaster()
with less complication..

Jason



More information about the linux-arm-kernel mailing list