drm/amdgpu: Restore information reporting in RAS
Subsystems (2)
PATCH 1/1 drm/amdgpu: Restore information reporting in RAS
A recent patch took away the reporting of number of RAS records and the threshold due to the way it was edited/spliced on top of the code. This patch restores this reporting.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +4 -1
@@ -1112,7 +1112,10 @@ int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control, res =0 ; }else { *exceed_err_limit = true; -dev_err (adev->dev,"GPU will not be initialized. Replace this GPU or increase the threshold." ); +dev_err (adev->dev, +"RAS records:%d exceed threshold:%d, " +"GPU will not be initialized. Replace this GPU or increase the threshold" , + control->ras_num_recs, ras->bad_page_cnt_threshold); } } }else {
base-commit: b60bccb408c831c685b2a257eff575bcda2cbe9d
Signature · 1 line
2.33.1.558.g2bd2f258f4
[AMD Official Use Only]
Thanks Luben
Kent
Quoted 46 lines
-----Original Message-----
From: Tuikov, Luben <[email protected]>
Sent: Monday, October 25, 2021 12:02 PM
To: [email protected]
Cc: Tuikov, Luben <[email protected]>; Russell, Kent <[email protected]>; Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu: Restore information reporting in RASA recent patch took away the reporting of number of RAS records and the threshold due to the way it was edited/spliced on top of the code. This patch restores this reporting.
Cc Kent Russell <[email protected]>Cc Alex Deucher <[email protected]>Fixes 07df2fb092d09e ("drm/amdgpu: Add kernel parameter support for ignoring bad pagethreshold")
Signed-off-by Luben Tuikov <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +4
-1@@ -1112,7 +1112,10 @@ int amdgpu_ras_eeprom_init(structamdgpu_ras_eeprom_control *control, res =0 ; }else { *exceed_err_limit = true; - dev_err(adev->dev, "GPU will not be initialized. Replace this GPU or increase the threshold."); + dev_err(adev->dev, + "RAS records:%d exceed threshold:%d, " + "GPU will not be initialized. Replace this GPU or increase the threshold", + control->ras_num_recs, ras-Quoted 1 line
bad_page_cnt_threshold);drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +0
-0} } }else {base-commit:
b60bccb408c831c685b2a257eff575bcda2cbe9d--
2.33.1.558.g2bd2f258f4
Quoted 9 lines · Luben Tuikov
A recent patch took away the reporting of number of RAS records and the threshold due to the way it was edited/spliced on top of the code. This patch restores this reporting.
Cc Kent Russell <[email protected]>Cc Alex Deucher <[email protected]>Fixes 07df2fb092d09e ("drm/amdgpu: Add kernel parameter support for ignoring bad page threshold")Signed-off-by Luben Tuikov <[email protected]>
Quoted 25 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +4
-1@@ -1112,7 +1112,10 @@ int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control, res =0 ; }else { *exceed_err_limit = true; -dev_err (adev->dev,"GPU will not be initialized. Replace this GPU or increase the threshold." ); +dev_err (adev->dev, +"RAS records:%d exceed threshold:%d, " +"GPU will not be initialized. Replace this GPU or increase the threshold" , + control->ras_num_recs, ras->bad_page_cnt_threshold); } } }else {base-commit:
b60bccb408c831c685b2a257eff575bcda2cbe9d--
2.33.1.558.g2bd2f258f4
[Public]
Does the message need a mention about the newly added option to ignore threshold?
Thanks,
Lijo
________________________________
From: amd-gfx <[email protected]> on behalf of Luben Tuikov <[email protected]>
Sent: Monday, October 25, 2021 9:32:20 PM
To: [email protected] <[email protected]>
Cc: Tuikov, Luben <[email protected]>; Russell, Kent <[email protected]>; Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu: Restore information reporting in RAS
A recent patch took away the reporting of number of RAS records and the threshold due to the way it was edited/spliced on top of the code. This patch restores this reporting.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +4 -1
@@ -1112,7 +1112,10 @@ int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control, res =0 ; }else { *exceed_err_limit = true; -dev_err (adev->dev,"GPU will not be initialized. Replace this GPU or increase the threshold." ); +dev_err (adev->dev, +"RAS records:%d exceed threshold:%d, " +"GPU will not be initialized. Replace this GPU or increase the threshold" , + control->ras_num_recs, ras->bad_page_cnt_threshold); } } }else {
base-commit: b60bccb408c831c685b2a257eff575bcda2cbe9d --
2.33.1.558.g2bd2f258f4
Am 2021-10-25 um 12:02 p.m. schrieb Luben Tuikov:
Quoted 17 lines
A recent patch took away the reporting of number of RAS records and the threshold due to the way it was edited/spliced on top of the code. This patch restores this reporting.
Cc Kent Russell <[email protected]>Cc Alex Deucher <[email protected]>Fixes 07df2fb092d09e ("drm/amdgpu: Add kernel parameter support for ignoring bad page threshold")Signed-off-by Luben Tuikov <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control, · line 1117
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +3
-1@@ -1112,7 +1112,10 @@ int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control, res =0 ; }else { *exceed_err_limit = true; -dev_err (adev->dev,"GPU will not be initialized. Replace this GPU or increase the threshold." ); + dev_err(adev->dev, + "RAS records:%d exceed threshold:%d, " + "GPU will not be initialized. Replace this GPU or increase the threshold",
Splitting messages across multiple lines is usually discouraged (presumably because it makes them hard to grep). I think checkpatch will treat this as an error, while a long line is just a warning. Therefore it seems that long lines are less bad than split messages.
Regards,
Felix
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +1
-0+ control->ras_num_recs, ras->bad_page_cnt_threshold); } } }else {base-commit:
b60bccb408c831c685b2a257eff575bcda2cbe9d
[AMD Official Use Only]
Quoted 39 lines
-----Original Message-----
From: Kuehling, Felix <[email protected]>
Sent: Monday, October 25, 2021 1:30 PM
To: Tuikov, Luben <[email protected]>; [email protected]
Cc: Russell, Kent <[email protected]>; Deucher, Alexander <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: Restore information reporting in RASAm 2021-10-25 um 12:02 p.m. schrieb Luben Tuikov:
Quoted 7 lines
A recent patch took away the reporting of number of RAS records and the threshold due to the way it was edited/spliced on top of the code. This patch restores this reporting.
Cc Kent Russell <[email protected]>Cc Alex Deucher <[email protected]>Fixes 07df2fb092d09e ("drm/amdgpu: Add kernel parameter support for ignoring badpage threshold")
Review
Quoted 6 lines
Signed-off-by Luben Tuikov <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.cdrivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c int amdgpu_ras_eeprom_init(struct
Quoted 4 lines
index
ae64ca02ccc4f8..05117eda105b55100644drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +0
-0@@ -1112,7 +1112,10 @@ int amdgpu_ras_eeprom_init(struct
amdgpu_ras_eeprom_control*control,drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control,
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +0
-1res =0 ; }else { *exceed_err_limit = true; - dev_err(adev->dev, "GPU will not be initialized. Replace thisGPU or increase the threshold.");
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control,
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +3
-0+dev_err (adev->dev, +"RAS records:%d exceed threshold:%d, " + "GPU will not be initialized. Replace this GPU orincrease the threshold",
Quoted 4 lines
Splitting messages across multiple lines is usually discouraged (presumably because it makes them hard to grep). I think checkpatch will treat this as an error, while a long line is just a warning. Therefore it seems that long lines are less bad than split messages.
There are a few spots in the eeprom file where it gets done like this; I don't really like it either. Under https://www.kernel.org/doc/html/v5.13/process/coding-style.html , I see it supporting splitting for ASM (point 20) but not for regular string (point 2).
In this one he's just restoring something I dropped, verbatim, so I have no issue giving it my RB.
Kent
Quoted 12 lines
Regards,
FelixQuoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +1
-0+ control->ras_num_recs, ras- bad_page_cnt_threshold); } }} else {
base-commit:
b60bccb408c831c685b2a257eff575bcda2cbe9d