summaryrefslogtreecommitdiffstats
path: root/arch/x86_64
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-12-07 02:14:12 +0100
committerAndi Kleen <andi@basil.nowhere.org>2006-12-07 02:14:12 +0100
commit616779656989cb8c59177e35cb13e87028b1edc8 (patch)
treeafdd8188e3a845b879e5048eda6ea6909684d015 /arch/x86_64
parenta1a70c25bed75ed36ed48bbe18b9029428d2452d (diff)
downloadop-kernel-dev-616779656989cb8c59177e35cb13e87028b1edc8.zip
op-kernel-dev-616779656989cb8c59177e35cb13e87028b1edc8.tar.gz
[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/x86_64')
-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 a570c81..05eaca4 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)
/* Fix cpuid4 emulation for more */
num_cache_leaves = 3;
- /* When there is only one core no need to synchronize RDTSC */
- if (num_possible_cpus() == 1)
- set_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability);
- else
- clear_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability);
+ /* RDTSC can be speculated around */
+ clear_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability);
}
static void __cpuinit detect_ht(struct cpuinfo_x86 *c)
OpenPOWER on IntegriCloud