x86/RAS: Hide SMCA bank names

Add accessor functions and hide the smca_names array. Also, add a
sanity-check to bank HWID assignment in get_smca_bank_info().

Signed-off-by: Borislav Petkov <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
Borislav Petkov 2016-11-03 21:12:33 +01:00 • committed by Thomas Gleixner
commit c09a8c40e0
3 changed files with 31 additions and 11 deletions

View file

@ -867,7 +867,7 @@ static void decode_smca_errors(struct mce *m)
return;
bank_type = hwid->bank_type;
ip_name = smca_names[bank_type].long_name;
ip_name = smca_get_long_name(bank_type);
pr_emerg(HW_ERR "%s Extended Error Code: %d\n", ip_name, xec);