RE: [PATCH] drm/amdgpu: skip to create ras xxx_err_count node when ACA is enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[AMD Official Use Only - General]

Reviewed-by: Tao Zhou <tao.zhou1@xxxxxxx>

[Tao] it's better to add comment to explain how to get error count when aca is enabled.

BTW, according to the change, do we need to update ras tool?

> -----Original Message-----
> From: Wang, Yang(Kevin) <KevinYang.Wang@xxxxxxx>
> Sent: Wednesday, April 24, 2024 10:50 AM
> To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> Cc: Zhang, Hawking <Hawking.Zhang@xxxxxxx>; Zhou1, Tao
> <Tao.Zhou1@xxxxxxx>
> Subject: [PATCH] drm/amdgpu: skip to create ras xxx_err_count node when ACA
> is enabled
>
> skip to create 'xxx_err_count' node when ACA is enabled.
>
> Signed-off-by: Yang Wang <kevinyang.wang@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index 1e2b866751c3..96a8359b703b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -1756,6 +1756,9 @@ int amdgpu_ras_sysfs_create(struct amdgpu_device
> *adev,
>       if (!obj || obj->attr_inuse)
>               return -EINVAL;
>
> +     if (amdgpu_aca_is_enabled(adev))
> +             return 0;
> +
>       get_obj(obj);
>
>       snprintf(obj->fs_data.sysfs_name, sizeof(obj->fs_data.sysfs_name), @@ -
> 1790,6 +1793,9 @@ int amdgpu_ras_sysfs_remove(struct amdgpu_device *adev,
>       if (!obj || !obj->attr_inuse)
>               return -EINVAL;
>
> +     if (amdgpu_aca_is_enabled(adev))
> +             return 0;
> +
>       if (adev->dev->kobj.sd)
>               sysfs_remove_file_from_group(&adev->dev->kobj,
>                               &obj->sysfs_attr.attr,
> --
> 2.34.1





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux