Commit a9f7cd1b authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: print the PASID with VM faults on GMC v7

Print that extra information on GMC v7.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarChunming Zhou <david1.zhou@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3816e42f
...@@ -747,21 +747,21 @@ static void gmc_v7_0_gart_fini(struct amdgpu_device *adev) ...@@ -747,21 +747,21 @@ static void gmc_v7_0_gart_fini(struct amdgpu_device *adev)
* *
* Print human readable fault information (CIK). * Print human readable fault information (CIK).
*/ */
static void gmc_v7_0_vm_decode_fault(struct amdgpu_device *adev, static void gmc_v7_0_vm_decode_fault(struct amdgpu_device *adev, u32 status,
u32 status, u32 addr, u32 mc_client) u32 addr, u32 mc_client, unsigned pasid)
{ {
u32 mc_id;
u32 vmid = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, VMID); u32 vmid = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, VMID);
u32 protections = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, u32 protections = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS,
PROTECTIONS); PROTECTIONS);
char block[5] = { mc_client >> 24, (mc_client >> 16) & 0xff, char block[5] = { mc_client >> 24, (mc_client >> 16) & 0xff,
(mc_client >> 8) & 0xff, mc_client & 0xff, 0 }; (mc_client >> 8) & 0xff, mc_client & 0xff, 0 };
u32 mc_id;
mc_id = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, mc_id = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS,
MEMORY_CLIENT_ID); MEMORY_CLIENT_ID);
dev_err(adev->dev, "VM fault (0x%02x, vmid %d) at page %u, %s from '%s' (0x%08x) (%d)\n", dev_err(adev->dev, "VM fault (0x%02x, vmid %d, pasid %d) at page %u, %s from '%s' (0x%08x) (%d)\n",
protections, vmid, addr, protections, vmid, pasid, addr,
REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS,
MEMORY_CLIENT_RW) ? MEMORY_CLIENT_RW) ?
"write" : "read", block, mc_client, mc_id); "write" : "read", block, mc_client, mc_id);
...@@ -1256,7 +1256,8 @@ static int gmc_v7_0_process_interrupt(struct amdgpu_device *adev, ...@@ -1256,7 +1256,8 @@ static int gmc_v7_0_process_interrupt(struct amdgpu_device *adev,
addr); addr);
dev_err(adev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n", dev_err(adev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
status); status);
gmc_v7_0_vm_decode_fault(adev, status, addr, mc_client); gmc_v7_0_vm_decode_fault(adev, status, addr, mc_client,
entry->pasid);
} }
return 0; return 0;
......
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