Commit 90756acc authored by Paolo \'Blaisorblade\' Giarrusso's avatar Paolo \'Blaisorblade\' Giarrusso Committed by Linus Torvalds

[PATCH] uml: smp build fix

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: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3bcb7f76
......@@ -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);
......
......@@ -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)
......
#ifndef __UM_SPINLOCK_H
#define __UM_SPINLOCK_H
#include "asm/arch/spinlock.h"
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment