Re: [PATCH 3/6] x86/microcode: Refactor platform ID enumeration into a helper

From: Sohil Mehta

Date: Tue Feb 10 2026 - 18:21:03 EST


On 2/6/2026 3:14 PM, Dave Hansen wrote:

> b/arch/x86/include/asm/microcode.h | 32 ++++++++++++++++++++++++++++++++
> b/arch/x86/kernel/cpu/microcode/intel.c | 10 +---------
> 2 files changed, 33 insertions(+), 9 deletions(-)
>

Reviewed-by: Sohil Mehta <sohil.mehta@xxxxxxxxx>

A minor nit:

> - if (IFM(x86_family(sig->sig), x86_model(sig->sig)) >= INTEL_PENTIUM_III_DESCHUTES) {
> - unsigned int val[2];
> -
> - /* get processor flags from MSR 0x17 */
> - native_rdmsr(MSR_IA32_PLATFORM_ID, val[0], val[1]);
> - sig->pf = 1 << ((val[1] >> 18) & 7);
> - }
> + sig->pf = 1 << intel_get_platform_id();

How about BIT(intel_get_platform_id())?

> }
> EXPORT_SYMBOL_GPL(intel_collect_cpu_info);
>
> _