Browse Source

[PATCH] printk levels for spinlock debug

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Dave Jones 19 years ago
parent
commit
51989b9ffe
1 changed files with 11 additions and 7 deletions
  1. 11 7
      lib/spinlock_debug.c

+ 11 - 7
lib/spinlock_debug.c

@@ -19,10 +19,11 @@ static void spin_bug(spinlock_t *lock, const char *msg)
 	if (xchg(&print_once, 0)) {
 	if (xchg(&print_once, 0)) {
 		if (lock->owner && lock->owner != SPINLOCK_OWNER_INIT)
 		if (lock->owner && lock->owner != SPINLOCK_OWNER_INIT)
 			owner = lock->owner;
 			owner = lock->owner;
-		printk("BUG: spinlock %s on CPU#%d, %s/%d\n",
+		printk(KERN_EMERG "BUG: spinlock %s on CPU#%d, %s/%d\n",
 			msg, raw_smp_processor_id(),
 			msg, raw_smp_processor_id(),
 			current->comm, current->pid);
 			current->comm, current->pid);
-		printk(" lock: %p, .magic: %08x, .owner: %s/%d, .owner_cpu: %d\n",
+		printk(KERN_EMERG " lock: %p, .magic: %08x, .owner: %s/%d, "
+				".owner_cpu: %d\n",
 			lock, lock->magic,
 			lock, lock->magic,
 			owner ? owner->comm : "<none>",
 			owner ? owner->comm : "<none>",
 			owner ? owner->pid : -1,
 			owner ? owner->pid : -1,
@@ -78,7 +79,8 @@ static void __spin_lock_debug(spinlock_t *lock)
 		/* lockup suspected: */
 		/* lockup suspected: */
 		if (print_once) {
 		if (print_once) {
 			print_once = 0;
 			print_once = 0;
-			printk("BUG: spinlock lockup on CPU#%d, %s/%d, %p\n",
+			printk(KERN_EMERG "BUG: spinlock lockup on CPU#%d, "
+					"%s/%d, %p\n",
 				raw_smp_processor_id(), current->comm,
 				raw_smp_processor_id(), current->comm,
 				current->pid, lock);
 				current->pid, lock);
 			dump_stack();
 			dump_stack();
@@ -120,8 +122,8 @@ static void rwlock_bug(rwlock_t *lock, const char *msg)
 	static long print_once = 1;
 	static long print_once = 1;
 
 
 	if (xchg(&print_once, 0)) {
 	if (xchg(&print_once, 0)) {
-		printk("BUG: rwlock %s on CPU#%d, %s/%d, %p\n", msg,
-			raw_smp_processor_id(), current->comm,
+		printk(KERN_EMERG "BUG: rwlock %s on CPU#%d, %s/%d, %p\n",
+			msg, raw_smp_processor_id(), current->comm,
 			current->pid, lock);
 			current->pid, lock);
 		dump_stack();
 		dump_stack();
 #ifdef CONFIG_SMP
 #ifdef CONFIG_SMP
@@ -149,7 +151,8 @@ static void __read_lock_debug(rwlock_t *lock)
 		/* lockup suspected: */
 		/* lockup suspected: */
 		if (print_once) {
 		if (print_once) {
 			print_once = 0;
 			print_once = 0;
-			printk("BUG: read-lock lockup on CPU#%d, %s/%d, %p\n",
+			printk(KERN_EMERG "BUG: read-lock lockup on CPU#%d, "
+					"%s/%d, %p\n",
 				raw_smp_processor_id(), current->comm,
 				raw_smp_processor_id(), current->comm,
 				current->pid, lock);
 				current->pid, lock);
 			dump_stack();
 			dump_stack();
@@ -221,7 +224,8 @@ static void __write_lock_debug(rwlock_t *lock)
 		/* lockup suspected: */
 		/* lockup suspected: */
 		if (print_once) {
 		if (print_once) {
 			print_once = 0;
 			print_once = 0;
-			printk("BUG: write-lock lockup on CPU#%d, %s/%d, %p\n",
+			printk(KERN_EMERG "BUG: write-lock lockup on CPU#%d, "
+					"%s/%d, %p\n",
 				raw_smp_processor_id(), current->comm,
 				raw_smp_processor_id(), current->comm,
 				current->pid, lock);
 				current->pid, lock);
 			dump_stack();
 			dump_stack();