aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2006-01-09 23:51:32 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 11:01:24 -0500
commit51989b9ffeea58999054fe3f21bd0cd0bd207e5a (patch)
treea293e5fc792eeee2acc96cb9cd18d3ed6c4e8e5a /lib
parent0ad42352c01788e41a33336577fdd270d8de55bb (diff)
[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>
Diffstat (limited to 'lib')
-rw-r--r--lib/spinlock_debug.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/spinlock_debug.c b/lib/spinlock_debug.c
index dcd4be9bd4e5..c8bb8cc899d7 100644
--- a/lib/spinlock_debug.c
+++ b/lib/spinlock_debug.c
@@ -19,10 +19,11 @@ static void spin_bug(spinlock_t *lock, const char *msg)
19 if (xchg(&print_once, 0)) { 19 if (xchg(&print_once, 0)) {
20 if (lock->owner && lock->owner != SPINLOCK_OWNER_INIT) 20 if (lock->owner && lock->owner != SPINLOCK_OWNER_INIT)
21 owner = lock->owner; 21 owner = lock->owner;
22 printk("BUG: spinlock %s on CPU#%d, %s/%d\n", 22 printk(KERN_EMERG "BUG: spinlock %s on CPU#%d, %s/%d\n",
23 msg, raw_smp_processor_id(), 23 msg, raw_smp_processor_id(),
24 current->comm, current->pid); 24 current->comm, current->pid);
25 printk(" lock: %p, .magic: %08x, .owner: %s/%d, .owner_cpu: %d\n", 25 printk(KERN_EMERG " lock: %p, .magic: %08x, .owner: %s/%d, "
26 ".owner_cpu: %d\n",
26 lock, lock->magic, 27 lock, lock->magic,
27 owner ? owner->comm : "<none>", 28 owner ? owner->comm : "<none>",
28 owner ? owner->pid : -1, 29 owner ? owner->pid : -1,
@@ -78,7 +79,8 @@ static void __spin_lock_debug(spinlock_t *lock)
78 /* lockup suspected: */ 79 /* lockup suspected: */
79 if (print_once) { 80 if (print_once) {
80 print_once = 0; 81 print_once = 0;
81 printk("BUG: spinlock lockup on CPU#%d, %s/%d, %p\n", 82 printk(KERN_EMERG "BUG: spinlock lockup on CPU#%d, "
83 "%s/%d, %p\n",
82 raw_smp_processor_id(), current->comm, 84 raw_smp_processor_id(), current->comm,
83 current->pid, lock); 85 current->pid, lock);
84 dump_stack(); 86 dump_stack();
@@ -120,8 +122,8 @@ static void rwlock_bug(rwlock_t *lock, const char *msg)
120 static long print_once = 1; 122 static long print_once = 1;
121 123
122 if (xchg(&print_once, 0)) { 124 if (xchg(&print_once, 0)) {
123 printk("BUG: rwlock %s on CPU#%d, %s/%d, %p\n", msg, 125 printk(KERN_EMERG "BUG: rwlock %s on CPU#%d, %s/%d, %p\n",
124 raw_smp_processor_id(), current->comm, 126 msg, raw_smp_processor_id(), current->comm,
125 current->pid, lock); 127 current->pid, lock);
126 dump_stack(); 128 dump_stack();
127#ifdef CONFIG_SMP 129#ifdef CONFIG_SMP
@@ -149,7 +151,8 @@ static void __read_lock_debug(rwlock_t *lock)
149 /* lockup suspected: */ 151 /* lockup suspected: */
150 if (print_once) { 152 if (print_once) {
151 print_once = 0; 153 print_once = 0;
152 printk("BUG: read-lock lockup on CPU#%d, %s/%d, %p\n", 154 printk(KERN_EMERG "BUG: read-lock lockup on CPU#%d, "
155 "%s/%d, %p\n",
153 raw_smp_processor_id(), current->comm, 156 raw_smp_processor_id(), current->comm,
154 current->pid, lock); 157 current->pid, lock);
155 dump_stack(); 158 dump_stack();
@@ -221,7 +224,8 @@ static void __write_lock_debug(rwlock_t *lock)
221 /* lockup suspected: */ 224 /* lockup suspected: */
222 if (print_once) { 225 if (print_once) {
223 print_once = 0; 226 print_once = 0;
224 printk("BUG: write-lock lockup on CPU#%d, %s/%d, %p\n", 227 printk(KERN_EMERG "BUG: write-lock lockup on CPU#%d, "
228 "%s/%d, %p\n",
225 raw_smp_processor_id(), current->comm, 229 raw_smp_processor_id(), current->comm,
226 current->pid, lock); 230 current->pid, lock);
227 dump_stack(); 231 dump_stack();