summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author <>2005-07-01 23:27:00 -0700
committerTony Luck <tony.luck@intel.com>2005-07-06 15:44:55 -0700
commitaf25e94d4dcfb9608846242fabdd4e6014e5c9f0 (patch)
treef311db4563cb7f101520c737965e3d2180fcda67
parent67d340f440f389e9d56201fb7c7aaa92f262feb1 (diff)
downloadop-kernel-dev-af25e94d4dcfb9608846242fabdd4e6014e5c9f0.zip
op-kernel-dev-af25e94d4dcfb9608846242fabdd4e6014e5c9f0.tar.gz
[IA64] Make ia64 die() preempt safe
Signed-off-by: Keith Owens <kaos@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r--arch/ia64/kernel/traps.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c
index e7e520d..4440c83 100644
--- a/arch/ia64/kernel/traps.c
+++ b/arch/ia64/kernel/traps.c
@@ -90,14 +90,16 @@ die (const char *str, struct pt_regs *regs, long err)
.lock_owner_depth = 0
};
static int die_counter;
+ int cpu = get_cpu();
- if (die.lock_owner != smp_processor_id()) {
+ if (die.lock_owner != cpu) {
console_verbose();
spin_lock_irq(&die.lock);
- die.lock_owner = smp_processor_id();
+ die.lock_owner = cpu;
die.lock_owner_depth = 0;
bust_spinlocks(1);
}
+ put_cpu();
if (++die.lock_owner_depth < 3) {
printk("%s[%d]: %s %ld [%d]\n",
OpenPOWER on IntegriCloud