mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
drm/amdgpu: only check critical address when it is not reserved
when an address is reserved already, no need to check if it is in critical or not, to save time Signed-off-by: Gangliang Xie <ganglxie@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
a6ea0a430a
commit
f9f281e839
@@ -1922,8 +1922,6 @@ static ssize_t amdgpu_ras_sysfs_badpages_read(struct file *f,
|
||||
|
||||
for (i = 0; i < bps_count; i++) {
|
||||
address = ((uint64_t)bps[i].bp) << AMDGPU_GPU_PAGE_SHIFT;
|
||||
if (amdgpu_ras_check_critical_address(adev, address))
|
||||
continue;
|
||||
|
||||
bps[i].size = AMDGPU_GPU_PAGE_SIZE;
|
||||
|
||||
@@ -1936,6 +1934,10 @@ static ssize_t amdgpu_ras_sysfs_badpages_read(struct file *f,
|
||||
else
|
||||
bps[i].flags = AMDGPU_RAS_RETIRE_PAGE_RESERVED;
|
||||
|
||||
if ((bps[i].flags != AMDGPU_RAS_RETIRE_PAGE_RESERVED) &&
|
||||
amdgpu_ras_check_critical_address(adev, address))
|
||||
bps[i].flags = AMDGPU_RAS_RETIRE_PAGE_RESERVED;
|
||||
|
||||
s += scnprintf(&buf[s], element_size + 1,
|
||||
"0x%08x : 0x%08x : %1s\n",
|
||||
bps[i].bp,
|
||||
|
||||
Reference in New Issue
Block a user