Skip to content

Commit 754269c

Browse files
qzhuo2bp3tk0v
authored andcommitted
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 <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Reviewed-by: Tony Luck <[email protected]> Reviewed-by: Nikolay Borisov <[email protected]> Reviewed-by: Sohil Mehta <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 325c337 commit 754269c

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)