diff options
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 12 | ||||
-rw-r--r-- | arch/x86/kernel/time_64.c | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 088fbdb6734e..f1af71851919 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -719,12 +719,24 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c) | |||
719 | #endif | 719 | #endif |
720 | } | 720 | } |
721 | 721 | ||
722 | #ifdef CONFIG_X86_64 | ||
723 | static void vgetcpu_set_mode(void) | ||
724 | { | ||
725 | if (cpu_has(&boot_cpu_data, X86_FEATURE_RDTSCP)) | ||
726 | vgetcpu_mode = VGETCPU_RDTSCP; | ||
727 | else | ||
728 | vgetcpu_mode = VGETCPU_LSL; | ||
729 | } | ||
730 | #endif | ||
731 | |||
722 | void __init identify_boot_cpu(void) | 732 | void __init identify_boot_cpu(void) |
723 | { | 733 | { |
724 | identify_cpu(&boot_cpu_data); | 734 | identify_cpu(&boot_cpu_data); |
725 | #ifdef CONFIG_X86_32 | 735 | #ifdef CONFIG_X86_32 |
726 | sysenter_setup(); | 736 | sysenter_setup(); |
727 | enable_sep_cpu(); | 737 | enable_sep_cpu(); |
738 | #else | ||
739 | vgetcpu_set_mode(); | ||
728 | #endif | 740 | #endif |
729 | } | 741 | } |
730 | 742 | ||
diff --git a/arch/x86/kernel/time_64.c b/arch/x86/kernel/time_64.c index 207a7a1d7ac5..cb19d650c216 100644 --- a/arch/x86/kernel/time_64.c +++ b/arch/x86/kernel/time_64.c | |||
@@ -130,10 +130,6 @@ void __init hpet_time_init(void) | |||
130 | void __init time_init(void) | 130 | void __init time_init(void) |
131 | { | 131 | { |
132 | tsc_init(); | 132 | tsc_init(); |
133 | if (cpu_has(&boot_cpu_data, X86_FEATURE_RDTSCP)) | ||
134 | vgetcpu_mode = VGETCPU_RDTSCP; | ||
135 | else | ||
136 | vgetcpu_mode = VGETCPU_LSL; | ||
137 | 133 | ||
138 | late_time_init = choose_time_init(); | 134 | late_time_init = choose_time_init(); |
139 | } | 135 | } |