drm/amdkfd: enhance host trap process in 1st trap handler

to support multiple processes, and process correctly when s_trap
and context saving exception occur simultaneously.

-v2: update comments advised from Lancelot
-v3: update advised from Jay
-v4: remove state bit S_SAVE_PC_HI_NEED_2ND_LVL_TH_SHIFT
-v5: add STATUS.HALT handling

Co-authored-by: Lancelot SIX <Lancelot.Six@amd.com>
Co-authored-by: Joseph Greathouse <Joseph.Greathouse@amd.com>
Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Lancelot SIX <Lancelot.Six@amd.com>
Reviewed-by: Jay Cornwall <jay.cornwall@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
James Zhu 2025-04-16 13:46:39 -04:00 • committed by Alex Deucher
commit aaa04977c4
2 changed files with 1046 additions and 962 deletions