Skip to content

Commit

Permalink
[PATCH] ppc32: set smp_tb_synchronized on UP with SMP kernel
Browse files Browse the repository at this point in the history
ppc32 kernel, when built with CONFIG_SMP and booted on a single CPU
machine, will not properly set smp_tb_synchronized, thus causing
gettimeofday() to not use the HW timebase and to be limited to jiffy
resolution.  This, among others, causes unacceptable pauses when launching
X.org.

Signed-Off-By: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Johannes Berg authored and Paul Mackerras committed Dec 12, 2005
1 parent b39f948 commit ef96943
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/ppc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ void __init smp_prepare_cpus(unsigned int max_cpus)

/* Probe platform for CPUs: always linear. */
num_cpus = smp_ops->probe();

if (num_cpus < 2)
smp_tb_synchronized = 1;

for (i = 0; i < num_cpus; ++i)
cpu_set(i, cpu_possible_map);

Expand Down

0 comments on commit ef96943

Please sign in to comment.