summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v10.c
diff options
context:
space:
mode:
authorJonathan Kim <Jonathan.Kim@amd.com>2024-03-01 12:25:17 -0500
committerAlex Deucher <alexander.deucher@amd.com>2024-03-27 08:53:02 -0400
commit0cac183b98d8a8c692c98e8dba37df15a9e9210d (patch)
tree0a1b7017d8773f05d21aedd1f9b2cb24d210c5d9 /drivers/gpu/drm/amd/amdkfd/kfd_int_process_v10.c
parent78aca9ee5e012e130dbfbd7191bc2302b0cf3b37 (diff)
downloadlinux-stable-0cac183b98d8a8c692c98e8dba37df15a9e9210d.tar.gz
linux-stable-0cac183b98d8a8c692c98e8dba37df15a9e9210d.tar.bz2
linux-stable-0cac183b98d8a8c692c98e8dba37df15a9e9210d.zip
drm/amdkfd: range check cp bad op exception interrupts
Due to a CP interrupt bug, bad packet garbage exception codes are raised. Do a range check so that the debugger and runtime do not receive garbage codes. Update the user api to guard exception code type checking as well. Signed-off-by: Jonathan Kim <jonathan.kim@amd.com> Tested-by: Jesse Zhang <jesse.zhang@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_int_process_v10.c')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_int_process_v10.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v10.c b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v10.c
index 9a06c6fb6605..40a21be6c07c 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v10.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v10.c
@@ -339,7 +339,8 @@ static void event_interrupt_wq_v10(struct kfd_node *dev,
break;
}
kfd_signal_event_interrupt(pasid, context_id0 & 0x7fffff, 23);
- } else if (source_id == SOC15_INTSRC_CP_BAD_OPCODE) {
+ } else if (source_id == SOC15_INTSRC_CP_BAD_OPCODE &&
+ KFD_DBG_EC_TYPE_IS_PACKET(KFD_DEBUG_CP_BAD_OP_ECODE(context_id0))) {
kfd_set_dbg_ev_from_interrupt(dev, pasid,
KFD_DEBUG_DOORBELL_ID(context_id0),
KFD_EC_MASK(KFD_DEBUG_CP_BAD_OP_ECODE(context_id0)),