From 90756acccff19fa6b09f79c4216b0b6fe488c6a1 Mon Sep 17 00:00:00 2001 From: "Paolo \\'Blaisorblade\\' Giarrusso" Date: Mon, 13 Sep 2004 17:50:09 -0700 Subject: [PATCH] [PATCH] uml: smp build fix From: Sonny Rao Make the SMP code compile, at least, to make testing possible, and remove its dependency on CONFIG_BROKEN. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/kernel/smp.c | 8 +++++++- include/asm-um/smp.h | 2 ++ include/asm-um/spinlock.h | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 include/asm-um/spinlock.h diff --git a/arch/um/kernel/smp.c b/arch/um/kernel/smp.c index ace88c2393c61..b5e66b291cc32 100644 --- a/arch/um/kernel/smp.c +++ b/arch/um/kernel/smp.c @@ -29,9 +29,11 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); #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 maxcpus) 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 --git a/include/asm-um/smp.h b/include/asm-um/smp.h index 20c6457f30381..ee768c27ca0e2 100644 --- a/include/asm-um/smp.h +++ b/include/asm-um/smp.h @@ -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 --git a/include/asm-um/spinlock.h b/include/asm-um/spinlock.h new file mode 100644 index 0000000000000..f18c828869921 --- /dev/null +++ b/include/asm-um/spinlock.h @@ -0,0 +1,6 @@ +#ifndef __UM_SPINLOCK_H +#define __UM_SPINLOCK_H + +#include "asm/arch/spinlock.h" + +#endif -- 2.53.0