Skip to contentSkip to conversation

drm/amdgpu: Disable fru_id field in CPER section

PATCH In review Xiang Liu 2 participants 2 messages Feb 26, 2025

Subsystems (2)
lore
Share & tools
lore

Xiang Liu

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Disable fru_id field in CPER section

The fru_id field is disabled cause of mis-matching defination between CPER spec and driver.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c +1 -4
index 5b6bdabb8012..0b288deb9b19 100644
@@ -112,7 +112,6 @@ static int amdgpu_cper_entry_fill_section_desc(struct amdgpu_device *adev,
 	section_desc->revision_major		= CPER_SEC_MAJOR_REV_22;
 	section_desc->sec_offset		= section_offset;
 	section_desc->sec_length		= section_length;
-	section_desc->valid_bits.fru_id		= 1;
 	section_desc->valid_bits.fru_text	= 1;
 	section_desc->flag_bits.primary		= 1;
 	section_desc->severity			= sev;
@@ -122,8 +121,6 @@ static int amdgpu_cper_entry_fill_section_desc(struct amdgpu_device *adev,
 	    adev->smuio.funcs->get_socket_id)
 		snprintf(section_desc->fru_text, 20, "OAM%d",
 			 adev->smuio.funcs->get_socket_id(adev));
-	/* TODO: fru_id is 16 bytes in CPER spec, but driver defines it as 20 bytes */
-	snprintf(section_desc->fru_id, 16, "%llx", adev->unique_id);
 
 	if (bp_threshold)
 		section_desc->flag_bits.exceed_err_threshold = 1;
@@ -376,7 +373,7 @@ int amdgpu_cper_generate_ce_records(struct amdgpu_device *adev,
 
 	amdgpu_cper_entry_fill_hdr(adev, corrected, AMDGPU_CPER_TYPE_RUNTIME, sev);
 
-	/* Combine CE and UE in cper record */
+	/* Combine CE and DE in cper record */
 	list_for_each_entry(node, &banks->list, node) {
 		bank = &node->bank;
 		reg_data[CPER_ACA_REG_CTL_LO]    = lower_32_bits(bank->regs[ACA_REG_IDX_CTL]);
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Regards,
Hawking
-----Original Message-----
From: Liu, Xiang(Dean) <[email protected]>
Sent: Wednesday, February 26, 2025 11:56
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Liu, Xiang(Dean) <[email protected]>
Subject: [PATCH] drm/amdgpu: Disable fru_id field in CPER section

The fru_id field is disabled cause of mis-matching defination between CPER spec and driver.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c +0 -3
index 5b6bdabb8012..0b288deb9b19 100644
@@ -112,7 +112,6 @@ static int amdgpu_cper_entry_fill_section_desc(struct amdgpu_device *adev,
        section_desc->revision_major            = CPER_SEC_MAJOR_REV_22;
        section_desc->sec_offset                = section_offset;
        section_desc->sec_length                = section_length;
-       section_desc->valid_bits.fru_id         = 1;
        section_desc->valid_bits.fru_text       = 1;
        section_desc->flag_bits.primary         = 1;
        section_desc->severity                  = sev;
@@ -122,8 +121,6 @@ static int amdgpu_cper_entry_fill_section_desc(struct amdgpu_device *adev,
            adev->smuio.funcs->get_socket_id)
                snprintf(section_desc->fru_text, 20, "OAM%d",
                         adev->smuio.funcs->get_socket_id(adev));
-       /* TODO: fru_id is 16 bytes in CPER spec, but driver defines it as 20 bytes */
-       snprintf(section_desc->fru_id, 16, "%llx", adev->unique_id);
 
        if (bp_threshold)
                section_desc->flag_bits.exceed_err_threshold = 1; @@ -376,7 +373,7 @@ int amdgpu_cper_generate_ce_records(struct amdgpu_device *adev,
        amdgpu_cper_entry_fill_hdr(adev, corrected, AMDGPU_CPER_TYPE_RUNTIME, sev);

- /* Combine CE and UE in cper record */
+ /* Combine CE and DE in cper record */

        list_for_each_entry(node, &banks->list, node) {
                bank = &node->bank;
                reg_data[CPER_ACA_REG_CTL_LO]    = lower_32_bits(bank->regs[ACA_REG_IDX_CTL]);

--
2.34.1