diff options
author | Andi Kleen <ak@suse.de> | 2006-09-26 04:52:41 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-09-26 04:52:41 -0400 |
commit | 2049336f60d297c85ac977245b9326ec00396114 (patch) | |
tree | b7af9b104177e32d100289e9cb174d71767c9ce5 /arch/x86_64/kernel/setup.c | |
parent | 9ddab42d1e65dfbdb14588346d47fb142090ab40 (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/x86_64/kernel/setup.c')
-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 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 | ||
733 | static void __cpuinit detect_ht(struct cpuinfo_x86 *c) | 739 | static void __cpuinit detect_ht(struct cpuinfo_x86 *c) |