diff options
author | <> | 2005-07-02 02:27:00 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-07-06 18:44:55 -0400 |
commit | af25e94d4dcfb9608846242fabdd4e6014e5c9f0 (patch) | |
tree | f311db4563cb7f101520c737965e3d2180fcda67 /arch/ia64/kernel/traps.c | |
parent | 67d340f440f389e9d56201fb7c7aaa92f262feb1 (diff) |
[IA64] Make ia64 die() preempt safe
Signed-off-by: Keith Owens <kaos@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/traps.c')
-rw-r--r-- | arch/ia64/kernel/traps.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c index e7e520d90f03..4440c8343fa4 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) | |||
90 | .lock_owner_depth = 0 | 90 | .lock_owner_depth = 0 |
91 | }; | 91 | }; |
92 | static int die_counter; | 92 | static int die_counter; |
93 | int cpu = get_cpu(); | ||
93 | 94 | ||
94 | if (die.lock_owner != smp_processor_id()) { | 95 | if (die.lock_owner != cpu) { |
95 | console_verbose(); | 96 | console_verbose(); |
96 | spin_lock_irq(&die.lock); | 97 | spin_lock_irq(&die.lock); |
97 | die.lock_owner = smp_processor_id(); | 98 | die.lock_owner = cpu; |
98 | die.lock_owner_depth = 0; | 99 | die.lock_owner_depth = 0; |
99 | bust_spinlocks(1); | 100 | bust_spinlocks(1); |
100 | } | 101 | } |
102 | put_cpu(); | ||
101 | 103 | ||
102 | if (++die.lock_owner_depth < 3) { | 104 | if (++die.lock_owner_depth < 3) { |
103 | printk("%s[%d]: %s %ld [%d]\n", | 105 | printk("%s[%d]: %s %ld [%d]\n", |