Skip to content

Commit 71344a7

Browse files
Luben Tuikovalexdeucher
authored andcommitted
drm/amdgpu: Fix usage of UMC fill record in RAS
The fixed commit listed in the Fixes tag below, introduced a bug in amdgpu_ras.c::amdgpu_reserve_page_direct(), in that when introducing the new amdgpu_umc_fill_error_record() and internally in that new function the physical address (argument "uint64_t retired_page"--wrong name) is right-shifted by AMDGPU_GPU_PAGE_SHIFT. Thus, in amdgpu_reserve_page_direct() when we pass "address" to that new function, we should NOT right-shift it, since this results, erroneously, in the page address to be 0 for first 2^(2*AMDGPU_GPU_PAGE_SHIFT) memory addresses. This commit fixes this bug. Cc: Tao Zhou <tao.zhou1@amd.com> Cc: Hawking Zhang <Hawking.Zhang@amd.com> Cc: Alex Deucher <Alexander.Deucher@amd.com> Fixes: 400013b ("drm/amdgpu: add umc_fill_error_record to make code more simple") Signed-off-by: Luben Tuikov <luben.tuikov@amd.com> Link: https://lore.kernel.org/r/20230610113536.10621-1-luben.tuikov@amd.com Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent e5df16d commit 71344a7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,7 @@ static int amdgpu_reserve_page_direct(struct amdgpu_device *adev, uint64_t addre
171171

172172
memset(&err_rec, 0x0, sizeof(struct eeprom_table_record));
173173
err_data.err_addr = &err_rec;
174-
amdgpu_umc_fill_error_record(&err_data, address,
175-
(address >> AMDGPU_GPU_PAGE_SHIFT), 0, 0);
174+
amdgpu_umc_fill_error_record(&err_data, address, address, 0, 0);
176175

177176
if (amdgpu_bad_page_threshold != 0) {
178177
amdgpu_ras_add_bad_pages(adev, err_data.err_addr,

0 commit comments

Comments
 (0)