Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: linux-mips@linux-mips.org
Cc: Ralf Baechle <ralf@linux-mips.org>, Wu Zhangjin <wuzhangjin@gmail.com>
Subject: [patch 4/7] MIPS: Make the die_lock be raw
Date: Sat, 23 Jul 2011 12:41:24 -0000	[thread overview]
Message-ID: <20110723124016.178327962@linutronix.de> (raw)
In-Reply-To: 20110723123948.573545817@linutronix.de

[-- Attachment #1: mips-make-die-lock-raw.patch --]
[-- Type: text/plain, Size: 1340 bytes --]

From: Wu Zhangjin <wuzhangjin@gmail.com>

On preempt-rt this lock needs to be raw, so it does not get converted
to a sleeping spinlock. Trying to sleep in a panic is not really
desireable.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 arch/mips/kernel/traps.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: linux-2.6/arch/mips/kernel/traps.c
===================================================================
--- linux-2.6.orig/arch/mips/kernel/traps.c
+++ linux-2.6/arch/mips/kernel/traps.c
@@ -364,7 +364,7 @@ static int regs_to_trapnr(struct pt_regs
 	return (regs->cp0_cause >> 2) & 0x1f;
 }
 
-static DEFINE_SPINLOCK(die_lock);
+static DEFINE_RAW_SPINLOCK(die_lock);
 
 void __noreturn die(const char *str, struct pt_regs *regs)
 {
@@ -378,7 +378,7 @@ void __noreturn die(const char *str, str
 		sig = 0;
 
 	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);
@@ -387,7 +387,7 @@ void __noreturn die(const char *str, str
 	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");

  parent reply	other threads:[~2011-07-23 12:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-23 12:41 [patch 0/7] MIPS: Assorted fixlets and annotation patches Thomas Gleixner
2011-07-23 12:41 ` [patch 1/7] mips: sibyte: Add missing irq_mask function Thomas Gleixner
2011-07-27  8:41   ` Ralf Baechle
2011-07-27 14:49   ` Ralf Baechle
2011-07-23 12:41 ` [patch 3/7] mips: Enable interrupts in do_signal() Thomas Gleixner
2011-07-27 13:06   ` Ralf Baechle
2011-07-23 12:41 ` [patch 2/7] mips: ftrace: Fix the CONFIG_DYNAMIC_FTRACE=n compile Thomas Gleixner
2011-07-27  9:23   ` Ralf Baechle
2011-07-23 12:41 ` [patch 5/7] MIPS: Mark cascade and low level interrupts IRQF_NO_THREAD Thomas Gleixner
2011-07-27  9:53   ` Ralf Baechle
2011-07-23 12:41 ` Thomas Gleixner [this message]
2011-07-27  9:51   ` [patch 4/7] MIPS: Make the die_lock be raw Ralf Baechle
2011-07-23 12:41 ` [patch 6/7] MIPS: Loongson: Mark cascade interrupts IRQF_NO_THREAD Thomas Gleixner
2011-07-27  9:55   ` Ralf Baechle
2011-07-23 12:41 ` [patch 7/7] mips: Allow forced irq threading Thomas Gleixner
2011-07-27  9:56   ` Ralf Baechle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110723124016.178327962@linutronix.de \
    --to=tglx@linutronix.de \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=wuzhangjin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox