]> www.infradead.org Git - users/willy/linux.git/commit
x86/mce: Use mce_prep_record() helpers for apei_smca_report_x86_error()
authorYazen Ghannam <yazen.ghannam@amd.com>
Tue, 30 Jul 2024 18:29:58 +0000 (13:29 -0500)
committerBorislav Petkov (AMD) <bp@alien8.de>
Thu, 1 Aug 2024 16:20:25 +0000 (18:20 +0200)
commit793aa4bf192d0ad07cca001a596f955d121f5c10
tree41f437fc4109273107cee0227a14bec71b06bf21
parentf9bbb8ad0c8b2f37e3d474b8693f563e4a29e92e
x86/mce: Use mce_prep_record() helpers for apei_smca_report_x86_error()

Current AMD systems can report MCA errors using the ACPI Boot Error
Record Table (BERT). The BERT entries for MCA errors will be an x86
Common Platform Error Record (CPER) with an MSR register context that
matches the MCAX/SMCA register space.

However, the BERT will not necessarily be processed on the CPU that
reported the MCA errors. Therefore, the correct CPU number needs to be
determined and the information saved in struct mce.

Use the newly defined mce_prep_record_*() helpers to get the correct
data.

Also, add an explicit check to verify that a valid CPU number was found
from the APIC ID search.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
Link: https://lore.kernel.org/r/20240730182958.4117158-4-yazen.ghannam@amd.com
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
arch/x86/kernel/cpu/mce/apei.c