Re: [PATCH v3 4/4] Add R3MWAIT to CPU features

From: Thomas Gleixner
Date: Thu Oct 13 2016 - 11:44:25 EST


On Thu, 13 Oct 2016, Grzegorz Andrejczuk wrote:
> --- a/arch/x86/kernel/cpu/common.c
> +++ b/arch/x86/kernel/cpu/common.c
> @@ -1108,6 +1108,9 @@ static void identify_cpu(struct cpuinfo_x86 *c)
> #endif
> /* The boot/hotplug time assigment got cleared, restore it */
> c->logical_proc_id = topology_phys_to_logical_pkg(c->phys_proc_id);
> +
> + if (cpu_has(c, X86_FEATURE_PHIR3MWAIT))
> + elf_hwcap2 |= HWCAP2_PHIR3MWAIT;

Why can't you just set that bit in probe_xeon_phi_r3mwait()?

Just because its so much fun to sprinkle code at random places, right?

Sigh.

tglx