提交 6ad6c424 编写于 作者: T Thomas Gleixner 提交者: Kyle McMartin

parisc: Replace old style lock init in smp.c

SPIN_LOCK_UNLOCKED is deprecated. Init the per cpu locks at runtime
instead.

(Also kills the unused smp_lock --kyle)
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
上级 8f78df87
......@@ -60,8 +60,6 @@ static int smp_debug_lvl = 0;
#define smp_debug(lvl, ...) do { } while(0)
#endif /* DEBUG_SMP */
DEFINE_SPINLOCK(smp_lock);
volatile struct task_struct *smp_init_current_idle_task;
/* track which CPU is booting */
......@@ -69,7 +67,7 @@ static volatile int cpu_now_booting __cpuinitdata;
static int parisc_max_cpus __cpuinitdata = 1;
DEFINE_PER_CPU(spinlock_t, ipi_lock) = SPIN_LOCK_UNLOCKED;
static DEFINE_PER_CPU(spinlock_t, ipi_lock);
enum ipi_message_type {
IPI_NOP=0,
......@@ -438,6 +436,11 @@ void __init smp_prepare_boot_cpu(void)
*/
void __init smp_prepare_cpus(unsigned int max_cpus)
{
int cpu;
for_each_possible_cpu(cpu)
spin_lock_init(&per_cpu(ipi_lock, cpu));
init_cpu_present(cpumask_of(0));
parisc_max_cpus = max_cpus;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册