mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
drm/amdgpu: Add address checking for uniras
Add address checking for uniras Signed-off-by: Jinzhou Su <jinzhou.su@amd.com> Reviewed-by: YiPeng Chai <YiPeng.Chai@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -237,8 +237,13 @@ static int amdgpu_check_address_validity(struct amdgpu_device *adev,
|
||||
(address >= RAS_UMC_INJECT_ADDR_LIMIT))
|
||||
return -EFAULT;
|
||||
|
||||
count = amdgpu_umc_lookup_bad_pages_in_a_row(adev,
|
||||
if (amdgpu_uniras_enabled(adev))
|
||||
count = amdgpu_ras_mgr_lookup_bad_pages_in_a_row(adev, address,
|
||||
page_pfns, ARRAY_SIZE(page_pfns));
|
||||
else
|
||||
count = amdgpu_umc_lookup_bad_pages_in_a_row(adev,
|
||||
address, page_pfns, ARRAY_SIZE(page_pfns));
|
||||
|
||||
if (count <= 0)
|
||||
return -EPERM;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user