Repository navigation
drm/amd/ras: skip the early init service when it is not enabled - #237
tpatward-amd wants to merge 1 commit into
Conversation
With unified RAS on MI450 (MP1 15.0.8) every GPU logs "RAS early init service failure! ret:-95" at driver load. amdgpu_ttm_init() calls amdgpu_ras_mgr_early_init_service() on every load to reserve saved bad pages before VRAM is handed out. The service needs the RAS EEPROM: ras_core_early_init_service_enabled() is false unless the ASIC supports the service and ras_eeprom_supported is set, and ras_core_eeprom_early_init_service() then returns -EOPNOTSUPP, which the caller reports as a failure on every GPU and every load. Two configurations hit it: - MP1 13.0.6/12/14 with unified RAS: the early init service is not supported there; saved pages are reserved later, at hw_init, so the warning is noise. - MP1 15.0.8 (MI450, unified RAS enabled out of tree, e.g. the amdgpu DKMS 7.1.1 package with debug_mask BIT(4)): the service is flagged in amdgpu_ras_mgr_create_ras_core(), but the RAS EEPROM is not enabled yet (amdgpu_ras_mgr_eeprom_is_supported() lists only MP1 13.0.x), so saved pages in the PMFW RAS table are not reserved at all. Return 0 before calling the service when it is not enabled. When the ASIC flags the service but the EEPROM is disabled, say so once at info level instead of reporting a failure. Real failures (-EACCES outside early init, recovery errors) are still reported. Enabling the RAS EEPROM for MP1 15.0.8 is left out on purpose: the early-init record load would convert PMFW records with umc_v15_convert_ma_to_pa(), which is a stub, before the RAS TA is loaded, and reserve the wrong pages. On master, unified RAS is not enabled for MP0 15.0.8, so this change only affects MP1 13.0.x there. Tested on an AMD Instinct MI450 system (4 GPUs, amdgpu DKMS 7.1.1 with unified RAS enabled, same hunk backported): the -95 warning goes from one per GPU to none, each GPU prints the info line once, and RAS initializes and reports ready on all 4 GPUs. Signed-off-by: Tapan Patwardhan <tpatward@amd.com> Co-Authored-By: Claude <noreply@anthropic.com>
bb7f9e4 to
17bf027
Compare
|
Closing: already fixed upstream. This warning is already fixed upstream by YiPeng Chai's patch "drm/amd/ras: suppress warning for unsupported early init service" (amd-gfx posting). Tao Zhou reviewed it. It was merged into amd-staging-drm-next as The fix is the same as this PR's. It is not yet in ROCm/amdgpu Neither patch fixes the underlying MI450 gap. The RAS EEPROM is not enabled for MP1 15.0.8, so saved bad pages in the PMFW RAS table are not reserved at load. That needs the MI450 RAS EEPROM bring-up, including the |
Motivation
With unified RAS on MI450 (MP1 15.0.8), every GPU logs
RAS early init service failure! ret:-95at every driver load.amdgpu_ttm_init()callsamdgpu_ras_mgr_early_init_service()on every load so that saved bad pages are reserved before VRAM is handed out. That service needs the RAS EEPROM.ras_core_early_init_service_enabled()is false unless the ASIC supports the service andras_eeprom_supportedis set. When it is false,ras_core_eeprom_early_init_service()returns-EOPNOTSUPP, and the caller reports that as a failure on every GPU and every load.Two configurations hit this:
debug_maskBIT(4)):amdgpu_ras_mgr_create_ras_core()flags the service, but the RAS EEPROM is not enabled yet becauseamdgpu_ras_mgr_eeprom_is_supported()lists only MP1 13.0.x. Saved pages in the PMFW RAS table are therefore not reserved at all.Technical Details
amdgpu_ras_mgr_early_init_service()(drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c) now returns 0 without calling the service when the service is not enabled. If the ASIC flags the service but the EEPROM is disabled, it logsRAS EEPROM not enabled, saved bad pages are not reservedonce, at info level, instead of reporting a failure. Real failures (-EACCESoutside early init, recovery errors) are still reported. The core's-EOPNOTSUPPcontract is unchanged.This PR deliberately does not enable the RAS EEPROM for MP1 15.0.8. If it did, the early-init record load would convert PMFW records with
umc_v15_convert_ma_to_pa(), which is still a stub, before the RAS TA is loaded, and would reserve the wrong pages. Once MP1 15.0.8 is added toamdgpu_ras_mgr_eeprom_is_supported(), this guard lets the service run again automatically. On master, unified RAS is not enabled for MP0 15.0.8, so there this change only affects MP1 13.0.x.Test Plan
Test Result
RAS early init service failure! ret:-95on all 4 GPUs. The regression test case fails (4 early-init failures).RAS EEPROM not enabled, saved bad pages are not reservedonce, thenAMDGPU RAS Is Ready.(initialized=4, ready=4). With the fix loaded, runtime ACA logging still works: a software-injected MCE record was logged in the ACA log. CPER encoding was not re-checked in this test.Open items (from review, not yet addressed)
!amdgpu_sriov_vf()guard may be wanted.RAS_DEV_INFOline is 105 columns, so checkpatch reports LONG_LINE.Submission Checklist
🤖 Generated with Claude Code