Skip to content

Commit a83b039

Browse files
committed
x86/mce/intel: Use MCG_BANKCNT_MASK instead of 0xff
JIRA: https://issues.redhat.com/browse/RHEL-113399 commit 754269c Author: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Date: Fri Oct 25 10:45:54 2024 +0800 x86/mce/intel: Use MCG_BANKCNT_MASK instead of 0xff Use the predefined MCG_BANKCNT_MASK macro instead of the hardcoded 0xff to mask the bank number bits. No functional changes intended. Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Tony Luck <tony.luck@intel.com> Reviewed-by: Nikolay Borisov <nik.borisov@suse.com> Reviewed-by: Sohil Mehta <sohil.mehta@intel.com> Link: https://lore.kernel.org/r/20241025024602.24318-3-qiuxu.zhuo@intel.com Signed-off-by: Steve Best <sbest@redhat.com>
1 parent f743e5b commit a83b039

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/cpu/mce/intel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static int cmci_supported(int *banks)
9494
if (!boot_cpu_has(X86_FEATURE_APIC) || lapic_get_maxlvt() < 6)
9595
return 0;
9696
rdmsrl(MSR_IA32_MCG_CAP, cap);
97-
*banks = min_t(unsigned, MAX_NR_BANKS, cap & 0xff);
97+
*banks = min_t(unsigned, MAX_NR_BANKS, cap & MCG_BANKCNT_MASK);
9898
return !!(cap & MCG_CMCI_P);
9999
}
100100

0 commit comments

Comments
 (0)