aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-12-06 20:14:12 -0500
committerAndi Kleen <andi@basil.nowhere.org>2006-12-06 20:14:12 -0500
commit616779656989cb8c59177e35cb13e87028b1edc8 (patch)
treeafdd8188e3a845b879e5048eda6ea6909684d015 /arch
parenta1a70c25bed75ed36ed48bbe18b9029428d2452d (diff)
[PATCH] x86-64: Synchronize RDTSC on single core AMD
There is no guarantee that two RDTSCs in a row are monotonic, so don't assume it on single core AMD systems. This will make gettimeofday slower again Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86_64/kernel/setup.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
index a570c81c8316..05eaca41802b 100644
--- a/arch/x86_64/kernel/setup.c
+++ b/arch/x86_64/kernel/setup.c
@@ -732,11 +732,8 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
732 /* Fix cpuid4 emulation for more */ 732 /* Fix cpuid4 emulation for more */
733 num_cache_leaves = 3; 733 num_cache_leaves = 3;
734 734
735 /* When there is only one core no need to synchronize RDTSC */ 735 /* RDTSC can be speculated around */
736 if (num_possible_cpus() == 1) 736 clear_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability);
737 set_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability);
738 else
739 clear_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability);
740} 737}
741 738
742static void __cpuinit detect_ht(struct cpuinfo_x86 *c) 739static void __cpuinit detect_ht(struct cpuinfo_x86 *c)