Skip to content

Commit 3c0be69

Browse files
kentrussellalexdeucher
authored andcommitted
amdgpu: Don't print L2 status if there's nothing to print
If a 2nd fault comes in before the 1st is handled, the 1st fault will clear out the FAULT STATUS registers before the 2nd fault is handled. Thus we get a lot of zeroes. If status=0, just skip the L2 fault status information, to avoid confusion of why some VM fault status prints in dmesg are all zeroes. Signed-off-by: Kent Russell <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 5605a0d commit 3c0be69

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ static int gmc_v10_0_process_interrupt(struct amdgpu_device *adev,
175175
addr, entry->client_id,
176176
soc15_ih_clientid_name[entry->client_id]);
177177

178-
if (!amdgpu_sriov_vf(adev))
178+
/* Only print L2 fault status if the status register could be read and
179+
* contains useful information
180+
*/
181+
if (status != 0)
179182
hub->vmhub_funcs->print_l2_protection_fault_status(adev,
180183
status);
181184

drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ static int gmc_v11_0_process_interrupt(struct amdgpu_device *adev,
144144
dev_err(adev->dev, " in page starting at address 0x%016llx from client %d\n",
145145
addr, entry->client_id);
146146

147-
if (!amdgpu_sriov_vf(adev))
147+
/* Only print L2 fault status if the status register could be read and
148+
* contains useful information
149+
*/
150+
if (status != 0)
148151
hub->vmhub_funcs->print_l2_protection_fault_status(adev, status);
149152
}
150153

drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ static int gmc_v12_0_process_interrupt(struct amdgpu_device *adev,
137137
dev_err(adev->dev, " in page starting at address 0x%016llx from client %d\n",
138138
addr, entry->client_id);
139139

140-
if (!amdgpu_sriov_vf(adev))
140+
/* Only print L2 fault status if the status register could be read and
141+
* contains useful information
142+
*/
143+
if (status != 0)
141144
hub->vmhub_funcs->print_l2_protection_fault_status(adev, status);
142145
}
143146

drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,12 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,
672672
(amdgpu_ip_version(adev, GC_HWIP, 0) >= IP_VERSION(9, 4, 2)))
673673
return 0;
674674

675+
/* Only print L2 fault status if the status register could be read and
676+
* contains useful information
677+
*/
678+
if (!status)
679+
return 0;
680+
675681
if (!amdgpu_sriov_vf(adev))
676682
WREG32_P(hub->vm_l2_pro_fault_cntl, 1, ~1);
677683

0 commit comments

Comments
 (0)