drm/amd/ras: Fix the error of undefined reference to `__udivdi3'

Fix the error:
drivers/gpu/drm/amd/amdgpu/../ras/ras_mgr/amdgpu_ras_mgr.c:132:undefined reference to `__udivdi3'

Fixes: fa0b203cd9 ("drm/amd/ras: Add amdgpu ras management function.")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202510272144.6SUHUoWx-lkp@intel.com/
Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
YiPeng Chai 2025-10-28 16:34:34 +08:00 committed by Alex Deucher
parent d80391dd03
commit fd0e35bdd3

View File

@ -37,7 +37,7 @@
#define MAX_XCD_NUM_PER_AID 2
/* typical ECC bad page rate is 1 bad page per 100MB VRAM */
#define ESTIMATE_BAD_PAGE_THRESHOLD(size) ((size)/(100 * 1024 * 1024ULL))
#define TYPICAL_ECC_BAD_PAGE_RATE (100ULL * SZ_1M)
#define COUNT_BAD_PAGE_THRESHOLD(size) (((size) >> 21) << 4)
@ -129,7 +129,7 @@ static int amdgpu_ras_mgr_init_eeprom_config(struct amdgpu_device *adev,
*/
if (amdgpu_bad_page_threshold == NONSTOP_OVER_THRESHOLD)
eeprom_cfg->eeprom_record_threshold_count =
ESTIMATE_BAD_PAGE_THRESHOLD(adev->gmc.mc_vram_size);
div64_u64(adev->gmc.mc_vram_size, TYPICAL_ECC_BAD_PAGE_RATE);
else if (amdgpu_bad_page_threshold == WARN_NONSTOP_OVER_THRESHOLD)
eeprom_cfg->eeprom_record_threshold_count =
COUNT_BAD_PAGE_THRESHOLD(RAS_RESERVED_VRAM_SIZE_DEFAULT);