From: <> Date: Sat, 2 Jul 2005 06:27:00 +0000 (-0700) Subject: [IA64] Make ia64 die() preempt safe X-Git-Tag: v2.6.13-rc3~310^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af25e94d4dcfb9608846242fabdd4e6014e5c9f0;p=linux-2.6 [IA64] Make ia64 die() preempt safe Signed-off-by: Keith Owens Signed-off-by: Tony Luck --- diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c index e7e520d90f..4440c8343f 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",