[PATCH] uacce: add print information if not enable sva

Joe Perches joe at perches.com
Fri Jun 4 17:57:00 AEST 2021


On Fri, 2021-06-04 at 15:46 +0800, Kai Ye wrote:
> Add print information necessary if user not enable sva.
[]
> diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c
[]
> @@ -387,15 +387,22 @@ static void uacce_release(struct device *dev)
>  
> 
>  static unsigned int uacce_enable_sva(struct device *parent, unsigned int flags)
>  {
> +	int ret;
[]
> +	ret = iommu_dev_enable_feature(parent, IOMMU_DEV_FEAT_IOPF);
> +	if (ret) {
> +		dev_err(parent, "failed to enable IOPF feature! ret = %d\n", ret);

Perhaps use %pe, ERR_PTR(ret) to get descriptive error output

> +		dev_err(parent, "failed to enable SVA feature! ret = %d\n", ret);

here too




More information about the Linux-accelerators mailing list