diff options
Diffstat (limited to 'arch/x86_64/kernel/time.c')
-rw-r--r-- | arch/x86_64/kernel/time.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index 97b9e46d1992..560ed944dc0e 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c | |||
@@ -899,12 +899,8 @@ static int __cpuinit | |||
899 | time_cpu_notifier(struct notifier_block *nb, unsigned long action, void *hcpu) | 899 | time_cpu_notifier(struct notifier_block *nb, unsigned long action, void *hcpu) |
900 | { | 900 | { |
901 | unsigned cpu = (unsigned long) hcpu; | 901 | unsigned cpu = (unsigned long) hcpu; |
902 | if (action == CPU_ONLINE && | 902 | if (action == CPU_ONLINE) |
903 | cpu_has(&cpu_data[cpu], X86_FEATURE_RDTSCP)) { | 903 | vsyscall_set_cpu(cpu); |
904 | unsigned p; | ||
905 | p = smp_processor_id() | (cpu_to_node(smp_processor_id())<<12); | ||
906 | write_rdtscp_aux(p); | ||
907 | } | ||
908 | return NOTIFY_DONE; | 904 | return NOTIFY_DONE; |
909 | } | 905 | } |
910 | 906 | ||
@@ -993,6 +989,11 @@ void time_init_gtod(void) | |||
993 | if (unsynchronized_tsc()) | 989 | if (unsynchronized_tsc()) |
994 | notsc = 1; | 990 | notsc = 1; |
995 | 991 | ||
992 | if (cpu_has(&boot_cpu_data, X86_FEATURE_RDTSCP)) | ||
993 | vgetcpu_mode = VGETCPU_RDTSCP; | ||
994 | else | ||
995 | vgetcpu_mode = VGETCPU_LSL; | ||
996 | |||
996 | if (vxtime.hpet_address && notsc) { | 997 | if (vxtime.hpet_address && notsc) { |
997 | timetype = hpet_use_timer ? "HPET" : "PIT/HPET"; | 998 | timetype = hpet_use_timer ? "HPET" : "PIT/HPET"; |
998 | if (hpet_use_timer) | 999 | if (hpet_use_timer) |