Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: store PA with column bits cleared for RAS bad page

So the code can be simplified, and no need to expose the detail of PA
format outside address conversion.

Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Tao Zhou and committed by
Alex Deucher
3d60a30c 66f4f7d5

+3 -6
+3 -1
drivers/gpu/drm/amd/amdgpu/umc_v12_0.c
··· 219 219 /* clear [R13] in soc physical address */ 220 220 soc_pa &= ~(0x1ULL << UMC_V12_0_PA_R13_BIT); 221 221 222 + paddr_out->pa.pa = soc_pa; 223 + 222 224 /* loop for all possibilities of [R13 C4 C3 C2] */ 223 225 for (column = 0; column < UMC_V12_0_BAD_PAGE_NUM_PER_CHANNEL; column++) { 224 226 retired_page = soc_pa | ((column & 0x3) << UMC_V12_0_PA_C2_BIT); ··· 539 537 ecc_err->status = status; 540 538 ecc_err->ipid = ipid; 541 539 ecc_err->addr = addr; 542 - ecc_err->pa_pfn = UMC_V12_ADDR_MASK_BAD_COLS(pa_addr) >> AMDGPU_GPU_PAGE_SHIFT; 540 + ecc_err->pa_pfn = pa_addr >> AMDGPU_GPU_PAGE_SHIFT; 543 541 544 542 /* If converted pa_pfn is 0, use pa C4 pfn. */ 545 543 if (!ecc_err->pa_pfn)
-5
drivers/gpu/drm/amd/amdgpu/umc_v12_0.h
··· 82 82 (((REG_GET_FIELD(ipid, MCMP1_IPIDT0, InstanceIdLo) & 0x1) << 2) | \ 83 83 (REG_GET_FIELD(ipid, MCMP1_IPIDT0, InstanceIdHi) & 0x03)) 84 84 85 - #define UMC_V12_ADDR_MASK_BAD_COLS(addr) \ 86 - ((addr) & ~((0x3ULL << UMC_V12_0_PA_C2_BIT) | \ 87 - (0x1ULL << UMC_V12_0_PA_C4_BIT) | \ 88 - (0x1ULL << UMC_V12_0_PA_R13_BIT))) 89 - 90 85 bool umc_v12_0_is_deferred_error(struct amdgpu_device *adev, uint64_t mc_umc_status); 91 86 bool umc_v12_0_is_uncorrectable_error(struct amdgpu_device *adev, uint64_t mc_umc_status); 92 87 bool umc_v12_0_is_correctable_error(struct amdgpu_device *adev, uint64_t mc_umc_status);