Skip to contentSkip to conversation

drm/amdgpu: Remove unnecessary ras cap check

PATCH In review Hawking Zhang 2 participants 2 messages Aug 9, 2023 – Aug 10, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Remove unnecessary ras cap check

RAS global isr will only be invoked by hardware interrupt. Don't need to query ras capability in isr In addition, amdgpu_ras_interrupt_fatal_error_handler ensures the isr won't be called from guest linux side by accident. The RAS cap check in isr that introduced to fix sriov crash is not needed any more

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -4
index 00658c2816dc..c58b31121fd7 100644
@@ -2970,10 +2970,6 @@ int amdgpu_ras_fini(struct amdgpu_device *adev)
 
 void amdgpu_ras_global_ras_isr(struct amdgpu_device *adev)
 {
-	amdgpu_ras_check_supported(adev);
-	if (!adev->ras_hw_enabled)
-		return;
-
 	if (atomic_cmpxchg(&amdgpu_ras_in_intr, 0, 1) == 0) {
 		struct amdgpu_ras *ras = amdgpu_ras_get_context(adev);
 
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - General]

Quoted 34 lines

-----Original Message-----
From: Hawking Zhang <[email protected]>
Sent: Wednesday, August 9, 2023 7:22 PM
To: [email protected]; Zhou1, Tao <[email protected]>
Cc: Zhang, Hawking <[email protected]>
Subject: [PATCH] drm/amdgpu: Remove unnecessary ras cap check

RAS global isr will only be invoked by hardware interrupt. Don't need to query ras capability in isr In addition, amdgpu_ras_interrupt_fatal_error_handler ensures the isr won't be called from guest linux side by accident. The RAS cap check in isr that introduced to fix sriov crash is not needed any more

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -5
index 00658c2816dc..c58b31121fd7 100644
@@ -2970,10 +2970,6 @@ int amdgpu_ras_fini(struct amdgpu_device *adev)
 
 void amdgpu_ras_global_ras_isr(struct amdgpu_device *adev)  {
-     amdgpu_ras_check_supported(adev);
-     if (!adev->ras_hw_enabled)
-             return;
-
      if (atomic_cmpxchg(&amdgpu_ras_in_intr, 0, 1) == 0) {
              struct amdgpu_ras *ras = amdgpu_ras_get_context(adev);
 
--

2.17.1