git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This commit was manufactured by cvs2svn to create tag
[linux-2.6.git]
/
arch
/
ia64
/
kernel
/
smp.c
diff --git
a/arch/ia64/kernel/smp.c
b/arch/ia64/kernel/smp.c
index
7f56a49
..
99f0088
100644
(file)
--- a/
arch/ia64/kernel/smp.c
+++ b/
arch/ia64/kernel/smp.c
@@
-28,7
+28,6
@@
#include <linux/mm.h>
#include <linux/cache.h>
#include <linux/delay.h>
#include <linux/mm.h>
#include <linux/cache.h>
#include <linux/delay.h>
-#include <linux/cache.h>
#include <linux/efi.h>
#include <asm/atomic.h>
#include <linux/efi.h>
#include <asm/atomic.h>
@@
-71,10
+70,23
@@
static volatile struct call_data_struct *call_data;
/* This needs to be cacheline aligned because it is written to by *other* CPUs. */
static DEFINE_PER_CPU(u64, ipi_operation) ____cacheline_aligned;
/* This needs to be cacheline aligned because it is written to by *other* CPUs. */
static DEFINE_PER_CPU(u64, ipi_operation) ____cacheline_aligned;
+extern void cpu_halt (void);
+
+void
+lock_ipi_calllock(void)
+{
+ spin_lock_irq(&call_lock);
+}
+
+void
+unlock_ipi_calllock(void)
+{
+ spin_unlock_irq(&call_lock);
+}
+
static void
stop_this_cpu (void)
{
static void
stop_this_cpu (void)
{
- extern void cpu_halt (void);
/*
* Remove this CPU:
*/
/*
* Remove this CPU:
*/
@@
-84,6
+96,17
@@
stop_this_cpu (void)
cpu_halt();
}
cpu_halt();
}
+void
+cpu_die(void)
+{
+ max_xtp();
+ local_irq_disable();
+ cpu_halt();
+ /* Should never be here */
+ BUG();
+ for (;;);
+}
+
irqreturn_t
handle_IPI (int irq, void *dev_id, struct pt_regs *regs)
{
irqreturn_t
handle_IPI (int irq, void *dev_id, struct pt_regs *regs)
{
@@
-308,6
+331,9
@@
smp_call_function (void (*func) (void *info), void *info, int nonatomic, int wai
if (!cpus)
return 0;
if (!cpus)
return 0;
+ /* Can deadlock when called with interrupts disabled */
+ WARN_ON(irqs_disabled());
+
data.func = func;
data.info = info;
atomic_set(&data.started, 0);
data.func = func;
data.info = info;
atomic_set(&data.started, 0);