Re: [Patch v7 09/18] x86/smt: Convert cpu_smt_control check to cpu_smt_enabled static key

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux