aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2018-01-09 13:49:21 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-02-19 14:17:42 -0500
commita9f7cd1b0b34adf246b62444fe13624ff6f1fce4 (patch)
tree699921f1353eac086d3dc6ee1129bfe170732663
parent3816e42f5f5ec6b96634b8ede3eaa77dbe4574fd (diff)
drm/amdgpu: print the PASID with VM faults on GMC v7
Print that extra information on GMC v7. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
index 550abff5cb12..f214672dc493 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
@@ -747,21 +747,21 @@ static void gmc_v7_0_gart_fini(struct amdgpu_device *adev)
747 * 747 *
748 * Print human readable fault information (CIK). 748 * Print human readable fault information (CIK).
749 */ 749 */
750static void gmc_v7_0_vm_decode_fault(struct amdgpu_device *adev, 750static void gmc_v7_0_vm_decode_fault(struct amdgpu_device *adev, u32 status,
751 u32 status, u32 addr, u32 mc_client) 751 u32 addr, u32 mc_client, unsigned pasid)
752{ 752{
753 u32 mc_id;
754 u32 vmid = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, VMID); 753 u32 vmid = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, VMID);
755 u32 protections = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, 754 u32 protections = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS,
756 PROTECTIONS); 755 PROTECTIONS);
757 char block[5] = { mc_client >> 24, (mc_client >> 16) & 0xff, 756 char block[5] = { mc_client >> 24, (mc_client >> 16) & 0xff,
758 (mc_client >> 8) & 0xff, mc_client & 0xff, 0 }; 757 (mc_client >> 8) & 0xff, mc_client & 0xff, 0 };
758 u32 mc_id;
759 759
760 mc_id = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, 760 mc_id = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS,
761 MEMORY_CLIENT_ID); 761 MEMORY_CLIENT_ID);
762 762
763 dev_err(adev->dev, "VM fault (0x%02x, vmid %d) at page %u, %s from '%s' (0x%08x) (%d)\n", 763 dev_err(adev->dev, "VM fault (0x%02x, vmid %d, pasid %d) at page %u, %s from '%s' (0x%08x) (%d)\n",
764 protections, vmid, addr, 764 protections, vmid, pasid, addr,
765 REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, 765 REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS,
766 MEMORY_CLIENT_RW) ? 766 MEMORY_CLIENT_RW) ?
767 "write" : "read", block, mc_client, mc_id); 767 "write" : "read", block, mc_client, mc_id);
@@ -1256,7 +1256,8 @@ static int gmc_v7_0_process_interrupt(struct amdgpu_device *adev,
1256 addr); 1256 addr);
1257 dev_err(adev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n", 1257 dev_err(adev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
1258 status); 1258 status);
1259 gmc_v7_0_vm_decode_fault(adev, status, addr, mc_client); 1259 gmc_v7_0_vm_decode_fault(adev, status, addr, mc_client,
1260 entry->pasid);
1260 } 1261 }
1261 1262
1262 return 0; 1263 return 0;