#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
-#include <linux/module.h>
-
-int nopanic;
-static int __init nopanic_setup(char *str)
-{
- nopanic = 1;
- return 1;
-}
-EXPORT_SYMBOL_GPL(nopanic);
-__setup("dontpanic", nopanic_setup);
-
static void spin_bug(spinlock_t *lock, const char *msg)
{
if (xchg(&print_once, 0)) {
if (lock->owner && lock->owner != SPINLOCK_OWNER_INIT)
owner = lock->owner;
- printk(KERN_EMERG "BUG: spinlock %s on CPU#%d, %s/%d (%s)\n",
+ printk(KERN_EMERG "BUG: spinlock %s on CPU#%d, %s/%d\n",
msg, raw_smp_processor_id(),
- current->comm, current->pid, print_tainted());
+ current->comm, current->pid);
printk(KERN_EMERG " lock: %p, .magic: %08x, .owner: %s/%d, "
".owner_cpu: %d\n",
lock, lock->magic,
/*
* We cannot continue on SMP:
*/
- if (nopanic)
- printk("bad locking\n");
- else
- panic("bad locking");
+// panic("bad locking");
#endif
}
}
for (i = 0; i < loops_per_jiffy * HZ; i++) {
if (__raw_spin_trylock(&lock->raw_lock))
return;
+ __delay(1);
}
/* lockup suspected: */
if (print_once) {
print_once = 0;
printk(KERN_EMERG "BUG: spinlock lockup on CPU#%d, "
- "%s/%d, %p (%s)\n",
+ "%s/%d, %p\n",
raw_smp_processor_id(), current->comm,
- current->pid, lock, print_tainted());
+ current->pid, lock);
dump_stack();
}
}
static long print_once = 1;
if (xchg(&print_once, 0)) {
- printk(KERN_EMERG "BUG: rwlock %s on CPU#%d, %s/%d, %p (%s)\n",
+ printk(KERN_EMERG "BUG: rwlock %s on CPU#%d, %s/%d, %p\n",
msg, raw_smp_processor_id(), current->comm,
- current->pid, lock, print_tainted());
+ current->pid, lock);
dump_stack();
#ifdef CONFIG_SMP
/*
for (i = 0; i < loops_per_jiffy * HZ; i++) {
if (__raw_read_trylock(&lock->raw_lock))
return;
+ __delay(1);
}
/* lockup suspected: */
if (print_once) {
print_once = 0;
printk(KERN_EMERG "BUG: read-lock lockup on CPU#%d, "
- "%s/%d, %p (%s)\n",
+ "%s/%d, %p\n",
raw_smp_processor_id(), current->comm,
- current->pid, lock, print_tainted());
+ current->pid, lock);
dump_stack();
}
}
for (i = 0; i < loops_per_jiffy * HZ; i++) {
if (__raw_write_trylock(&lock->raw_lock))
return;
+ __delay(1);
}
/* lockup suspected: */
if (print_once) {
print_once = 0;
printk(KERN_EMERG "BUG: write-lock lockup on CPU#%d, "
- "%s/%d, %p (%s)\n",
+ "%s/%d, %p\n",
raw_smp_processor_id(), current->comm,
- current->pid, lock, print_tainted());
+ current->pid, lock);
dump_stack();
}
}