Re: [PATCH] x86: Report Intel platform_id in /proc/cpuinfo

Thomas Gleixner
2016-09-21T12:33:03Z

On Thu, 2 Jun 2016, Andi Kleen wrote:

Sorry for answering late. This got stuck in my backlog forever.

> diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
> index ee81c54..bcd3f59 100644
> --- a/arch/x86/kernel/cpu/microcode/intel.c
> +++ b/arch/x86/kernel/cpu/microcode/intel.c
> @@ -812,6 +812,8 @@ static int collect_cpu_info(int cpu_num, struct cpu_signature *csig)
> /* get processor flags from MSR 0x17 */
> rdmsr(MSR_IA32_PLATFORM_ID, val[0], val[1]);
> csig->pf = 1 << ((val[1] >> 18) & 7);
> + cpu_data(cpu_num).platform_id = (val[1] >> 18) & 7;
> + cpu_data(cpu_num).has_platform_id = true;

Please move that evaluation to arch/x86/kernel/cpu/intel.c and let the
micro code driver use the information from cpu_data.

Thanks,

tglx