aboutsummaryrefslogtreecommitdiffstats
path: root/lib/spinlock_debug.c
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@austin.ibm.com>2006-01-24 15:34:47 -0500
committerDave Kleikamp <shaggy@austin.ibm.com>2006-01-24 15:34:47 -0500
commit0a0fc0ddbe732779366ab6b1b879f62195e65967 (patch)
tree7b42490a676cf39ae0691b6859ecf7fd410f229b /lib/spinlock_debug.c
parent4d5dbd0945d9e0833dd7964a3d6ee33157f7cc7a (diff)
parent3ee68c4af3fd7228c1be63254b9f884614f9ebb2 (diff)
Merge with /home/shaggy/git/linus-clean/
Diffstat (limited to 'lib/spinlock_debug.c')
-rw-r--r--lib/spinlock_debug.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/lib/spinlock_debug.c b/lib/spinlock_debug.c
index 906ad101eab3..c8bb8cc899d7 100644
--- a/lib/spinlock_debug.c
+++ b/lib/spinlock_debug.c
@@ -19,9 +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, smp_processor_id(), current->comm, current->pid); 23 msg, raw_smp_processor_id(),
24 printk(" lock: %p, .magic: %08x, .owner: %s/%d, .owner_cpu: %d\n", 24 current->comm, current->pid);
25 printk(KERN_EMERG " lock: %p, .magic: %08x, .owner: %s/%d, "
26 ".owner_cpu: %d\n",
25 lock, lock->magic, 27 lock, lock->magic,
26 owner ? owner->comm : "<none>", 28 owner ? owner->comm : "<none>",
27 owner ? owner->pid : -1, 29 owner ? owner->pid : -1,
@@ -77,9 +79,10 @@ static void __spin_lock_debug(spinlock_t *lock)
77 /* lockup suspected: */ 79 /* lockup suspected: */
78 if (print_once) { 80 if (print_once) {
79 print_once = 0; 81 print_once = 0;
80 printk("BUG: spinlock lockup on CPU#%d, %s/%d, %p\n", 82 printk(KERN_EMERG "BUG: spinlock lockup on CPU#%d, "
81 smp_processor_id(), current->comm, current->pid, 83 "%s/%d, %p\n",
82 lock); 84 raw_smp_processor_id(), current->comm,
85 current->pid, lock);
83 dump_stack(); 86 dump_stack();
84 } 87 }
85 } 88 }
@@ -119,8 +122,9 @@ static void rwlock_bug(rwlock_t *lock, const char *msg)
119 static long print_once = 1; 122 static long print_once = 1;
120 123
121 if (xchg(&print_once, 0)) { 124 if (xchg(&print_once, 0)) {
122 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",
123 smp_processor_id(), current->comm, current->pid, lock); 126 msg, raw_smp_processor_id(), current->comm,
127 current->pid, lock);
124 dump_stack(); 128 dump_stack();
125#ifdef CONFIG_SMP 129#ifdef CONFIG_SMP
126 /* 130 /*
@@ -147,9 +151,10 @@ static void __read_lock_debug(rwlock_t *lock)
147 /* lockup suspected: */ 151 /* lockup suspected: */
148 if (print_once) { 152 if (print_once) {
149 print_once = 0; 153 print_once = 0;
150 printk("BUG: read-lock lockup on CPU#%d, %s/%d, %p\n", 154 printk(KERN_EMERG "BUG: read-lock lockup on CPU#%d, "
151 smp_processor_id(), current->comm, current->pid, 155 "%s/%d, %p\n",
152 lock); 156 raw_smp_processor_id(), current->comm,
157 current->pid, lock);
153 dump_stack(); 158 dump_stack();
154 } 159 }
155 } 160 }
@@ -219,9 +224,10 @@ static void __write_lock_debug(rwlock_t *lock)
219 /* lockup suspected: */ 224 /* lockup suspected: */
220 if (print_once) { 225 if (print_once) {
221 print_once = 0; 226 print_once = 0;
222 printk("BUG: write-lock lockup on CPU#%d, %s/%d, %p\n", 227 printk(KERN_EMERG "BUG: write-lock lockup on CPU#%d, "
223 smp_processor_id(), current->comm, current->pid, 228 "%s/%d, %p\n",
224 lock); 229 raw_smp_processor_id(), current->comm,
230 current->pid, lock);
225 dump_stack(); 231 dump_stack();
226 } 232 }
227 } 233 }