Re: [Patch v7 09/18] x86/smt: Convert cpu_smt_control check to cpu_smt_enabled static key
From: Thomas Gleixner
Date: Wed Nov 21 2018 - 08:39:10 EST
On Tue, 20 Nov 2018, Tim Chen wrote:
> #if defined(CONFIG_SMP) && defined(CONFIG_HOTPLUG_SMT)
> -extern enum cpuhp_smt_control cpu_smt_control;
> +DECLARE_STATIC_KEY_TRUE(cpu_smt_enabled);
> +#define cpu_use_smt_and_hotplug (static_branch_likely(&cpu_smt_enabled))
Errm. No. This looks like a variable and I really got confused by the code
change. What's wrong with inline functions?
Nothing, really. And no, you don't need that thing in the context switch
code at all.
Thanks,
tglx