drm/amdgpu: don't increase UMC RAS UE count if no new bad page
Subsystems (2)
PATCH 1/1 drm/amdgpu: don't increase UMC RAS UE count if no new bad page
If a UMC bad page is reserved but not freed by an application, the application may trigger uncorrectable error repeatly by accessing the page.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +8 -1
@@ -2049,7 +2049,7 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev, {struct amdgpu_ras *con =amdgpu_ras_get_context (adev);struct ras_err_handler_data *data; -int ret =0 ; +int ret =0 , old_cnt;uint32_t i;if (!con || !con->eh_data || !bps || pages <=0 )
@@ -2060,6 +2060,8 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev,if (!data) goto out; + old_cnt = data->count; +for (i =0 ; i < pages; i++) {if (amdgpu_ras_check_bad_page_unlock (con, bps[i].retired_page <<AMDGPU_GPU_PAGE_SHIFT ))
@@ -2079,6 +2081,11 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev, data->count++; data->space_left--; } + +/* all pages have been reserved before, no new bad page */ +if (old_cnt == data->count) + ret = -EEXIST ; + out:mutex_unlock (&con->recovery_lock);
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +5 -1
@@ -145,8 +145,12 @@ static int amdgpu_umc_do_page_retirement(struct amdgpu_device *adev,if ((amdgpu_bad_page_threshold !=0 ) && err_data->err_addr_cnt) { -amdgpu_ras_add_bad_pages (adev, err_data->err_addr, + ret =amdgpu_ras_add_bad_pages (adev, err_data->err_addr, err_data->err_addr_cnt); +/* if no new bad page is found, no need to increase ue count */ +if (ret == -EEXIST ) + err_data->ue_count =0 ; +amdgpu_ras_save_bad_pages (adev);amdgpu_dpm_send_hbm_bad_pages_num (adev, con->eeprom_control.ras_num_recs);
Signature · 1 line
2.35.1
[AMD Official Use Only - General]
+ /* if no new bad page is found, no need to increase ue count */
+ if (ret == -EEXIST)
+ err_data->ue_count = 0;
Returning EEXIST in such case is not reasonable. Might consider return a bool for amdgpu_ras_add_bad_pages: true means it does add some new bad page; false means it doesn't change anything.
Regards,
Hawking
-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Friday, February 10, 2023 16:45
To: [email protected]; Zhang, Hawking <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Li, Candice <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if no new bad page
If a UMC bad page is reserved but not freed by an application, the application may trigger uncorrectable error repeatly by accessing the page.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -1
@@ -2049,7 +2049,7 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev, {struct amdgpu_ras *con =amdgpu_ras_get_context (adev);struct ras_err_handler_data *data; -int ret =0 ; +int ret =0 , old_cnt;uint32_t i; if (!con || !con->eh_data || !bps || pages <= 0) @@ -2060,6 +2060,8 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev, if (!data)
goto out;
+ old_cnt = data->count;
+
for (i = 0; i < pages; i++) {
if (amdgpu_ras_check_bad_page_unlock(con,
bps[i].retired_page << AMDGPU_GPU_PAGE_SHIFT)) @@ -2079,6 +2081,11 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev,
data->count++;
data->space_left--;
}+
+ /* all pages have been reserved before, no new bad page */
+ if (old_cnt == data->count)
+ ret = -EEXIST;
+
out:
mutex_unlock(&con->recovery_lock);
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +5 -1
@@ -145,8 +145,12 @@ static int amdgpu_umc_do_page_retirement(struct amdgpu_device *adev,if ((amdgpu_bad_page_threshold !=0 ) && err_data->err_addr_cnt) { -amdgpu_ras_add_bad_pages (adev, err_data->err_addr, + ret =amdgpu_ras_add_bad_pages (adev, err_data->err_addr, err_data->err_addr_cnt); +/* if no new bad page is found, no need to increase ue count */ +if (ret == -EEXIST ) + err_data->ue_count =0 ; +amdgpu_ras_save_bad_pages (adev);amdgpu_dpm_send_hbm_bad_pages_num (adev, con->eeprom_control.ras_num_recs);
--
2.35.1
[AMD Official Use Only - General]
Quoted 15 lines
-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Friday, February 10, 2023 11:02 PM
To: Zhou1, Tao <[email protected]>; [email protected]; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Li, Candice <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if no new bad page[AMD Official Use Only - General]
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +3
-0+/* if no new bad page is found, no need to increase ue count */ +if (ret == -EEXIST ) + err_data->ue_count =0 ;
Quoted 6 lines
Returning EEXIST in such case is not reasonable. Might consider return a bool for
amdgpu_ras_add_bad_pages: true means it does add some new bad page; false means it doesn't change anything.Regards,
Hawking
[Tao] but it can returns -ENOMEM, amdgpu_ras_load_bad_pages and amdgpu_ras_recovery_init also need to check the return value. I'd like to keep the type of return value unchanged. How about -EINVAL?
Quoted 79 lines
-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Friday, February 10, 2023 16:45
To: [email protected]; Zhang, Hawking <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Li, Candice <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if no new bad pageIf a UMC bad page is reserved but not freed by an application, the application may trigger uncorrectable error repeatly by accessing the page.
Signed-off-by Tao Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1
-1@@ -2049,7 +2049,7 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev, {struct amdgpu_ras *con =amdgpu_ras_get_context (adev);struct ras_err_handler_data *data; -int ret =0 ; +int ret =0 , old_cnt;uint32_t i; if (!con || !con->eh_data || !bps || pages <= 0) @@ -2060,6 +2060,8 @@int amdgpu_ras_add_bad_pages(struct
amdgpu_device*adev,if (!data) goto out;drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +8
-0+ old_cnt = data->count; +for (i =0 ; i < pages; i++) { if (amdgpu_ras_check_bad_page_unlock(con, bps[i].retired_page << AMDGPU_GPU_PAGE_SHIFT)) @@ -2079,6 +2081,11 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev, data->count++; data->space_left--; } + +/* all pages have been reserved before, no new bad page */ +if (old_cnt == data->count) + ret = -EEXIST ; + out:mutex_unlock (&con->recovery_lock);drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +5
-1@@ -145,8 +145,12 @@ static int amdgpu_umc_do_page_retirement(struct amdgpu_device *adev, if ((amdgpu_bad_page_threshold != 0) && err_data->err_addr_cnt) { -amdgpu_ras_add_bad_pages (adev, err_data->err_addr, + ret =amdgpu_ras_add_bad_pages (adev, err_data->err_addr, err_data->err_addr_cnt); +/* if no new bad page is found, no need to increase ue count */ +if (ret == -EEXIST ) + err_data->ue_count =0 ; +amdgpu_ras_save_bad_pages (adev);amdgpu_dpm_send_hbm_bad_pages_num(adev, con-
Quoted 1 line
eeprom_control.ras_num_recs);
--
2.35.1
[AMD Official Use Only - General]
Quoted 32 lines
-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Monday, February 13, 2023 4:25 PM
To: Zhang, Hawking <[email protected]>; amd- [email protected]; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Li, Candice <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if no new bad page[AMD Official Use Only - General]
Quoted 9 lines
-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Friday, February 10, 2023 11:02 PM
To: Zhou1, Tao <[email protected]>; [email protected]; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Li, Candice <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if no new bad pageQuoted 3 lines
[AMD Official Use Only - General]
+ /* if no new bad page is found, no need to increase ue count
*/
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +2
-0+if (ret == -EEXIST ) + err_data->ue_count =0 ;Returning EEXIST in such case is not reasonable. Might consider return a bool for
amdgpu_ras_add_bad_pages: true means it does add some new bad page; false means it doesn't change anything.
Quoted 7 lines
Quoted 2 lines
Regards,
Hawking[Tao] but it can returns
-ENOMEM,amdgpu_ras_load_bad_pagesandamdgpu_ras_recovery_initalso need to check the return value. I'd like to keep the type of return value unchanged.
How about-EINVAL?
Stanley: How about return -EALREADY?
Regards,
Stanley
Quoted 90 lines
Quoted 7 lines
-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Friday, February 10, 2023 16:45
To: [email protected]; Zhang, Hawking <[email protected]>; Yang, Stanley <[email protected]>;Chai,
Quoted 3 lines
Thomas <[email protected]>; Li, Candice <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if nonew
Quoted 17 lines
bad page
If a UMC bad page is reserved but not freed by an application, the application may trigger uncorrectable error repeatly by accessing the page.
Signed-off-by Tao Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c int amdgpu_ras_add_bad_pages(struct
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2
-1@@ -2049,7 +2049,7 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev, {struct amdgpu_ras *con =amdgpu_ras_get_context (adev);struct ras_err_handler_data *data; -int ret =0 ; +int ret =0 , old_cnt;uint32_t i; if (!con || !con->eh_data || !bps || pages <= 0) @@ -2060,6 +2060,8 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device*adev,
Quoted 10 lines
if (!data) goto out;drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2
-0+ old_cnt = data->count; +for (i =0 ; i < pages; i++) {if (amdgpu_ras_check_bad_page_unlock (con, bps[i].retired_page <<AMDGPU_GPU_PAGE_SHIFT ))@@ -2079,6
+2081,11 @@ int amdgpu_ras_add_bad_pages(structamdgpu_device*adev,
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c static int
Quoted 17 lines
data->count++; data->space_left--; }drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +5
-0+ +/* all pages have been reserved before, no new bad page */ +if (old_cnt == data->count) + ret = -EEXIST ; + out:mutex_unlock (&con->recovery_lock);drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +0
-0@@ -145,8 +145,12 @@ static intamdgpu_umc_do_page_retirement(struct
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c static int amdgpu_umc_do_page_retirement(struct amdgpu_device *adev,
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +3
-1amdgpu_device *adev, if ((amdgpu_bad_page_threshold != 0) && err_data->err_addr_cnt) { -amdgpu_ras_add_bad_pages (adev, err_data->err_addr, + ret =amdgpu_ras_add_bad_pages (adev, + err_data->err_addr, err_data->err_addr_cnt); +/* if no new bad page is found, no need to increase ue count */
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +3
-0+if (ret == -EEXIST ) + err_data->ue_count =0 ; +amdgpu_ras_save_bad_pages (adev); amdgpu_dpm_send_hbm_bad_pages_num(adev, con-Quoted 1 line
eeprom_control.ras_num_recs);
--
2.35.1
[AMD Official Use Only - General]
-EINVAL looks better than EEXIST, but it still doesn't fit the case? Alternatively, Can we compare the count before and after amdgpu_ras_add_bad_pages to decide whether reset ue_count to 0 or not. That could be straightforward than struggling for returning which error code in this specific case.
Regards,
Hawking
-----Original Message-----
From: Yang, Stanley <[email protected]>
Sent: Tuesday, February 14, 2023 10:42
To: Zhou1, Tao <[email protected]>; Zhang, Hawking <[email protected]>; [email protected]; Chai, Thomas <[email protected]>; Li, Candice <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if no new bad page
[AMD Official Use Only - General]
Quoted 33 lines
-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Monday, February 13, 2023 4:25 PM
To: Zhang, Hawking <[email protected]>; amd- [email protected]; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Li, Candice <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if no new bad page[AMD Official Use Only - General]
Quoted 9 lines
-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Friday, February 10, 2023 11:02 PM
To: Zhou1, Tao <[email protected]>; [email protected]; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Li, Candice <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if no new bad pageQuoted 4 lines
[AMD Official Use Only - General]
+ /* if no new bad page is found, no need to
+ increase ue count*/
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +2
-0+if (ret == -EEXIST ) + err_data->ue_count =0 ;Returning EEXIST in such case is not reasonable. Might consider return a bool for
amdgpu_ras_add_bad_pages: true means it does add some new bad page; false means it doesn't change anything.
Quoted 7 lines
Quoted 2 lines
Regards,
Hawking[Tao] but it can returns
-ENOMEM,amdgpu_ras_load_bad_pagesandamdgpu_ras_recovery_initalso need to check the return value. I'd like to keep the type of return value unchanged.
How about-EINVAL?
Stanley: How about return -EALREADY?
Regards,
Stanley
Quoted 91 lines
Quoted 7 lines
-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Friday, February 10, 2023 16:45
To: [email protected]; Zhang, Hawking <[email protected]>; Yang, Stanley <[email protected]>;Chai,
Quoted 3 lines
Thomas <[email protected]>; Li, Candice <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if nonew
Quoted 17 lines
bad page
If a UMC bad page is reserved but not freed by an application, the application may trigger uncorrectable error repeatly by accessing the page.
Signed-off-by Tao Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c int amdgpu_ras_add_bad_pages(struct
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2
-1@@ -2049,7 +2049,7 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev, {struct amdgpu_ras *con =amdgpu_ras_get_context (adev);struct ras_err_handler_data *data; -int ret =0 ; +int ret =0 , old_cnt;uint32_t i; if (!con || !con->eh_data || !bps || pages <= 0) @@ -2060,6 +2060,8 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device*adev,
Quoted 10 lines
if (!data) goto out;drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2
-0+ old_cnt = data->count; +for (i =0 ; i < pages; i++) { if (amdgpu_ras_check_bad_page_unlock(con, bps[i].retired_page <<
AMDGPU_GPU_PAGE_SHIFT)) @@ -2079,6
+2081,11 @@ int amdgpu_ras_add_bad_pages(structamdgpu_device*adev,
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c static int
Quoted 17 lines
data->count++; data->space_left--; }drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +5
-0+ +/* all pages have been reserved before, no new bad page */ +if (old_cnt == data->count) + ret = -EEXIST ; + out:mutex_unlock (&con->recovery_lock);drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +0
-0@@ -145,8 +145,12 @@ static intamdgpu_umc_do_page_retirement(struct
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c static int · line 154
Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +4
-1amdgpu_device *adev, if ((amdgpu_bad_page_threshold != 0) && err_data->err_addr_cnt) { -amdgpu_ras_add_bad_pages (adev, err_data->err_addr, + ret =amdgpu_ras_add_bad_pages (adev, + err_data->err_addr, err_data->err_addr_cnt); +/* if no new bad page is found, no need to +increase ue count */
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +3
-0+if (ret == -EEXIST ) + err_data->ue_count =0 ; +amdgpu_ras_save_bad_pages (adev); amdgpu_dpm_send_hbm_bad_pages_num(adev, con-Quoted 1 line
eeprom_control.ras_num_recs);
--
2.35.1
[AMD Official Use Only - General]
OK, I'll add a new function to do the check.
Tao
Quoted 168 lines
-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Tuesday, February 14, 2023 6:03 PM
To: Yang, Stanley <[email protected]>; Zhou1, Tao <[email protected]>; [email protected]; Chai, Thomas <[email protected]>; Li, Candice <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if no new bad page[AMD Official Use Only - General]
-EINVALlooks better than EEXIST, but it still doesn't fit the case? Alternatively, Can we compare the count before and afteramdgpu_ras_add_bad_pagesto decide whether resetue_countto 0 or not. That could be straightforward than struggling for returning which error code in this specific case.Regards,
Hawking-----Original Message-----
From: Yang, Stanley <[email protected]>
Sent: Tuesday, February 14, 2023 10:42
To: Zhou1, Tao <[email protected]>; Zhang, Hawking <[email protected]>; [email protected]; Chai, Thomas <[email protected]>; Li, Candice <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if no new bad page[AMD Official Use Only - General]
Quoted 33 lines
-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Monday, February 13, 2023 4:25 PM
To: Zhang, Hawking <[email protected]>; amd- [email protected]; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Li, Candice <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if no new bad page[AMD Official Use Only - General]
Quoted 9 lines
-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Friday, February 10, 2023 11:02 PM
To: Zhou1, Tao <[email protected]>; [email protected]; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Li, Candice <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if no new bad pageQuoted 4 lines
[AMD Official Use Only - General]
+ /* if no new bad page is found, no need to
+ increase ue count*/
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +2
-0+if (ret == -EEXIST ) + err_data->ue_count =0 ;Returning EEXIST in such case is not reasonable. Might consider return a bool for
amdgpu_ras_add_bad_pages: true means it does add some new bad page; false means it doesn't change anything.Quoted 7 lines
Quoted 2 lines
Regards,
Hawking[Tao] but it can returns
-ENOMEM,amdgpu_ras_load_bad_pagesandamdgpu_ras_recovery_initalso need to check the return value. I'd like to keep the type of return value unchanged.
How about-EINVAL?Stanley: How about return
-EALREADY?Regards,
StanleyQuoted 91 lines
Quoted 7 lines
-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Friday, February 10, 2023 16:45
To: [email protected]; Zhang, Hawking <[email protected]>; Yang, Stanley <[email protected]>;Chai,
Quoted 3 lines
Thomas <[email protected]>; Li, Candice <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if nonew
Quoted 17 lines
bad page
If a UMC bad page is reserved but not freed by an application, the application may trigger uncorrectable error repeatly by accessing the page.
Signed-off-by Tao Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c int amdgpu_ras_add_bad_pages(struct
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2
-1@@ -2049,7 +2049,7 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev, {struct amdgpu_ras *con =amdgpu_ras_get_context (adev);struct ras_err_handler_data *data; -int ret =0 ; +int ret =0 , old_cnt;uint32_t i; if (!con || !con->eh_data || !bps || pages <= 0) @@ -2060,6 +2060,8 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device*adev,
Quoted 10 lines
if (!data) goto out;drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2
-0+ old_cnt = data->count; +for (i =0 ; i < pages; i++) { if (amdgpu_ras_check_bad_page_unlock(con, bps[i].retired_page <<
AMDGPU_GPU_PAGE_SHIFT)) @@ -2079,6
+2081,11 @@ int amdgpu_ras_add_bad_pages(structamdgpu_device*adev,
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c static int
Quoted 17 lines
data->count++; data->space_left--; }drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +5
-0+ +/* all pages have been reserved before, no new bad page */ +if (old_cnt == data->count) + ret = -EEXIST ; + out:mutex_unlock (&con->recovery_lock);drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +0
-0@@ -145,8 +145,12 @@ static intamdgpu_umc_do_page_retirement(struct
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c static int · line 154
Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +4
-1amdgpu_device *adev, if ((amdgpu_bad_page_threshold != 0) && err_data->err_addr_cnt) { -amdgpu_ras_add_bad_pages (adev, err_data->err_addr, + ret =amdgpu_ras_add_bad_pages (adev, + err_data->err_addr, err_data->err_addr_cnt); +/* if no new bad page is found, no need to +increase ue count */
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +3
-0+if (ret == -EEXIST ) + err_data->ue_count =0 ; +amdgpu_ras_save_bad_pages (adev); amdgpu_dpm_send_hbm_bad_pages_num(adev, con-Quoted 1 line
eeprom_control.ras_num_recs);
--
2.35.1
Quoted 3 lines · Tao Zhou
If a UMC bad page is reserved but not freed by an application, the application may trigger uncorrectable error repeatly by accessing the page.
There is amdgpu_ras_check_bad_page which checks if address is already part of an existing bad page. Can't that be used?
Thanks,
Lijo
Quoted 58 lines
Signed-off-by Tao Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +8
-1@@ -2049,7 +2049,7 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev, {struct amdgpu_ras *con =amdgpu_ras_get_context (adev);struct ras_err_handler_data *data; -int ret =0 ; +int ret =0 , old_cnt;uint32_t i;if (!con || !con->eh_data || !bps || pages <=0 )@@ -2060,6 +2060,8 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev,if (!data) goto out; + old_cnt = data->count; +for (i =0 ; i < pages; i++) {if (amdgpu_ras_check_bad_page_unlock (con, bps[i].retired_page <<AMDGPU_GPU_PAGE_SHIFT ))@@ -2079,6 +2081,11 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev, data->count++; data->space_left--; } + +/* all pages have been reserved before, no new bad page */ +if (old_cnt == data->count) + ret = -EEXIST ; + out:mutex_unlock (&con->recovery_lock);drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +5
-1@@ -145,8 +145,12 @@ static int amdgpu_umc_do_page_retirement(struct amdgpu_device *adev,if ((amdgpu_bad_page_threshold !=0 ) && err_data->err_addr_cnt) { -amdgpu_ras_add_bad_pages (adev, err_data->err_addr, + ret =amdgpu_ras_add_bad_pages (adev, err_data->err_addr, err_data->err_addr_cnt); +/* if no new bad page is found, no need to increase ue count */ +if (ret == -EEXIST ) + err_data->ue_count =0 ; +amdgpu_ras_save_bad_pages (adev);amdgpu_dpm_send_hbm_bad_pages_num (adev, con->eeprom_control.ras_num_recs);
Quoted 19 lines
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Monday, February 13, 2023 8:38 PM
To: Zhou1, Tao <[email protected]>; [email protected]; Zhang, Hawking <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Li, Candice <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if no new bad pageQuoted 3 lines · Tao Zhou
If a UMC bad page is reserved but not freed by an application, the application may trigger uncorrectable error repeatly by accessing the page.
Quoted 5 lines
There is
amdgpu_ras_check_bad_pagewhich checks if address is already part of an existing bad page. Can't that be used?Thanks,
Lijo
[Tao] amdgpu_ras_check_bad_page is already called in amdgpu_ras_add_bad_pages, this patch just makes use of the result of amdgpu_ras_check_bad_page.
Quoted 67 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c int amdgpu_ras_add_bad_pages(struct
Quoted 13 lines
Signed-off-by Tao Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0
-0@@ -2049,7 +2049,7 @@ int amdgpu_ras_add_bad_pages(struct
amdgpu_device*adev,Quoted 12 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1
-1{struct amdgpu_ras *con =amdgpu_ras_get_context (adev);struct ras_err_handler_data *data; -int ret =0 ; +int ret =0 , old_cnt;uint32_t i; if (!con || !con->eh_data || !bps || pages <= 0) @@ -2060,6 +2060,8@@ int amdgpu_ras_add_bad_pages(struct
amdgpu_device*adev,
if (!data)
goto out;drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev, · line 2067
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2
-0+ old_cnt = data->count; +for (i =0 ; i < pages; i++) {if (amdgpu_ras_check_bad_page_unlock (con, bps[i].retired_page <<AMDGPU_GPU_PAGE_SHIFT ))@@ -2079,6
Quoted 18 lines
+2081,11 @@ int amdgpu_ras_add_bad_pages(struct
amdgpu_device*adev,
data->count++;
data->space_left--;
}drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +5
-0+ +/* all pages have been reserved before, no new bad page */ +if (old_cnt == data->count) + ret = -EEXIST ; + out:mutex_unlock (&con->recovery_lock);drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c static int amdgpu_umc_do_page_retirement(struct · line 152
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +2
-1@@ -145,8 +145,12 @@ static int amdgpu_umc_do_page_retirement(struct amdgpu_device *adev, if ((amdgpu_bad_page_threshold != 0) && err_data->err_addr_cnt) { -amdgpu_ras_add_bad_pages (adev, err_data->err_addr, + ret =amdgpu_ras_add_bad_pages (adev, err_data- err_addr, err_data->err_addr_cnt); +/* if no new bad page is found, no need to increase ue count */
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +3
-0+if (ret == -EEXIST ) + err_data->ue_count =0 ; +amdgpu_ras_save_bad_pages (adev);amdgpu_dpm_send_hbm_bad_pages_num(adev,
con->eeprom_control.ras_num_recs);
Quoted 19 lines · Tao
Quoted 19 lines
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Monday, February 13, 2023 8:38 PM
To: Zhou1, Tao <[email protected]>; [email protected]; Zhang, Hawking <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Li, Candice <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if no new bad pageQuoted 3 lines · Tao Zhou
If a UMC bad page is reserved but not freed by an application, the application may trigger uncorrectable error repeatly by accessing the page.
Quoted 8 lines
Quoted 5 lines
There is
amdgpu_ras_check_bad_pagewhich checks if address is already part of an existing bad page. Can't that be used?Thanks,
Lijo[Tao]
amdgpu_ras_check_bad_pageis already called inamdgpu_ras_add_bad_pages, this patch just makes use of the result ofamdgpu_ras_check_bad_page.
In the patch, below two are called after error count is set to 0.
amdgpu_ras_save_bad_pages amdgpu_dpm_send_hbm_bad_pages_num
Instead of that, just check if it's an existing badpage which is repeatedly accessed and proceed directly to the next step (reset if specified)
if (amdgpu_ras_check_bad_page(adev, address)) set error count to 0; goto reset_logic;
Thanks,
Lijo
Quoted 67 lines
Quoted 67 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c int amdgpu_ras_add_bad_pages(struct
Quoted 13 lines
Signed-off-by Tao Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0
-0@@ -2049,7 +2049,7 @@ int amdgpu_ras_add_bad_pages(struct
amdgpu_device*adev,Quoted 12 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1
-1{struct amdgpu_ras *con =amdgpu_ras_get_context (adev);struct ras_err_handler_data *data; -int ret =0 ; +int ret =0 , old_cnt;uint32_t i; if (!con || !con->eh_data || !bps || pages <= 0) @@ -2060,6 +2060,8@@ int amdgpu_ras_add_bad_pages(struct
amdgpu_device*adev,
if (!data)
goto out;drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev, · line 2067
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2
-0+ old_cnt = data->count; +for (i =0 ; i < pages; i++) {if (amdgpu_ras_check_bad_page_unlock (con, bps[i].retired_page <<AMDGPU_GPU_PAGE_SHIFT ))@@ -2079,6
Quoted 18 lines
+2081,11 @@ int amdgpu_ras_add_bad_pages(struct
amdgpu_device*adev,data->count++; data->space_left--; }drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +5
-0+ +/* all pages have been reserved before, no new bad page */ +if (old_cnt == data->count) + ret = -EEXIST ; + out:mutex_unlock (&con->recovery_lock);drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c static int amdgpu_umc_do_page_retirement(struct · line 152
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +2
-1@@ -145,8 +145,12 @@ static int amdgpu_umc_do_page_retirement(struct amdgpu_device *adev, if ((amdgpu_bad_page_threshold != 0) && err_data->err_addr_cnt) { -amdgpu_ras_add_bad_pages (adev, err_data->err_addr, + ret =amdgpu_ras_add_bad_pages (adev, err_data- err_addr, err_data->err_addr_cnt); +/* if no new bad page is found, no need to increase ue count */
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +3
-0+if (ret == -EEXIST ) + err_data->ue_count =0 ; +amdgpu_ras_save_bad_pages (adev);amdgpu_dpm_send_hbm_bad_pages_num(adev,
con->eeprom_control.ras_num_recs);
Quoted 53 lines
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Tuesday, February 14, 2023 12:55 PM
To: Zhou1, Tao <[email protected]>; [email protected]; Zhang, Hawking <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Li, Candice <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if no new bad pageQuoted 19 lines · Tao
Quoted 19 lines
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Monday, February 13, 2023 8:38 PM
To: Zhou1, Tao <[email protected]>; [email protected]; Zhang, Hawking <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Li, Candice <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if no new bad pageQuoted 3 lines · Tao Zhou
If a UMC bad page is reserved but not freed by an application, the application may trigger uncorrectable error repeatly by accessing the page.
Quoted 7 lines
Quoted 5 lines
There is
amdgpu_ras_check_bad_pagewhich checks if address is already part of an existing bad page. Can't that be used?Thanks,
Lijo[Tao]
amdgpu_ras_check_bad_pageis already called in
amdgpu_ras_add_bad_pages, this patch just makes use of the result ofamdgpu_ras_check_bad_page.Quoted 1 line
In the patch, below two are called after error count is set to 0.
amdgpu_ras_save_bad_pagesamdgpu_dpm_send_hbm_bad_pages_numInstead of that, just check if it's an existing badpage which is repeatedly accessed and proceed directly to the next step (reset if specified)
Quoted 6 lines
if (amdgpu_ras_check_bad_page(adev, address)) set error count to 0; goto reset_logic;Thanks,
Lijo
[Tao] 1. amdgpu_ras_check_bad_page checks only one page, but one ue can generate 16 or more pages.
2. if no new bad page is found, amdgpu_ras_save_bad_pages will do nothing and ras_num_recs won't increase.
3. gpu reset logic should follow the old way even ue count is set to 0.
This patch only set ue count to 0 if there is no new bad page, but other logic has no change.
Quoted 70 lines
Quoted 27 lines
Quoted 27 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c int amdgpu_ras_add_bad_pages(struct
Quoted 14 lines
Signed-off-by Tao Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0
-0@@ -2049,7 +2049,7 @@ int amdgpu_ras_add_bad_pages(struct
amdgpu_device*adev,Quoted 12 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2
-1{struct amdgpu_ras *con =amdgpu_ras_get_context (adev);struct ras_err_handler_data *data; -int ret =0 ; +int ret =0 , old_cnt;uint32_t i; if (!con || !con->eh_data || !bps || pages <= 0) @@ -2060,6 +2060,8 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev, if (!data) goto out;Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev, · line 2067
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2
-0+ old_cnt = data->count; +for (i =0 ; i < pages; i++) {if (amdgpu_ras_check_bad_page_unlock (con, bps[i].retired_page <<AMDGPU_GPU_PAGE_SHIFT ))@@ -2079,6
Quoted 1 line
+2081,11 @@ int amdgpu_ras_add_bad_pages(struct
amdgpu_device*adev,
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
data->count++; data->space_left--; }drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +5
-0+ +/* all pages have been reserved before, no new bad page */ +if (old_cnt == data->count) + ret = -EEXIST ; + out:mutex_unlock (&con->recovery_lock);Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c static int
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +0
-0@@ -145,8 +145,12 @@ static intamdgpu_umc_do_page_retirement(struct
Quoted 17 lines
Quoted 17 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c static int amdgpu_umc_do_page_retirement(struct amdgpu_device *adev,
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +2
-1amdgpu_device *adev, if ((amdgpu_bad_page_threshold != 0) && err_data->err_addr_cnt) { -amdgpu_ras_add_bad_pages (adev, err_data->err_addr, + ret =amdgpu_ras_add_bad_pages (adev, err_data- err_addr, err_data->err_addr_cnt); +/* if no new bad page is found, no need to increase ue count */
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +3
-0+if (ret == -EEXIST ) + err_data->ue_count =0 ; +amdgpu_ras_save_bad_pages (adev);amdgpu_dpm_send_hbm_bad_pages_num(adev,
con->eeprom_control.ras_num_recs);
Quoted 53 lines · Tao
Quoted 53 lines
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Tuesday, February 14, 2023 12:55 PM
To: Zhou1, Tao <[email protected]>; [email protected]; Zhang, Hawking <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Li, Candice <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if no new bad pageQuoted 19 lines · Tao
Quoted 19 lines
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Monday, February 13, 2023 8:38 PM
To: Zhou1, Tao <[email protected]>; [email protected]; Zhang, Hawking <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Li, Candice <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if no new bad pageQuoted 3 lines · Tao Zhou
If a UMC bad page is reserved but not freed by an application, the application may trigger uncorrectable error repeatly by accessing the page.
Quoted 7 lines
Quoted 5 lines
There is
amdgpu_ras_check_bad_pagewhich checks if address is already part of an existing bad page. Can't that be used?Thanks,
Lijo[Tao]
amdgpu_ras_check_bad_pageis already called in
amdgpu_ras_add_bad_pages, this patch just makes use of the result ofamdgpu_ras_check_bad_page.Quoted 1 line
In the patch, below two are called after error count is set to 0.
amdgpu_ras_save_bad_pagesamdgpu_dpm_send_hbm_bad_pages_numInstead of that, just check if it's an existing badpage which is repeatedly accessed and proceed directly to the next step (reset if specified)
Quoted 8 lines
Quoted 6 lines
if (amdgpu_ras_check_bad_page(adev, address)) set error count to 0; goto reset_logic;Thanks,
Lijo[Tao] 1.
amdgpu_ras_check_bad_pagechecks only one page, but one ue can generate 16 or more pages.
In this case, it makes sense to do as per the patch. Thanks for the explanation.
Thanks,
Lijo
Quoted 75 lines
2. if no new bad page is found,
amdgpu_ras_save_bad_pageswill do nothing andras_num_recswon't increase.
3. gpu reset logic should follow the old way even ue count is set to 0.This patch only set ue count to 0 if there is no new bad page, but other logic has no change.
Quoted 70 lines
Quoted 27 lines
Quoted 27 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c int amdgpu_ras_add_bad_pages(struct
Quoted 14 lines
Signed-off-by Tao Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0
-0@@ -2049,7 +2049,7 @@ int amdgpu_ras_add_bad_pages(struct
amdgpu_device*adev,Quoted 12 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2
-1{struct amdgpu_ras *con =amdgpu_ras_get_context (adev);struct ras_err_handler_data *data; -int ret =0 ; +int ret =0 , old_cnt;uint32_t i; if (!con || !con->eh_data || !bps || pages <= 0) @@ -2060,6 +2060,8 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev, if (!data) goto out;Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev, · line 2067
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2
-0+ old_cnt = data->count; +for (i =0 ; i < pages; i++) {if (amdgpu_ras_check_bad_page_unlock (con, bps[i].retired_page <<AMDGPU_GPU_PAGE_SHIFT ))@@ -2079,6
Quoted 1 line
+2081,11 @@ int amdgpu_ras_add_bad_pages(struct
amdgpu_device*adev,
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
data->count++; data->space_left--; }drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +5
-0+ +/* all pages have been reserved before, no new bad page */ +if (old_cnt == data->count) + ret = -EEXIST ; + out:mutex_unlock (&con->recovery_lock);Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c static int
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +0
-0@@ -145,8 +145,12 @@ static intamdgpu_umc_do_page_retirement(struct
Quoted 17 lines
Quoted 17 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c static int amdgpu_umc_do_page_retirement(struct amdgpu_device *adev,
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +2
-1amdgpu_device *adev, if ((amdgpu_bad_page_threshold != 0) && err_data->err_addr_cnt) { -amdgpu_ras_add_bad_pages (adev, err_data->err_addr, + ret =amdgpu_ras_add_bad_pages (adev, err_data- err_addr, err_data->err_addr_cnt); +/* if no new bad page is found, no need to increase ue count */
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +3
-0+if (ret == -EEXIST ) + err_data->ue_count =0 ; +amdgpu_ras_save_bad_pages (adev);amdgpu_dpm_send_hbm_bad_pages_num(adev,
con->eeprom_control.ras_num_recs);