Skip to content

Commit

Permalink
ACPI: extlog: Fix finding the generic error data for v3 structure
Browse files Browse the repository at this point in the history
Fix by using acpi_hest_get_payload() to find out the correct
generic error data for v3 structure.

The revision v300 generic error data is different from the old one, so
for compatibility with old and new version, change to a new interface to
locate the right memory error section that was defined in CPER.

Signed-off-by: Xiaochun Lee <lixc17@lenovo.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Xiaochun Lee authored and Rafael J. Wysocki committed Aug 17, 2023
1 parent 2ccdd1b commit ae769fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/acpi_extlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
fru_text = "";
sec_type = (guid_t *)gdata->section_type;
if (guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {
struct cper_sec_mem_err *mem = (void *)(gdata + 1);
struct cper_sec_mem_err *mem = acpi_hest_get_payload(gdata);

if (gdata->error_data_length >= sizeof(*mem))
trace_extlog_mem_event(mem, err_seq, fru_id, fru_text,
Expand Down

0 comments on commit ae769fb

Please sign in to comment.