Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc64: Prevent sparc64 from invoking irq handlers on offline CPUs
  sparc64: Fix IPI call locking.
  • Loading branch information
Linus Torvalds committed Sep 8, 2008
2 parents 06dd881 + 4d08461 commit b364e2f
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions arch/sparc64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ void smp_bogo(struct seq_file *m)
i, cpu_data(i).clock_tick);
}

static __cacheline_aligned_in_smp DEFINE_SPINLOCK(call_lock);

extern void setup_sparc64_timer(void);

static volatile unsigned long callin_flag = 0;
Expand Down Expand Up @@ -120,9 +118,9 @@ void __cpuinit smp_callin(void)
while (!cpu_isset(cpuid, smp_commenced_mask))
rmb();

spin_lock(&call_lock);
ipi_call_lock();
cpu_set(cpuid, cpu_online_map);
spin_unlock(&call_lock);
ipi_call_unlock();

/* idle thread is expected to have preempt disabled */
preempt_disable();
Expand Down Expand Up @@ -1305,10 +1303,6 @@ int __cpu_disable(void)
c->core_id = 0;
c->proc_id = -1;

spin_lock(&call_lock);
cpu_clear(cpu, cpu_online_map);
spin_unlock(&call_lock);

smp_wmb();

/* Make sure no interrupts point to this cpu. */
Expand All @@ -1318,6 +1312,10 @@ int __cpu_disable(void)
mdelay(1);
local_irq_disable();

ipi_call_lock();
cpu_clear(cpu, cpu_online_map);
ipi_call_unlock();

return 0;
}

Expand Down

0 comments on commit b364e2f

Please sign in to comment.