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>
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)
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;