Skip to content

Commit

Permalink
[PATCH] Don't synchronize time reading on single core AMD systems
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andi Kleen authored and Andi Kleen committed Sep 26, 2006
1 parent 9ddab42 commit 2049336
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/x86_64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2049336

Please sign in to comment.