Commit 2049336f authored by Andi Kleen's avatar Andi Kleen Committed by Andi Kleen

[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: default avatarAndi Kleen <ak@suse.de>
parent 9ddab42d
...@@ -728,6 +728,12 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) ...@@ -728,6 +728,12 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
/* Fix cpuid4 emulation for more */ /* Fix cpuid4 emulation for more */
num_cache_leaves = 3; 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) static void __cpuinit detect_ht(struct cpuinfo_x86 *c)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment