From: blaisorblade_spam@yahoo.it

From: Sonny Rao <sonny@burdell.org>

Make the SMP code compile, at least, to make testing possible, and remove
its dependency on CONFIG_BROKEN.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/um/kernel/smp.c      |    8 +++++++-
 25-akpm/include/asm-um/smp.h      |    2 ++
 25-akpm/include/asm-um/spinlock.h |    6 ++++++
 3 files changed, 15 insertions(+), 1 deletion(-)

diff -puN arch/um/kernel/smp.c~uml-smp-build-fix arch/um/kernel/smp.c
--- 25/arch/um/kernel/smp.c~uml-smp-build-fix	2004-09-11 16:45:33.193565352 -0700
+++ 25-akpm/arch/um/kernel/smp.c	2004-09-11 16:45:33.198564592 -0700
@@ -29,9 +29,11 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_ga
 #include "os.h"
 
 /* CPU online map, set by smp_boot_cpus */
-unsigned long cpu_online_map = CPU_MASK_NONE;
+cpumask_t cpu_online_map = CPU_MASK_NONE;
+cpumask_t cpu_possible_map = CPU_MASK_NONE;
 
 EXPORT_SYMBOL(cpu_online_map);
+EXPORT_SYMBOL(cpu_possible_map);
 
 /* Per CPU bogomips and other parameters
  * The only piece used here is the ipi pipe, which is set before SMP is
@@ -125,6 +127,10 @@ void smp_prepare_cpus(unsigned int maxcp
 	struct task_struct *idle;
 	unsigned long waittime;
 	int err, cpu, me = smp_processor_id();
+	int i;
+
+	for (i = 0; i < ncpus; ++i)
+		cpu_set(i, cpu_possible_map);
 
 	cpu_clear(me, cpu_online_map);
 	cpu_set(me, cpu_online_map);
diff -puN include/asm-um/smp.h~uml-smp-build-fix include/asm-um/smp.h
--- 25/include/asm-um/smp.h~uml-smp-build-fix	2004-09-11 16:45:33.195565048 -0700
+++ 25-akpm/include/asm-um/smp.h	2004-09-11 16:45:33.198564592 -0700
@@ -9,6 +9,8 @@
 #include "linux/cpumask.h"
 
 extern cpumask_t cpu_online_map;
+extern cpumask_t cpu_possible_map;
+
 
 #define smp_processor_id() (current_thread->cpu)
 #define cpu_logical_map(n) (n)
diff -puN /dev/null include/asm-um/spinlock.h
--- /dev/null	2003-09-15 06:40:47.000000000 -0700
+++ 25-akpm/include/asm-um/spinlock.h	2004-09-11 16:45:33.199564440 -0700
@@ -0,0 +1,6 @@
+#ifndef __UM_SPINLOCK_H
+#define __UM_SPINLOCK_H
+
+#include "asm/arch/spinlock.h"
+
+#endif
_