]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: Fix lost single step exceptions in gfx9 trap handler
authorJay Cornwall <jay.cornwall@amd.com>
Tue, 23 Jul 2019 00:21:13 +0000 (19:21 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 31 Jul 2019 04:22:02 +0000 (23:22 -0500)
commit4678df8a938986c40fa6000aaabf08761e4d2be7
tree346f2bff9a2677e273f8a2ea39b5e34e772f9b43
parent3443b625a42d1c997508f4adb464924d051f7bb5
drm/amdkfd: Fix lost single step exceptions in gfx9 trap handler

If the trap is entered due to MODE.DEBUG_EN=1 and SAVECTX is raised
concurrently the handler cannot identify the source of the exception.
This causes the debugger to lose single step exception notification
when a context save request arrives at the same time.

When MODE.DEBUG_EN=1 and STATUS.HALT=0 (exception not already handled)
jump to the second-level trap handler upon entering the trap. The
second-level trap will set STATUS.HALT=1 and return to the shader.
If SAVECTX was raised then control flow will return to the trap, which
will then handle the context save request.

Cc: Tony Tye <tony.tye@amd.com>
Cc: Laurent Morichetti <laurent.morichetti@amd.com>
Cc: Qingchuan Shi <qingchuan.shi@amd.com>
Signed-off-by: Jay Cornwall <jay.cornwall@amd.com>
Reviewed-by: Laurent Morichetti <laurent.morichetti@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h
drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx9.asm