Skip to content

Commit

Permalink
[IA64] Make ia64 die() preempt safe
Browse files Browse the repository at this point in the history
Signed-off-by: Keith Owens <kaos@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Unknown authored and Tony Luck committed Jul 6, 2005
1 parent 67d340f commit af25e94
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/ia64/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit af25e94

Please sign in to comment.