* [PATCH] drm/amdgpu: print warning when input address is invalid
@ 2020-05-22 7:53 Guchun Chen
2020-05-22 8:10 ` Zhou1, Tao
0 siblings, 1 reply; 7+ messages in thread
From: Guchun Chen @ 2020-05-22 7:53 UTC (permalink / raw)
To: amd-gfx, Hawking.Zhang, Tao.Zhou1, John.Clements, Dennis.Li; +Cc: Guchun Chen
This will assist debug.
Signed-off-by: Guchun Chen <guchun.chen@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);
ret = -EINVAL;
break;
}
--
2.17.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
* RE: [PATCH] drm/amdgpu: print warning when input address is invalid
2020-05-22 7:53 [PATCH] drm/amdgpu: print warning when input address is invalid Guchun Chen
@ 2020-05-22 8:10 ` Zhou1, Tao
2020-05-22 8:30 ` Chen, Guchun
0 siblings, 1 reply; 7+ messages in thread
From: Zhou1, Tao @ 2020-05-22 8:10 UTC (permalink / raw)
To: Chen, Guchun, amd-gfx, Zhang, Hawking, Clements, John, Li, Dennis
[AMD Official Use Only - Internal Distribution Only]
> -----Original Message-----
> From: Chen, Guchun <Guchun.Chen@amd.com>
> Sent: 2020年5月22日 15:53
> To: amd-gfx@lists.freedesktop.org; Zhang, Hawking
> <Hawking.Zhang@amd.com>; Zhou1, Tao <Tao.Zhou1@amd.com>;
> Clements, John <John.Clements@amd.com>; Li, Dennis
> <Dennis.Li@amd.com>
> Cc: Chen, Guchun <Guchun.Chen@amd.com>
> Subject: [PATCH] drm/amdgpu: print warning when input address is invalid
>
> This will assist debug.
>
> Signed-off-by: Guchun Chen <guchun.chen@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);
> ret = -EINVAL;
> break;
> }
> --
> 2.17.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] drm/amdgpu: print warning when input address is invalid
2020-05-22 8:10 ` Zhou1, Tao
@ 2020-05-22 8:30 ` Chen, Guchun
2020-05-22 8:51 ` Zhou1, Tao
0 siblings, 1 reply; 7+ messages in thread
From: Chen, Guchun @ 2020-05-22 8:30 UTC (permalink / raw)
To: Zhou1, Tao, amd-gfx, Zhang, Hawking, Clements, John, Li, Dennis
[AMD Public Use]
Hi Tao,
Please see my response inline.
Regards,
Guchun
-----Original Message-----
From: Zhou1, Tao <Tao.Zhou1@amd.com>
Sent: Friday, May 22, 2020 4:11 PM
To: Chen, Guchun <Guchun.Chen@amd.com>; amd-gfx@lists.freedesktop.org; Zhang, Hawking <Hawking.Zhang@amd.com>; Clements, John <John.Clements@amd.com>; Li, Dennis <Dennis.Li@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@amd.com>
> Sent: 2020年5月22日 15:53
> To: amd-gfx@lists.freedesktop.org; Zhang, Hawking
> <Hawking.Zhang@amd.com>; Zhou1, Tao <Tao.Zhou1@amd.com>; Clements,
> John <John.Clements@amd.com>; Li, Dennis <Dennis.Li@amd.com>
> Cc: Chen, Guchun <Guchun.Chen@amd.com>
> Subject: [PATCH] drm/amdgpu: print warning when input address is
> invalid
>
> This will assist debug.
>
> Signed-off-by: Guchun Chen <guchun.chen@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
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] drm/amdgpu: print warning when input address is invalid
2020-05-22 8:30 ` Chen, Guchun
@ 2020-05-22 8:51 ` Zhou1, Tao
2020-05-22 8:56 ` Chen, Guchun
0 siblings, 1 reply; 7+ messages in thread
From: Zhou1, Tao @ 2020-05-22 8:51 UTC (permalink / raw)
To: Chen, Guchun, amd-gfx, Zhang, Hawking, Clements, John, Li, Dennis
[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@amd.com>
> -----Original Message-----
> From: Chen, Guchun <Guchun.Chen@amd.com>
> Sent: 2020年5月22日 16:31
> To: Zhou1, Tao <Tao.Zhou1@amd.com>; amd-gfx@lists.freedesktop.org;
> Zhang, Hawking <Hawking.Zhang@amd.com>; Clements, John
> <John.Clements@amd.com>; Li, Dennis <Dennis.Li@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@amd.com>
> Sent: Friday, May 22, 2020 4:11 PM
> To: Chen, Guchun <Guchun.Chen@amd.com>; amd-
> gfx@lists.freedesktop.org; Zhang, Hawking <Hawking.Zhang@amd.com>;
> Clements, John <John.Clements@amd.com>; Li, Dennis
> <Dennis.Li@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@amd.com>
> > Sent: 2020年5月22日 15:53
> > To: amd-gfx@lists.freedesktop.org; Zhang, Hawking
> > <Hawking.Zhang@amd.com>; Zhou1, Tao <Tao.Zhou1@amd.com>;
> Clements,
> > John <John.Clements@amd.com>; Li, Dennis <Dennis.Li@amd.com>
> > Cc: Chen, Guchun <Guchun.Chen@amd.com>
> > Subject: [PATCH] drm/amdgpu: print warning when input address is
> > invalid
> >
> > This will assist debug.
> >
> > Signed-off-by: Guchun Chen <guchun.chen@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
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] drm/amdgpu: print warning when input address is invalid
2020-05-22 8:51 ` Zhou1, Tao
@ 2020-05-22 8:56 ` Chen, Guchun
0 siblings, 0 replies; 7+ messages in thread
From: Chen, Guchun @ 2020-05-22 8:56 UTC (permalink / raw)
To: Zhou1, Tao, amd-gfx, Zhang, Hawking, Clements, John, Li, Dennis
[AMD Public Use]
Thanks Tao. I will address that when pushing.
Regards,
Guchun
-----Original Message-----
From: Zhou1, Tao <Tao.Zhou1@amd.com>
Sent: Friday, May 22, 2020 4:51 PM
To: Chen, Guchun <Guchun.Chen@amd.com>; amd-gfx@lists.freedesktop.org; Zhang, Hawking <Hawking.Zhang@amd.com>; Clements, John <John.Clements@amd.com>; Li, Dennis <Dennis.Li@amd.com>
Subject: RE: [PATCH] drm/amdgpu: print warning when input address is invalid
[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@amd.com>
> -----Original Message-----
> From: Chen, Guchun <Guchun.Chen@amd.com>
> Sent: 2020年5月22日 16:31
> To: Zhou1, Tao <Tao.Zhou1@amd.com>; amd-gfx@lists.freedesktop.org;
> Zhang, Hawking <Hawking.Zhang@amd.com>; Clements, John
> <John.Clements@amd.com>; Li, Dennis <Dennis.Li@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@amd.com>
> Sent: Friday, May 22, 2020 4:11 PM
> To: Chen, Guchun <Guchun.Chen@amd.com>; amd-
> gfx@lists.freedesktop.org; Zhang, Hawking <Hawking.Zhang@amd.com>;
> Clements, John <John.Clements@amd.com>; Li, Dennis <Dennis.Li@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@amd.com>
> > Sent: 2020年5月22日 15:53
> > To: amd-gfx@lists.freedesktop.org; Zhang, Hawking
> > <Hawking.Zhang@amd.com>; Zhou1, Tao <Tao.Zhou1@amd.com>;
> Clements,
> > John <John.Clements@amd.com>; Li, Dennis <Dennis.Li@amd.com>
> > Cc: Chen, Guchun <Guchun.Chen@amd.com>
> > Subject: [PATCH] drm/amdgpu: print warning when input address is
> > invalid
> >
> > This will assist debug.
> >
> > Signed-off-by: Guchun Chen <guchun.chen@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
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/amdgpu: print warning when input address is invalid
2020-05-22 10:00 Guchun Chen
@ 2020-05-22 10:03 ` Nirmoy
0 siblings, 0 replies; 7+ messages in thread
From: Nirmoy @ 2020-05-22 10:03 UTC (permalink / raw)
To: amd-gfx
LGTM
Acked-by: Nirmoy Das <nirmoy.das@amd.com>
On 5/22/20 12:00 PM, Guchun Chen wrote:
> This will assist debug in error injection case.
>
> Signed-off-by: Guchun Chen <guchun.chen@amd.com>
> Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index 50fe08bf2f72..9475891ee989 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -318,6 +318,9 @@ 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, "RAS WARN: input address "
> + "0x%llx is invalid.",
> + data.inject.address);
> ret = -EINVAL;
> break;
> }
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] drm/amdgpu: print warning when input address is invalid
@ 2020-05-22 10:00 Guchun Chen
2020-05-22 10:03 ` Nirmoy
0 siblings, 1 reply; 7+ messages in thread
From: Guchun Chen @ 2020-05-22 10:00 UTC (permalink / raw)
To: amd-gfx, Hawking.Zhang, Dennis.Li, Tao.Zhou1, John.Clements; +Cc: Guchun Chen
This will assist debug in error injection case.
Signed-off-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index 50fe08bf2f72..9475891ee989 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -318,6 +318,9 @@ 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, "RAS WARN: input address "
+ "0x%llx is invalid.",
+ data.inject.address);
ret = -EINVAL;
break;
}
--
2.17.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-05-22 10:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-22 7:53 [PATCH] drm/amdgpu: print warning when input address is invalid Guchun Chen
2020-05-22 8:10 ` Zhou1, Tao
2020-05-22 8:30 ` Chen, Guchun
2020-05-22 8:51 ` Zhou1, Tao
2020-05-22 8:56 ` Chen, Guchun
2020-05-22 10:00 Guchun Chen
2020-05-22 10:03 ` Nirmoy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).