[PATCH] drm/amdgpu: print warning when input address is invalid
Zhou1, Tao
Tao.Zhou1 at amd.com
Fri May 22 08:51:03 UTC 2020
[AMD Public Use]
OK, but I still suggest adding "RAS" in the print to indicate its module, with this addressed the patch is:
Reviewed-by: Tao Zhou <tao.zhou1 at amd.com>
> -----Original Message-----
> From: Chen, Guchun <Guchun.Chen at amd.com>
> Sent: 2020年5月22日 16:31
> To: Zhou1, Tao <Tao.Zhou1 at amd.com>; amd-gfx at lists.freedesktop.org;
> Zhang, Hawking <Hawking.Zhang at amd.com>; Clements, John
> <John.Clements at amd.com>; Li, Dennis <Dennis.Li at amd.com>
> Subject: RE: [PATCH] drm/amdgpu: print warning when input address is
> invalid
>
> [AMD Public Use]
>
> Hi Tao,
>
> Please see my response inline.
>
> Regards,
> Guchun
>
> -----Original Message-----
> From: Zhou1, Tao <Tao.Zhou1 at amd.com>
> Sent: Friday, May 22, 2020 4:11 PM
> To: Chen, Guchun <Guchun.Chen at amd.com>; amd-
> gfx at lists.freedesktop.org; Zhang, Hawking <Hawking.Zhang at amd.com>;
> Clements, John <John.Clements at amd.com>; Li, Dennis
> <Dennis.Li at amd.com>
> Subject: RE: [PATCH] drm/amdgpu: print warning when input address is
> invalid
>
> [AMD Official Use Only - Internal Distribution Only]
>
>
>
> > -----Original Message-----
> > From: Chen, Guchun <Guchun.Chen at amd.com>
> > Sent: 2020年5月22日 15:53
> > To: amd-gfx at lists.freedesktop.org; Zhang, Hawking
> > <Hawking.Zhang at amd.com>; Zhou1, Tao <Tao.Zhou1 at amd.com>;
> Clements,
> > John <John.Clements at amd.com>; Li, Dennis <Dennis.Li at amd.com>
> > Cc: Chen, Guchun <Guchun.Chen at amd.com>
> > Subject: [PATCH] drm/amdgpu: print warning when input address is
> > invalid
> >
> > This will assist debug.
> >
> > Signed-off-by: Guchun Chen <guchun.chen at amd.com>
> > ---
> > drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> > index 6e911ca97038..5c73f444eaef 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> > @@ -318,6 +318,8 @@ static ssize_t
> > amdgpu_ras_debugfs_ctrl_write(struct
> > file *f, const char __user *
> > case 2:
> > if ((data.inject.address >= adev->gmc.mc_vram_size) ||
> > (data.inject.address >= RAS_UMC_INJECT_ADDR_LIMIT)) {
> > + dev_warn(adev->dev, "Input address 0x%llx is
> > invalid.",
> > + data.inject.address);
>
> [Tao] How about this way:
> dev_warn(adev->dev, "RAS injection address 0x%llx exceeds limit 0x%llx.",
> data.inject.address,
> RAS_UMC_INJECT_ADDR_LIMIT); [Guchun]There are two cases for invalid
> input address, one is limited by board vram size, and one is by
> RAS_UMC_INJECT_ADDR_LIMIT.
> So it's not necessary to distinguish here, just print warning to let user knows
> the input address is not correct, and this error injection is blocked.
>
> > ret = -EINVAL;
> > break;
> > }
> > --
> > 2.17.1
More information about the amd-gfx
mailing list