]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu: Rename CPER Fatal severity macro
authorXiang Liu <xiang.liu@amd.com>
Tue, 2 Dec 2025 07:43:36 +0000 (15:43 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 17 Apr 2026 19:41:13 +0000 (15:41 -0400)
Rename CPER severity macro to avoid conflicting with UEFI definition.

Signed-off-by: Xiang Liu <xiang.liu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c
drivers/gpu/drm/amd/include/amd_cper.h

index 4e6e390854e6e9b967005684de358de8e894029e..004edc28d0cc007922945284f4abba62ed66feeb 100644 (file)
@@ -153,7 +153,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;
@@ -215,7 +215,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;
@@ -312,7 +312,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;
@@ -337,7 +337,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;
@@ -353,14 +353,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;
        }
 }
 
index a252ee4c7874cb1cc4e05114af3e0643cd2e0526..baa0f30b9c4db00db5eb6465eb41109e4f8cd18a 100644 (file)
@@ -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,