diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-05-20 04:52:27 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-05-20 04:52:27 +0000 |
commit | 7bfd478b7e554a4c0a2e883e69211210fb63917c (patch) | |
tree | cc7d726d5a67162ad99d26f9058a3c20e9a08511 /sys/dev/pci/drm/amd/amdkfd | |
parent | 315ebab76069095bec10f458de54cfaa03bbb67b (diff) |
drm/amdkfd: range check cp bad op exception interrupts
From Jonathan Kim
41dc6791596656dd41100b85647ed489e1d5c2f2 in linux-6.6.y/6.6.31
0cac183b98d8a8c692c98e8dba37df15a9e9210d in mainline linux
Diffstat (limited to 'sys/dev/pci/drm/amd/amdkfd')
-rw-r--r-- | sys/dev/pci/drm/amd/amdkfd/kfd_int_process_v10.c | 3 | ||||
-rw-r--r-- | sys/dev/pci/drm/amd/amdkfd/kfd_int_process_v11.c | 3 | ||||
-rw-r--r-- | sys/dev/pci/drm/amd/amdkfd/kfd_int_process_v9.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/pci/drm/amd/amdkfd/kfd_int_process_v10.c b/sys/dev/pci/drm/amd/amdkfd/kfd_int_process_v10.c index a7697ec8188..f85ca6cb90f 100644 --- a/sys/dev/pci/drm/amd/amdkfd/kfd_int_process_v10.c +++ b/sys/dev/pci/drm/amd/amdkfd/kfd_int_process_v10.c @@ -336,7 +336,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)), diff --git a/sys/dev/pci/drm/amd/amdkfd/kfd_int_process_v11.c b/sys/dev/pci/drm/amd/amdkfd/kfd_int_process_v11.c index 2a65792fd11..3ca9c160da7 100644 --- a/sys/dev/pci/drm/amd/amdkfd/kfd_int_process_v11.c +++ b/sys/dev/pci/drm/amd/amdkfd/kfd_int_process_v11.c @@ -325,7 +325,8 @@ static void event_interrupt_wq_v11(struct kfd_node *dev, /* CP */ if (source_id == SOC15_INTSRC_CP_END_OF_PIPE) kfd_signal_event_interrupt(pasid, context_id0, 32); - 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_CTXID0_CP_BAD_OP_ECODE(context_id0))) kfd_set_dbg_ev_from_interrupt(dev, pasid, KFD_CTXID0_DOORBELL_ID(context_id0), KFD_EC_MASK(KFD_CTXID0_CP_BAD_OP_ECODE(context_id0)), diff --git a/sys/dev/pci/drm/amd/amdkfd/kfd_int_process_v9.c b/sys/dev/pci/drm/amd/amdkfd/kfd_int_process_v9.c index 27cdaea4050..8a6729939ae 100644 --- a/sys/dev/pci/drm/amd/amdkfd/kfd_int_process_v9.c +++ b/sys/dev/pci/drm/amd/amdkfd/kfd_int_process_v9.c @@ -385,7 +385,8 @@ static void event_interrupt_wq_v9(struct kfd_node *dev, break; } kfd_signal_event_interrupt(pasid, sq_int_data, 24); - } 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)), |