提交 e04d645f 编写于 作者: G Glauber Costa 提交者: Ingo Molnar

x86: move vgetcpu mode probing to cpu detection

Take it out of time initialization and move it to
cpu detection time.
Signed-off-by: NGlauber Costa <glommer@redhat.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 33c053d0
......@@ -719,12 +719,24 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
#endif
}
#ifdef CONFIG_X86_64
static void vgetcpu_set_mode(void)
{
if (cpu_has(&boot_cpu_data, X86_FEATURE_RDTSCP))
vgetcpu_mode = VGETCPU_RDTSCP;
else
vgetcpu_mode = VGETCPU_LSL;
}
#endif
void __init identify_boot_cpu(void)
{
identify_cpu(&boot_cpu_data);
#ifdef CONFIG_X86_32
sysenter_setup();
enable_sep_cpu();
#else
vgetcpu_set_mode();
#endif
}
......
......@@ -130,10 +130,6 @@ void __init hpet_time_init(void)
void __init time_init(void)
{
tsc_init();
if (cpu_has(&boot_cpu_data, X86_FEATURE_RDTSCP))
vgetcpu_mode = VGETCPU_RDTSCP;
else
vgetcpu_mode = VGETCPU_LSL;
late_time_init = choose_time_init();
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册