| From 9a9d61b4f54baabed86936e36c1c90f72387057c Mon Sep 17 00:00:00 2001 |
| From: Wu Zhangjin <wuzhangjin@gmail.com> |
| Date: Mon, 22 Feb 2010 00:47:45 +0800 |
| Subject: [PATCH] RT: MIPS: Make the die_lock be raw |
| |
| commit f892b149b98479d18f78275a7cd36aaa8fb91c72 in tip. |
| |
| Kernel is going to die, the lock must be raw to ensure nobody can |
| preempt it at this urgent time. |
| |
| Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> |
| |
| diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c |
| index d612c6d..35ff8d6 100644 |
| --- a/arch/mips/kernel/traps.c |
| +++ b/arch/mips/kernel/traps.c |
| @@ -350,7 +350,7 @@ void show_registers(const struct pt_regs *regs) |
| printk("\n"); |
| } |
| |
| -static DEFINE_SPINLOCK(die_lock); |
| +static DEFINE_RAW_SPINLOCK(die_lock); |
| |
| void __noreturn die(const char * str, struct pt_regs * regs) |
| { |
| @@ -361,7 +361,7 @@ void __noreturn die(const char * str, struct pt_regs * regs) |
| #endif /* CONFIG_MIPS_MT_SMTC */ |
| |
| console_verbose(); |
| - spin_lock_irq(&die_lock); |
| + raw_spin_lock_irq(&die_lock); |
| bust_spinlocks(1); |
| #ifdef CONFIG_MIPS_MT_SMTC |
| mips_mt_regdump(dvpret); |
| @@ -373,7 +373,7 @@ void __noreturn die(const char * str, struct pt_regs * regs) |
| printk("%s[#%d]:\n", str, ++die_counter); |
| show_registers(regs); |
| add_taint(TAINT_DIE); |
| - spin_unlock_irq(&die_lock); |
| + raw_spin_unlock_irq(&die_lock); |
| |
| if (in_interrupt()) |
| panic("Fatal exception in interrupt"); |
| -- |
| 1.7.1.1 |
| |