summaryrefslogtreecommitdiffstats
path: root/arch/ppc/kernel/smp.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2005-12-10 18:41:50 -0800
committerPaul Mackerras <paulus@samba.org>2005-12-12 14:26:39 +1100
commitef969434005e772218c0b8086539804605070fa8 (patch)
treef47f7edd35a4cb30d2d5155e3c26343481208649 /arch/ppc/kernel/smp.c
parentb39f9485e6cfe1bf21b18b60fd8c631a72a1304d (diff)
[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 <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>
Diffstat (limited to 'arch/ppc/kernel/smp.c')
-rw-r--r--arch/ppc/kernel/smp.c4
1 files changed, 4 insertions, 0 deletions
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);