drm/amdkfd: Add support for user-mode trap handlers
authorFelix Kuehling <Felix.Kuehling@amd.com>
Tue, 14 Nov 2017 21:41:20 +0000 (16:41 -0500)
committerOded Gabbay <oded.gabbay@gmail.com>
Tue, 14 Nov 2017 21:41:20 +0000 (16:41 -0500)
commitd7b9bd2248d794275b53d34e665f7c5a08c4b396
treee35653cbbad4c82fe569f6ab0f2b47ad1c580651
parent373d7080896a3cb3b28ae3a2abdafb7bb87552b1
drm/amdkfd: Add support for user-mode trap handlers

A second-level user mode trap handler can be installed. The CWSR trap
handler jumps to the secondary trap handler conditionally for any
conditions not handled by it. This can be used e.g. for debugging or
catching math exceptions.

When CWSR is disabled, the user mode trap handler is installed as
first level trap handler.

Signed-off-by: Shaoyun.liu <shaoyun.liu@amd.com>
Signed-off-by: Jay Cornwall <Jay.Cornwall@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
include/uapi/linux/kfd_ioctl.h