mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 06:31:58 +02:00
drm/amdgpu: mark invalid records with U64_MAX
set retired_page of invalid ras records to U64_MAX, and skip them when reading ras records Signed-off-by: Gangliang Xie <ganglxie@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
9d03d404f4
commit
0028b86b52
|
|
@ -2784,6 +2784,10 @@ static int amdgpu_ras_badpages_read(struct amdgpu_device *adev,
|
|||
if (!data->bps[i].ts)
|
||||
continue;
|
||||
|
||||
/* U64_MAX is used to mark the record as invalid */
|
||||
if (data->bps[i].retired_page == U64_MAX)
|
||||
continue;
|
||||
|
||||
bps[r].bp = data->bps[i].retired_page;
|
||||
r++;
|
||||
if (r >= count)
|
||||
|
|
@ -3090,6 +3094,8 @@ static int __amdgpu_ras_restore_bad_pages(struct amdgpu_device *adev,
|
|||
|
||||
if (amdgpu_ras_check_bad_page_unlock(con,
|
||||
bps[j].retired_page << AMDGPU_GPU_PAGE_SHIFT)) {
|
||||
/* set to U64_MAX to mark it as invalid */
|
||||
data->bps[data->count].retired_page = U64_MAX;
|
||||
data->count++;
|
||||
data->space_left--;
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user