mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-05 18:14:07 +08:00
x86/CPU: Call detect_nopl() only on the BSP
Make it use the setup_* variants and have it be called only on the BSP and drop the call in generic_identify() - X86_FEATURE_NOPL will be replicated to the APs through the forced caps. Helps to keep the mess at a manageable level. Signed-off-by: Borislav Petkov <bp@suse.de> Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: steven.sistare@oracle.com Cc: daniel.m.jordan@oracle.com Cc: linux@armlinux.org.uk Cc: schwidefsky@de.ibm.com Cc: heiko.carstens@de.ibm.com Cc: john.stultz@linaro.org Cc: sboyd@codeaurora.org Cc: hpa@zytor.com Cc: douly.fnst@cn.fujitsu.com Cc: peterz@infradead.org Cc: prarit@redhat.com Cc: feng.tang@intel.com Cc: pmladek@suse.com Cc: gnomes@lxorguk.ukuu.org.uk Cc: linux-s390@vger.kernel.org Cc: boris.ostrovsky@oracle.com Cc: jgross@suse.com Cc: pbonzini@redhat.com Link: https://lkml.kernel.org/r/20180719205545.16512-11-pasha.tatashin@oracle.com
This commit is contained in:
parent
8990cac6e5
commit
9b3661cd7e
@ -1024,12 +1024,12 @@ static void __init cpu_set_bug_bits(struct cpuinfo_x86 *c)
|
||||
* unless we can find a reliable way to detect all the broken cases.
|
||||
* Enable it explicitly on 64-bit for non-constant inputs of cpu_has().
|
||||
*/
|
||||
static void detect_nopl(struct cpuinfo_x86 *c)
|
||||
static void detect_nopl(void)
|
||||
{
|
||||
#ifdef CONFIG_X86_32
|
||||
clear_cpu_cap(c, X86_FEATURE_NOPL);
|
||||
setup_clear_cpu_cap(X86_FEATURE_NOPL);
|
||||
#else
|
||||
set_cpu_cap(c, X86_FEATURE_NOPL);
|
||||
setup_force_cpu_cap(X86_FEATURE_NOPL);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1108,7 +1108,7 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
|
||||
if (!pgtable_l5_enabled())
|
||||
setup_clear_cpu_cap(X86_FEATURE_LA57);
|
||||
|
||||
detect_nopl(c);
|
||||
detect_nopl();
|
||||
}
|
||||
|
||||
void __init early_cpu_init(void)
|
||||
@ -1206,8 +1206,6 @@ static void generic_identify(struct cpuinfo_x86 *c)
|
||||
|
||||
get_model_name(c); /* Default name */
|
||||
|
||||
detect_nopl(c);
|
||||
|
||||
detect_null_seg_behavior(c);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user