Commit ae769fbd authored by Xiaochun Lee's avatar Xiaochun Lee Committed by Rafael J. Wysocki

ACPI: extlog: Fix finding the generic error data for v3 structure

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: default avatarXiaochun Lee <lixc17@lenovo.com>
Reviewed-by: default avatarTony Luck <tony.luck@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 2ccdd1b1
...@@ -172,7 +172,7 @@ static int extlog_print(struct notifier_block *nb, unsigned long val, ...@@ -172,7 +172,7 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
fru_text = ""; fru_text = "";
sec_type = (guid_t *)gdata->section_type; sec_type = (guid_t *)gdata->section_type;
if (guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) { 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)) if (gdata->error_data_length >= sizeof(*mem))
trace_extlog_mem_event(mem, err_seq, fru_id, fru_text, trace_extlog_mem_event(mem, err_seq, fru_id, fru_text,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment