Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Qiuxu Zhuo and committed by
Borislav Petkov (AMD)
754269cc 325c3376

+1 -1
+1 -1
arch/x86/kernel/cpu/mce/intel.c
··· 94 94 if (!boot_cpu_has(X86_FEATURE_APIC) || lapic_get_maxlvt() < 6) 95 95 return 0; 96 96 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); 98 98 return !!(cap & MCG_CMCI_P); 99 99 } 100 100