diff options
author | Oded Gabbay <oded.gabbay@gmail.com> | 2014-12-24 13:30:52 +0200 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@gmail.com> | 2015-05-19 13:02:28 +0300 |
commit | 81663016dbfd53e29d1b5c5ddbc9b12ae1d66474 (patch) | |
tree | 337823c18adb9dac0f812b4e76eb2ed9747c4c71 /drivers/gpu/drm/amd/amdkfd/kfd_events.c | |
parent | 930c5ff4390221cccf368b305c04351fbcf0dfcf (diff) | |
download | op-kernel-dev-81663016dbfd53e29d1b5c5ddbc9b12ae1d66474.zip op-kernel-dev-81663016dbfd53e29d1b5c5ddbc9b12ae1d66474.tar.gz |
drm/amdkfd: Add module parameter of send_sigterm
This patch adds a new kernel module parameter to amdkfd,
called send_sigterm.
This parameter specifies whether amdkfd should send the
SIGTERM signal to an HSA process, when the following conditions
occur:
1. The GPU triggers an exception regarding a kernel that was
issued by this process.
2. The HSA process isn't waiting on an event that handles
this exception.
The default behavior is not to send a SIGTERM and suffice
with a dmesg error print.
Reviewed-by: Ben Goz <ben.goz@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_events.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_events.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_events.c b/drivers/gpu/drm/amd/amdkfd/kfd_events.c index 5c3a81e..3cb37d2 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_events.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_events.c @@ -872,10 +872,16 @@ static void lookup_events_by_type_and_signal(struct kfd_process *p, /* Send SIGTERM no event of type "type" has been found*/ if (send_signal) { - dev_warn(kfd_device, - "Sending SIGTERM to HSA Process with PID %d ", + if (send_sigterm) { + dev_warn(kfd_device, + "Sending SIGTERM to HSA Process with PID %d ", + p->lead_thread->pid); + send_sig(SIGTERM, p->lead_thread, 0); + } else { + dev_err(kfd_device, + "HSA Process (PID %d) got unhandled exception", p->lead_thread->pid); - send_sig(SIGTERM, p->lead_thread, 0); + } } } |