Skip to contentSkip to conversation

drm/amdgpu: Rename CPER Fatal severity macro

PATCH In review Xiang Liu 2 participants 2 messages Apr 14

Subsystems (2)
lore
Share & tools
lore

Xiang Liu

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Rename CPER Fatal severity macro

Rename CPER severity macro to avoid conflicting with UEFI definition.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c | 12 ++++++------
 drivers/gpu/drm/amd/include/amd_cper.h   |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c +6 -6
index c72c345334d0..0b83b61e12f0 100644
@@ -151,7 +151,7 @@ int amdgpu_cper_entry_fill_fatal_section(struct amdgpu_device *adev,
 		   FATAL_SEC_OFFSET(hdr->sec_cnt, idx));
 
 	amdgpu_cper_entry_fill_section_desc(adev, section_desc, false, false,
-					    CPER_SEV_FATAL, CRASHDUMP, FATAL_SEC_LEN,
+					    CPER_SEV_FATAL_UNCORRECTED, CRASHDUMP, FATAL_SEC_LEN,
 					    FATAL_SEC_OFFSET(hdr->sec_cnt, idx));
 
 	section->body.reg_ctx_type = CPER_CTX_TYPE_CRASH;
@@ -213,7 +213,7 @@ int amdgpu_cper_entry_fill_bad_page_threshold_section(struct amdgpu_device *adev
 		   NONSTD_SEC_OFFSET(hdr->sec_cnt, idx));
 
 	amdgpu_cper_entry_fill_section_desc(adev, section_desc, true, false,
-					    CPER_SEV_FATAL, RUNTIME, NONSTD_SEC_LEN,
+					    CPER_SEV_FATAL_UNCORRECTED, RUNTIME, NONSTD_SEC_LEN,
 					    NONSTD_SEC_OFFSET(hdr->sec_cnt, idx));
 
 	section->hdr.valid_bits.err_info_cnt = 1;
@@ -310,7 +310,7 @@ int amdgpu_cper_generate_ue_record(struct amdgpu_device *adev,
 	reg_data.synd_lo   = lower_32_bits(bank->regs[ACA_REG_IDX_SYND]);
 	reg_data.synd_hi   = upper_32_bits(bank->regs[ACA_REG_IDX_SYND]);
 
-	amdgpu_cper_entry_fill_hdr(adev, fatal, AMDGPU_CPER_TYPE_FATAL, CPER_SEV_FATAL);
+	amdgpu_cper_entry_fill_hdr(adev, fatal, AMDGPU_CPER_TYPE_FATAL, CPER_SEV_FATAL_UNCORRECTED);
 	ret = amdgpu_cper_entry_fill_fatal_section(adev, fatal, 0, reg_data);
 	if (ret)
 		return ret;
@@ -335,7 +335,7 @@ int amdgpu_cper_generate_bp_threshold_record(struct amdgpu_device *adev)
 
 	amdgpu_cper_entry_fill_hdr(adev, bp_threshold,
 				   AMDGPU_CPER_TYPE_BP_THRESHOLD,
-				   CPER_SEV_FATAL);
+				   CPER_SEV_FATAL_UNCORRECTED);
 	ret = amdgpu_cper_entry_fill_bad_page_threshold_section(adev, bp_threshold, 0);
 	if (ret)
 		return ret;
