summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorXiaochun Lee <lixc17@lenovo.com>2023-08-02 21:47:46 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-08-17 19:44:22 +0200
commitae769fbd143d9f9349387f27bb4f36d2ba5b45df (patch)
treec0746775bfdb29232bc0a3e0ce25f2a7a97b2f74 /drivers/acpi
parent2ccdd1b13c591d306f0401d98dedc4bdcd02b421 (diff)
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: Xiaochun Lee <lixc17@lenovo.com> Reviewed-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/acpi_extlog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
index e648158368a7..e120a96e1eae 100644
--- a/drivers/acpi/acpi_extlog.c
+++ b/drivers/acpi/acpi_extlog.c
@@ -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,