diff options
author | Andi Kleen <ak@suse.de> | 2006-09-26 10:52:41 +0200 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-09-26 10:52:41 +0200 |
commit | 2049336f60d297c85ac977245b9326ec00396114 (patch) | |
tree | b7af9b104177e32d100289e9cb174d71767c9ce5 /arch | |
parent | 9ddab42d1e65dfbdb14588346d47fb142090ab40 (diff) | |
download | op-kernel-dev-2049336f60d297c85ac977245b9326ec00396114.zip op-kernel-dev-2049336f60d297c85ac977245b9326ec00396114.tar.gz |
[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.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 085f2e0..26524ce 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) /* 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); } static void __cpuinit detect_ht(struct cpuinfo_x86 *c) |