Commit db6341a9 authored by Hawking Zhang's avatar Hawking Zhang Committed by Alex Deucher

drm/amdkfd: Check int source id for utcl2 poison event

Traditional utcl2 fault_status polling does not
work in SRIOV environment. The polling of fault
status register from guest side will be dropped
by hardware.

Driver should switch to check utcl2 interrupt
source id to identify utcl2 poison event. It is
set to 1 when poisoned data interrupts are
signaled.

v2: drop the unused local variable (Tao)
Signed-off-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: default avatarTao Zhou <tao.zhou1@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 88c511de
...@@ -431,25 +431,9 @@ static void event_interrupt_wq_v9(struct kfd_node *dev, ...@@ -431,25 +431,9 @@ static void event_interrupt_wq_v9(struct kfd_node *dev,
client_id == SOC15_IH_CLIENTID_UTCL2) { client_id == SOC15_IH_CLIENTID_UTCL2) {
struct kfd_vm_fault_info info = {0}; struct kfd_vm_fault_info info = {0};
uint16_t ring_id = SOC15_RING_ID_FROM_IH_ENTRY(ih_ring_entry); uint16_t ring_id = SOC15_RING_ID_FROM_IH_ENTRY(ih_ring_entry);
uint32_t node_id = SOC15_NODEID_FROM_IH_ENTRY(ih_ring_entry);
uint32_t vmid_type = SOC15_VMID_TYPE_FROM_IH_ENTRY(ih_ring_entry);
int hub_inst = 0;
struct kfd_hsa_memory_exception_data exception_data; struct kfd_hsa_memory_exception_data exception_data;
/* gfxhub */ if (source_id == SOC15_INTSRC_VMC_UTCL2_POISON) {
if (!vmid_type && dev->adev->gfx.funcs->ih_node_to_logical_xcc) {
hub_inst = dev->adev->gfx.funcs->ih_node_to_logical_xcc(dev->adev,
node_id);
if (hub_inst < 0)
hub_inst = 0;
}
/* mmhub */
if (vmid_type && client_id == SOC15_IH_CLIENTID_VMC)
hub_inst = node_id / 4;
if (amdgpu_amdkfd_ras_query_utcl2_poison_status(dev->adev,
hub_inst, vmid_type)) {
event_interrupt_poison_consumption_v9(dev, pasid, client_id); event_interrupt_poison_consumption_v9(dev, pasid, client_id);
return; return;
} }
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#define SOC15_INTSRC_CP_BAD_OPCODE 183 #define SOC15_INTSRC_CP_BAD_OPCODE 183
#define SOC15_INTSRC_SQ_INTERRUPT_MSG 239 #define SOC15_INTSRC_SQ_INTERRUPT_MSG 239
#define SOC15_INTSRC_VMC_FAULT 0 #define SOC15_INTSRC_VMC_FAULT 0
#define SOC15_INTSRC_VMC_UTCL2_POISON 1
#define SOC15_INTSRC_SDMA_TRAP 224 #define SOC15_INTSRC_SDMA_TRAP 224
#define SOC15_INTSRC_SDMA_ECC 220 #define SOC15_INTSRC_SDMA_ECC 220
#define SOC21_INTSRC_SDMA_TRAP 49 #define SOC21_INTSRC_SDMA_TRAP 49
......
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