1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
From 02cb94572cdef7c0434bcbb1e93c0db1c0922799 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>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
arch/mips/kernel/traps.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
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.0.4
|