[PATCH] x86_64: Don't try to synchronize the TSC over CPUs on Intel CPUs at boot.
They already do this in hardware and the Linux algorithm actually adds errors. Cc: mingo@elte.hu Cc: rohit.seth@intel.com Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
3c02175113
commit
737c5c3bde
@@ -335,7 +335,13 @@ static __cpuinit void sync_tsc(unsigned int master)
|
|||||||
|
|
||||||
static void __cpuinit tsc_sync_wait(void)
|
static void __cpuinit tsc_sync_wait(void)
|
||||||
{
|
{
|
||||||
if (notscsync || !cpu_has_tsc)
|
/*
|
||||||
|
* When the CPU has synchronized TSCs assume the BIOS
|
||||||
|
* or the hardware already synced. Otherwise we could
|
||||||
|
* mess up a possible perfect synchronization with a
|
||||||
|
* not-quite-perfect algorithm.
|
||||||
|
*/
|
||||||
|
if (notscsync || !cpu_has_tsc || !unsynchronized_tsc())
|
||||||
return;
|
return;
|
||||||
sync_tsc(0);
|
sync_tsc(0);
|
||||||
}
|
}
|
||||||
|
@@ -953,7 +953,7 @@ void __init time_init(void)
|
|||||||
* Make an educated guess if the TSC is trustworthy and synchronized
|
* Make an educated guess if the TSC is trustworthy and synchronized
|
||||||
* over all CPUs.
|
* over all CPUs.
|
||||||
*/
|
*/
|
||||||
static __init int unsynchronized_tsc(void)
|
__init int unsynchronized_tsc(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
if (oem_force_hpet_timer())
|
if (oem_force_hpet_timer())
|
||||||
@@ -964,7 +964,7 @@ static __init int unsynchronized_tsc(void)
|
|||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
/* Assume multi socket systems are not synchronized */
|
/* Assume multi socket systems are not synchronized */
|
||||||
return num_online_cpus() > 1;
|
return num_present_cpus() > 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -89,6 +89,8 @@ extern void check_efer(void);
|
|||||||
|
|
||||||
extern int unhandled_signal(struct task_struct *tsk, int sig);
|
extern int unhandled_signal(struct task_struct *tsk, int sig);
|
||||||
|
|
||||||
|
extern int unsynchronized_tsc(void);
|
||||||
|
|
||||||
extern void select_idle_routine(const struct cpuinfo_x86 *c);
|
extern void select_idle_routine(const struct cpuinfo_x86 *c);
|
||||||
|
|
||||||
extern void gart_parse_options(char *);
|
extern void gart_parse_options(char *);
|
||||||
|
Reference in New Issue
Block a user