x86/MCE/AMD: Split amd_mce_is_memory_error()
authorYazen Ghannam <yazen.ghannam@amd.com>
Tue, 13 Jun 2023 14:11:40 +0000 (09:11 -0500)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 16 Oct 2023 13:04:53 +0000 (15:04 +0200)
commit495a91d0998367f4f079593f491bdfe8ef06838e
tree0bd02fe6c1ea9d679361cca3e9642b711b016161
parent58720809f52779dc0f08e53e54b014209d13eebb
x86/MCE/AMD: Split amd_mce_is_memory_error()

Define helper functions for legacy and SMCA systems in order to reuse
individual checks in later changes.

Describe what each function is checking for, and correct the XEC bitmask
for SMCA.

No functional change intended.

  [ bp: Use "else in amd_mce_is_memory_error() to make the conditional
    balanced, for readability. ]

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230613141142.36801-2-yazen.ghannam@amd.com
arch/x86/kernel/cpu/mce/amd.c