diff options
| -rw-r--r-- | arch/x86_64/kernel/smpboot.c | 8 | ||||
| -rw-r--r-- | arch/x86_64/kernel/time.c | 4 | ||||
| -rw-r--r-- | include/asm-x86_64/proto.h | 2 |
3 files changed, 11 insertions, 3 deletions
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c index e6af93b51dce..994728564d6b 100644 --- a/arch/x86_64/kernel/smpboot.c +++ b/arch/x86_64/kernel/smpboot.c | |||
| @@ -335,7 +335,13 @@ static __cpuinit void sync_tsc(unsigned int master) | |||
| 335 | 335 | ||
| 336 | static void __cpuinit tsc_sync_wait(void) | 336 | static void __cpuinit tsc_sync_wait(void) |
| 337 | { | 337 | { |
| 338 | if (notscsync || !cpu_has_tsc) | 338 | /* |
| 339 | * When the CPU has synchronized TSCs assume the BIOS | ||
| 340 | * or the hardware already synced. Otherwise we could | ||
| 341 | * mess up a possible perfect synchronization with a | ||
| 342 | * not-quite-perfect algorithm. | ||
| 343 | */ | ||
| 344 | if (notscsync || !cpu_has_tsc || !unsynchronized_tsc()) | ||
| 339 | return; | 345 | return; |
| 340 | sync_tsc(0); | 346 | sync_tsc(0); |
| 341 | } | 347 | } |
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index 211bf0e51d9d..f8d4b69388d2 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c | |||
| @@ -953,7 +953,7 @@ void __init time_init(void) | |||
| 953 | * Make an educated guess if the TSC is trustworthy and synchronized | 953 | * Make an educated guess if the TSC is trustworthy and synchronized |
| 954 | * over all CPUs. | 954 | * over all CPUs. |
| 955 | */ | 955 | */ |
| 956 | static __init int unsynchronized_tsc(void) | 956 | __init int unsynchronized_tsc(void) |
| 957 | { | 957 | { |
| 958 | #ifdef CONFIG_SMP | 958 | #ifdef CONFIG_SMP |
| 959 | if (oem_force_hpet_timer()) | 959 | if (oem_force_hpet_timer()) |
| @@ -964,7 +964,7 @@ static __init int unsynchronized_tsc(void) | |||
| 964 | return 0; | 964 | return 0; |
| 965 | #endif | 965 | #endif |
| 966 | /* Assume multi socket systems are not synchronized */ | 966 | /* Assume multi socket systems are not synchronized */ |
| 967 | return num_online_cpus() > 1; | 967 | return num_present_cpus() > 1; |
| 968 | } | 968 | } |
| 969 | 969 | ||
| 970 | /* | 970 | /* |
diff --git a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h index 56dc70b7a6e4..115e496c6139 100644 --- a/include/asm-x86_64/proto.h +++ b/include/asm-x86_64/proto.h | |||
| @@ -89,6 +89,8 @@ extern void check_efer(void); | |||
| 89 | 89 | ||
| 90 | extern int unhandled_signal(struct task_struct *tsk, int sig); | 90 | extern int unhandled_signal(struct task_struct *tsk, int sig); |
| 91 | 91 | ||
| 92 | extern int unsynchronized_tsc(void); | ||
| 93 | |||
| 92 | extern void select_idle_routine(const struct cpuinfo_x86 *c); | 94 | extern void select_idle_routine(const struct cpuinfo_x86 *c); |
| 93 | 95 | ||
| 94 | extern void gart_parse_options(char *); | 96 | extern void gart_parse_options(char *); |
