diff options
Diffstat (limited to 'arch/x86/kernel/time_64.c')
-rw-r--r-- | arch/x86/kernel/time_64.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/arch/x86/kernel/time_64.c b/arch/x86/kernel/time_64.c index c737849e2ef7..e3d49c553af2 100644 --- a/arch/x86/kernel/time_64.c +++ b/arch/x86/kernel/time_64.c | |||
@@ -56,7 +56,7 @@ static irqreturn_t timer_event_interrupt(int irq, void *dev_id) | |||
56 | /* calibrate_cpu is used on systems with fixed rate TSCs to determine | 56 | /* calibrate_cpu is used on systems with fixed rate TSCs to determine |
57 | * processor frequency */ | 57 | * processor frequency */ |
58 | #define TICK_COUNT 100000000 | 58 | #define TICK_COUNT 100000000 |
59 | unsigned long __init native_calculate_cpu_khz(void) | 59 | unsigned long __init calibrate_cpu(void) |
60 | { | 60 | { |
61 | int tsc_start, tsc_now; | 61 | int tsc_start, tsc_now; |
62 | int i, no_ctr_free; | 62 | int i, no_ctr_free; |
@@ -116,23 +116,11 @@ void __init hpet_time_init(void) | |||
116 | 116 | ||
117 | void __init time_init(void) | 117 | void __init time_init(void) |
118 | { | 118 | { |
119 | tsc_calibrate(); | 119 | tsc_init(); |
120 | |||
121 | cpu_khz = tsc_khz; | ||
122 | if (cpu_has(&boot_cpu_data, X86_FEATURE_CONSTANT_TSC) && | ||
123 | (boot_cpu_data.x86_vendor == X86_VENDOR_AMD)) | ||
124 | cpu_khz = calculate_cpu_khz(); | ||
125 | |||
126 | if (unsynchronized_tsc()) | ||
127 | mark_tsc_unstable("TSCs unsynchronized"); | ||
128 | |||
129 | if (cpu_has(&boot_cpu_data, X86_FEATURE_RDTSCP)) | 120 | if (cpu_has(&boot_cpu_data, X86_FEATURE_RDTSCP)) |
130 | vgetcpu_mode = VGETCPU_RDTSCP; | 121 | vgetcpu_mode = VGETCPU_RDTSCP; |
131 | else | 122 | else |
132 | vgetcpu_mode = VGETCPU_LSL; | 123 | vgetcpu_mode = VGETCPU_LSL; |
133 | 124 | ||
134 | printk(KERN_INFO "time.c: Detected %d.%03d MHz processor.\n", | ||
135 | cpu_khz / 1000, cpu_khz % 1000); | ||
136 | init_tsc_clocksource(); | ||
137 | late_time_init = choose_time_init(); | 125 | late_time_init = choose_time_init(); |
138 | } | 126 | } |