Commit 9d8a8d78 authored by Tao Zhou's avatar Tao Zhou Committed by Alex Deucher

drm/amdkfd: replace source_id with client_id for RAS poison consumption

Client ID is more accruate here and we can deal with more different
cases with client ID.
Signed-off-by: default avatarTao Zhou <tao.zhou1@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent eed41975
...@@ -91,7 +91,7 @@ enum SQ_INTERRUPT_ERROR_TYPE { ...@@ -91,7 +91,7 @@ enum SQ_INTERRUPT_ERROR_TYPE {
#define KFD_SQ_INT_DATA__ERR_TYPE__SHIFT 20 #define KFD_SQ_INT_DATA__ERR_TYPE__SHIFT 20
static void event_interrupt_poison_consumption(struct kfd_dev *dev, static void event_interrupt_poison_consumption(struct kfd_dev *dev,
uint16_t pasid, uint16_t source_id) uint16_t pasid, uint16_t client_id)
{ {
int old_poison, ret = -EINVAL; int old_poison, ret = -EINVAL;
struct kfd_process *p = kfd_lookup_process_by_pasid(pasid); struct kfd_process *p = kfd_lookup_process_by_pasid(pasid);
...@@ -105,13 +105,22 @@ static void event_interrupt_poison_consumption(struct kfd_dev *dev, ...@@ -105,13 +105,22 @@ static void event_interrupt_poison_consumption(struct kfd_dev *dev,
if (old_poison) if (old_poison)
return; return;
pr_warn("RAS poison consumption handling\n"); pr_warn("RAS poison consumption handling: client id %d\n", client_id);
switch (source_id) { switch (client_id) {
case SOC15_INTSRC_SQ_INTERRUPT_MSG: case SOC15_IH_CLIENTID_SE0SH:
case SOC15_IH_CLIENTID_SE1SH:
case SOC15_IH_CLIENTID_SE2SH:
case SOC15_IH_CLIENTID_SE3SH:
case SOC15_IH_CLIENTID_UTCL2:
ret = kfd_dqm_evict_pasid(dev->dqm, pasid); ret = kfd_dqm_evict_pasid(dev->dqm, pasid);
break; break;
case SOC15_INTSRC_SDMA_ECC: case SOC15_IH_CLIENTID_SDMA0:
case SOC15_IH_CLIENTID_SDMA1:
case SOC15_IH_CLIENTID_SDMA2:
case SOC15_IH_CLIENTID_SDMA3:
case SOC15_IH_CLIENTID_SDMA4:
break;
default: default:
break; break;
} }
...@@ -269,7 +278,7 @@ static void event_interrupt_wq_v9(struct kfd_dev *dev, ...@@ -269,7 +278,7 @@ static void event_interrupt_wq_v9(struct kfd_dev *dev,
sq_intr_err); sq_intr_err);
if (sq_intr_err != SQ_INTERRUPT_ERROR_TYPE_ILLEGAL_INST && if (sq_intr_err != SQ_INTERRUPT_ERROR_TYPE_ILLEGAL_INST &&
sq_intr_err != SQ_INTERRUPT_ERROR_TYPE_MEMVIOL) { sq_intr_err != SQ_INTERRUPT_ERROR_TYPE_MEMVIOL) {
event_interrupt_poison_consumption(dev, pasid, source_id); event_interrupt_poison_consumption(dev, pasid, client_id);
return; return;
} }
break; break;
...@@ -290,7 +299,7 @@ static void event_interrupt_wq_v9(struct kfd_dev *dev, ...@@ -290,7 +299,7 @@ static void event_interrupt_wq_v9(struct kfd_dev *dev,
if (source_id == SOC15_INTSRC_SDMA_TRAP) { if (source_id == SOC15_INTSRC_SDMA_TRAP) {
kfd_signal_event_interrupt(pasid, context_id0 & 0xfffffff, 28); kfd_signal_event_interrupt(pasid, context_id0 & 0xfffffff, 28);
} else if (source_id == SOC15_INTSRC_SDMA_ECC) { } else if (source_id == SOC15_INTSRC_SDMA_ECC) {
event_interrupt_poison_consumption(dev, pasid, source_id); event_interrupt_poison_consumption(dev, pasid, client_id);
return; return;
} }
} else if (client_id == SOC15_IH_CLIENTID_VMC || } else if (client_id == SOC15_IH_CLIENTID_VMC ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment