mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 22:25:03 +00:00
drm/amdgpu: cleanup gmc_v10_0_process_interrupt a bit
Return early in case of a ratelimit and don't print leading zeros for the address. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
18e1a6c95f
commit
45d87b85d3
1 changed files with 18 additions and 16 deletions
|
@ -95,6 +95,7 @@ static int gmc_v10_0_process_interrupt(struct amdgpu_device *adev,
|
|||
struct amdgpu_iv_entry *entry)
|
||||
{
|
||||
struct amdgpu_vmhub *hub = &adev->vmhub[entry->vmid_src];
|
||||
struct amdgpu_task_info task_info;
|
||||
uint32_t status = 0;
|
||||
u64 addr;
|
||||
|
||||
|
@ -115,8 +116,8 @@ static int gmc_v10_0_process_interrupt(struct amdgpu_device *adev,
|
|||
WREG32_P(hub->vm_l2_pro_fault_cntl, 1, ~1);
|
||||
}
|
||||
|
||||
if (printk_ratelimit()) {
|
||||
struct amdgpu_task_info task_info;
|
||||
if (!printk_ratelimit())
|
||||
return 0;
|
||||
|
||||
memset(&task_info, 0, sizeof(struct amdgpu_task_info));
|
||||
amdgpu_vm_get_task_info(adev, entry->pasid, &task_info);
|
||||
|
@ -128,11 +129,12 @@ static int gmc_v10_0_process_interrupt(struct amdgpu_device *adev,
|
|||
entry->src_id, entry->ring_id, entry->vmid,
|
||||
entry->pasid, task_info.process_name, task_info.tgid,
|
||||
task_info.task_name, task_info.pid);
|
||||
dev_err(adev->dev, " in page starting at address 0x%016llx from client %d\n",
|
||||
dev_err(adev->dev, " in page starting at address 0x%012llx from client %d\n",
|
||||
addr, entry->client_id);
|
||||
|
||||
if (!amdgpu_sriov_vf(adev))
|
||||
hub->vmhub_funcs->print_l2_protection_fault_status(adev, status);
|
||||
}
|
||||
hub->vmhub_funcs->print_l2_protection_fault_status(adev,
|
||||
status);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue