From: Johannes Berg Date: Sun, 11 Dec 2005 02:41:50 +0000 (-0800) Subject: [PATCH] ppc32: set smp_tb_synchronized on UP with SMP kernel X-Git-Tag: v2.6.15-rc6~146^2 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=ef969434005e772218c0b8086539804605070fa8;p=~emulex%2Finfiniband.git [PATCH] ppc32: set smp_tb_synchronized on UP with SMP kernel 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 Acked-by: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Paul Mackerras --- diff --git a/arch/ppc/kernel/smp.c b/arch/ppc/kernel/smp.c index 43b8fc2ca59..becbfa39755 100644 --- a/arch/ppc/kernel/smp.c +++ b/arch/ppc/kernel/smp.c @@ -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);