[PATCH 26/26] softlockup: Convert to raw_spinlocks

John Kacur
2010-01-11T21:28:28Z

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

See also b20de918527a9c1558b3e8a02f935cf4cb53e3ba

Signed-off-by: John Kacur <jkacur@redhat.com>
---
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