]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
x86: move vgetcpu mode probing to cpu detection
authorGlauber Costa <glommer@redhat.com>
Mon, 22 Sep 2008 17:35:08 +0000 (14:35 -0300)
committerIngo Molnar <mingo@elte.hu>
Mon, 13 Oct 2008 08:21:49 +0000 (10:21 +0200)
Take it out of time initialization and move it to
cpu detection time.

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/common.c
arch/x86/kernel/time_64.c

index 088fbdb6734e3ca90181c17b178c26baaaf07450..f1af718519195efcaf7f6c02f4b8069154123f99 100644 (file)
@@ -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
 }
 
index 207a7a1d7ac5029b1d981d398aed46e9a9283453..cb19d650c21643599aa1423a57b64a85ee26afe8 100644 (file)
@@ -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();
 }