drm/amdgpu: exclude duplicate pages from UMC RAS UE count
authorTao Zhou <tao.zhou1@amd.com>
Fri, 10 Feb 2023 08:33:58 +0000 (16:33 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 23 Feb 2023 22:35:59 +0000 (17:35 -0500)
commit4d33e0f1340b3d08002ff8f9bcbf256cfdc4f3ba
tree30a86b9dae275c5c295ff3acf5dd2a534e6ac395
parente69c785723ed88a930d332e13bc9140dce48f359
drm/amdgpu: exclude duplicate pages from UMC RAS UE count

If a UMC bad page is reserved but not freed by an application, the
application may trigger uncorrectable error repeatly by accessing the page.

v2: add specific function to do the check.
v3: remove duplicate pages, calculate new added bad page number.
v4: reuse save_bad_pages to calculate new added bad page number.

Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Stanley.Yang <Stanley.Yang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c