@@ -351,14 +351,14 @@ static enum cper_error_severity amdgpu_aca_err_type_to_cper_sev(struct amdgpu_de
 {
 	switch (aca_err_type) {
 	case ACA_ERROR_TYPE_UE:
-		return CPER_SEV_FATAL;
+		return CPER_SEV_FATAL_UNCORRECTED;
 	case ACA_ERROR_TYPE_CE:
 		return CPER_SEV_NON_FATAL_CORRECTED;
 	case ACA_ERROR_TYPE_DEFERRED:
 		return CPER_SEV_NON_FATAL_UNCORRECTED;
 	default:
 		dev_err(adev->dev, "Unknown ACA error type!\n");
-		return CPER_SEV_FATAL;
+		return CPER_SEV_FATAL_UNCORRECTED;
 	}
 }
 
drivers/gpu/drm/amd/include/amd_cper.h +1 -1
index a252ee4c7874..baa0f30b9c4d 100644
@@ -58,7 +58,7 @@
 
 enum cper_error_severity {
 	CPER_SEV_NON_FATAL_UNCORRECTED = 0,
-	CPER_SEV_FATAL                 = 1,
+	CPER_SEV_FATAL_UNCORRECTED     = 1,
 	CPER_SEV_NON_FATAL_CORRECTED   = 2,
 	CPER_SEV_NUM                   = 3,
 
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Quoted 106 lines

-----Original Message-----
From: Liu, Xiang(Dean) <[email protected]>
Sent: Tuesday, April 14, 2026 9:32 AM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Liu, Xiang(Dean) <[email protected]>
Subject: [PATCH] drm/amdgpu: Rename CPER Fatal severity macro

Rename CPER severity macro to avoid conflicting with UEFI definition.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c | 12 ++++++------
 drivers/gpu/drm/amd/include/amd_cper.h   |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c +1 -1
index c72c345334d0..0b83b61e12f0 100644
@@ -151,7 +151,7 @@ int amdgpu_cper_entry_fill_fatal_section(struct
 amdgpu_device *adev,
                 FATAL_SEC_OFFSET(hdr->sec_cnt, idx));
 
      amdgpu_cper_entry_fill_section_desc(adev, section_desc, false, false,
-                                         CPER_SEV_FATAL, CRASHDUMP,
 FATAL_SEC_LEN,
+                                         CPER_SEV_FATAL_UNCORRECTED,
 CRASHDUMP, FATAL_SEC_LEN,
                                          FATAL_SEC_OFFSET(hdr->sec_cnt,

idx));

      section->body.reg_ctx_type = CPER_CTX_TYPE_CRASH; @@ -213,7

+213,7 @@ int amdgpu_cper_entry_fill_bad_page_threshold_section(struct amdgpu_device *adev
NONSTD_SEC_OFFSET(hdr->sec_cnt, idx));

amdgpu_cper_entry_fill_section_desc(adev, section_desc, true, false,
- CPER_SEV_FATAL, RUNTIME,
NONSTD_SEC_LEN,
+ CPER_SEV_FATAL_UNCORRECTED,
RUNTIME, NONSTD_SEC_LEN,
NONSTD_SEC_OFFSET(hdr-

Quoted 1 line

sec_cnt, idx));

      section->hdr.valid_bits.err_info_cnt = 1; @@ -310,7 +310,7 @@ int

amdgpu_cper_generate_ue_record(struct amdgpu_device *adev,
reg_data.synd_lo = lower_32_bits(bank-

Quoted 1 line

regs[ACA_REG_IDX_SYND]);

reg_data.synd_hi = upper_32_bits(bank-

Quoted 1 line

regs[ACA_REG_IDX_SYND]);

- amdgpu_cper_entry_fill_hdr(adev, fatal, AMDGPU_CPER_TYPE_FATAL,
CPER_SEV_FATAL);

drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c +3 -1
+     amdgpu_cper_entry_fill_hdr(adev, fatal, AMDGPU_CPER_TYPE_FATAL,
+CPER_SEV_FATAL_UNCORRECTED);
      ret = amdgpu_cper_entry_fill_fatal_section(adev, fatal, 0, reg_data);
      if (ret)
              return ret;
@@ -335,7 +335,7 @@ int
 amdgpu_cper_generate_bp_threshold_record(struct amdgpu_device *adev)
 
      amdgpu_cper_entry_fill_hdr(adev, bp_threshold,
                                 AMDGPU_CPER_TYPE_BP_THRESHOLD,
-                                CPER_SEV_FATAL);
+                                CPER_SEV_FATAL_UNCORRECTED);
      ret = amdgpu_cper_entry_fill_bad_page_threshold_section(adev,
 bp_threshold, 0);
      if (ret)
              return ret;
drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c +2 -2
@@ -351,14 +351,14 @@ static enum cper_error_severity
 amdgpu_aca_err_type_to_cper_sev(struct amdgpu_de  {
      switch (aca_err_type) {
      case ACA_ERROR_TYPE_UE:
-             return CPER_SEV_FATAL;
+             return CPER_SEV_FATAL_UNCORRECTED;
      case ACA_ERROR_TYPE_CE:
              return CPER_SEV_NON_FATAL_CORRECTED;
      case ACA_ERROR_TYPE_DEFERRED:
              return CPER_SEV_NON_FATAL_UNCORRECTED;
      default:
              dev_err(adev->dev, "Unknown ACA error type!\n");
-             return CPER_SEV_FATAL;
+             return CPER_SEV_FATAL_UNCORRECTED;
      }
 }
 
drivers/gpu/drm/amd/include/amd_cper.h +1 -2
index a252ee4c7874..baa0f30b9c4d 100644
@@ -58,7 +58,7 @@
 
 enum cper_error_severity {
      CPER_SEV_NON_FATAL_UNCORRECTED = 0,
-     CPER_SEV_FATAL                 = 1,
+     CPER_SEV_FATAL_UNCORRECTED     = 1,
      CPER_SEV_NON_FATAL_CORRECTED   = 2,
      CPER_SEV_NUM                   = 3,
 
--

2.34.1