[PATCH 26/26] softlockup: Convert to raw_spinlocks

From: John Kacur
Date: Mon Jan 11 2010 - 16:28:31 EST


Convert locks which cannot be sleeping locks in preempt-rt to raw_spinlocks

See also b20de918527a9c1558b3e8a02f935cf4cb53e3ba

Signed-off-by: John Kacur <jkacur@xxxxxxxxxx>
---
kernel/softlockup.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/softlockup.c b/kernel/softlockup.c
index d225790..8e63d20 100644
--- a/kernel/softlockup.c
+++ b/kernel/softlockup.c
@@ -20,7 +20,7 @@

#include <asm/irq_regs.h>

-static DEFINE_SPINLOCK(print_lock);
+static DEFINE_RAW_SPINLOCK(print_lock);

static DEFINE_PER_CPU(unsigned long, softlockup_touch_ts); /* touch timestamp */
static DEFINE_PER_CPU(unsigned long, softlockup_print_ts); /* print timestamp */
@@ -149,7 +149,7 @@ void softlockup_tick(void)

per_cpu(softlockup_print_ts, this_cpu) = touch_ts;

- spin_lock(&print_lock);
+ raw_spin_lock(&print_lock);
printk(KERN_ERR "BUG: soft lockup - CPU#%d stuck for %lus! [%s:%d]\n",
this_cpu, now - touch_ts,
current->comm, task_pid_nr(current));
@@ -159,7 +159,7 @@ void softlockup_tick(void)
show_regs(regs);
else
dump_stack();
- spin_unlock(&print_lock);
+ raw_spin_unlock(&print_lock);

if (softlockup_panic)
panic("softlockup: hung tasks");
--
1.6.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/