Commit 4d6cbde3 authored by Felix Kuehling's avatar Felix Kuehling Committed by Alex Deucher

drm/amdgpu: Clean up GFX 9 VM fault messages

Clean up the VM fault message format and use rate-limiting similar
to other ASICs.
Signed-off-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d7c434d3
...@@ -131,7 +131,7 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev, ...@@ -131,7 +131,7 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,
{ {
struct amdgpu_vmhub *gfxhub = &adev->vmhub[AMDGPU_GFXHUB]; struct amdgpu_vmhub *gfxhub = &adev->vmhub[AMDGPU_GFXHUB];
struct amdgpu_vmhub *mmhub = &adev->vmhub[AMDGPU_MMHUB]; struct amdgpu_vmhub *mmhub = &adev->vmhub[AMDGPU_MMHUB];
uint32_t status; uint32_t status = 0;
u64 addr; u64 addr;
addr = (u64)entry->src_data[0] << 12; addr = (u64)entry->src_data[0] << 12;
...@@ -145,19 +145,20 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev, ...@@ -145,19 +145,20 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,
status = RREG32(gfxhub->vm_l2_pro_fault_status); status = RREG32(gfxhub->vm_l2_pro_fault_status);
WREG32_P(gfxhub->vm_l2_pro_fault_cntl, 1, ~1); WREG32_P(gfxhub->vm_l2_pro_fault_cntl, 1, ~1);
} }
}
DRM_ERROR("[%s]VMC page fault (src_id:%u ring:%u vm_id:%u pas_id:%u) " if (printk_ratelimit()) {
"at page 0x%016llx from %d\n" dev_err(adev->dev,
"VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n", "[%s] VMC page fault (src_id:%u ring:%u vm_id:%u pas_id:%u)\n",
entry->vm_id_src ? "mmhub" : "gfxhub", entry->vm_id_src ? "mmhub" : "gfxhub",
entry->src_id, entry->ring_id, entry->vm_id, entry->pas_id, entry->src_id, entry->ring_id, entry->vm_id,
addr, entry->client_id, status); entry->pas_id);
} else { dev_err(adev->dev, " at page 0x%016llx from %d\n",
DRM_ERROR("[%s]VMC page fault (src_id:%u ring:%u vm_id:%u pas_id:%u) " addr, entry->client_id);
"at page 0x%016llx from %d\n", if (!amdgpu_sriov_vf(adev))
entry->vm_id_src ? "mmhub" : "gfxhub", dev_err(adev->dev,
entry->src_id, entry->ring_id, entry->vm_id, entry->pas_id, "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
addr, entry->client_id); status);
} }
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