ACPI: APEI: fix the wrong iteration of generic error status block
The revision 0x300 generic error data entry is different from the old version, but currently iterating through the GHES estatus blocks does not take into account this difference. This will lead to failure to get the right data entry if GHES has revision 0x300 error data entry. Update the GHES estatus iteration macro to properly increment using acpi_hest_get_next(), and correct the iteration termination condition because the status block data length only includes error data length. Convert the CPER estatus checking and printing iteration logic to use same macro. Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com> Tested-by: Tyler Baicar <tbaicar@codeaurora.org> Reviewed-by: Borislav Petkov <bp@suse.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
bdb9458a33
commit
c4335fdd38
@@ -113,6 +113,11 @@ static inline void *acpi_hest_get_next(struct acpi_hest_generic_data *gdata)
|
||||
return (void *)(gdata) + acpi_hest_get_record_size(gdata);
|
||||
}
|
||||
|
||||
#define apei_estatus_for_each_section(estatus, section) \
|
||||
for (section = (struct acpi_hest_generic_data *)(estatus + 1); \
|
||||
(void *)section - (void *)(estatus + 1) < estatus->data_length; \
|
||||
section = acpi_hest_get_next(section))
|
||||
|
||||
int ghes_notify_sea(void);
|
||||
|
||||
#endif /* GHES_H */
|
||||
|
Reference in New Issue
Block a user