aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-09-26 04:52:41 -0400
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 04:52:41 -0400
commit2049336f60d297c85ac977245b9326ec00396114 (patch)
treeb7af9b104177e32d100289e9cb174d71767c9ce5 /arch
parent9ddab42d1e65dfbdb14588346d47fb142090ab40 (diff)
[PATCH] Don't synchronize time reading on single core AMD systems
We do some additional CPU synchronization in gettimeofday et.al. to make sure the time stamps are always monotonic over multiple CPUs. But on single core systems that is not needed. So don't do it. Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86_64/kernel/setup.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
index 085f2e09b9dc..26524ce3b239 100644
--- a/arch/x86_64/kernel/setup.c
+++ b/arch/x86_64/kernel/setup.c
@@ -728,6 +728,12 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
728 728
729 /* Fix cpuid4 emulation for more */ 729 /* Fix cpuid4 emulation for more */
730 num_cache_leaves = 3; 730 num_cache_leaves = 3;
731
732 /* When there is only one core no need to synchronize RDTSC */
733 if (num_possible_cpus() == 1)
734 set_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability);
735 else
736 clear_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability);
731} 737}
732 738
733static void __cpuinit detect_ht(struct cpuinfo_x86 *c) 739static void __cpuinit detect_ht(struct cpuinfo_x86 *c)