aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel/trace.c
diff options
context:
space:
mode:
authorRobin Getz <robin.getz@analog.com>2010-03-11 14:26:38 -0500
committerMike Frysinger <vapier@gentoo.org>2010-05-21 09:40:18 -0400
commitd28cff4b615c2da274922311cef024d52c839870 (patch)
treedb6ef07c3159244b1ab1b870d7956746888f77c2 /arch/blackfin/kernel/trace.c
parent2a12c4632db1c0c548a7023e63869b27c7789a92 (diff)
Blackfin: remove CONFIG_DEBUG_VERBOSE from trace.c
Now that the split traps code has moved all the verbose output to the trace.c file, we can unify all the CONFIG_DEBUG_VERBOSE handling. This gets rid of much of the crappy ifdef forest and enables usage of normal pr_xxx functions so checkpatch stops complaining. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/kernel/trace.c')
-rw-r--r--arch/blackfin/kernel/trace.c221
1 files changed, 99 insertions, 122 deletions
diff --git a/arch/blackfin/kernel/trace.c b/arch/blackfin/kernel/trace.c
index 3a268c3ed47e..6e37a8765bc0 100644
--- a/arch/blackfin/kernel/trace.c
+++ b/arch/blackfin/kernel/trace.c
@@ -20,18 +20,8 @@
20#include <asm/fixed_code.h> 20#include <asm/fixed_code.h>
21#include <asm/traps.h> 21#include <asm/traps.h>
22 22
23#ifdef CONFIG_DEBUG_VERBOSE
24#define verbose_printk(fmt, arg...) \
25 printk(fmt, ##arg)
26#else
27#define verbose_printk(fmt, arg...) \
28 ({ if (0) printk(fmt, ##arg); 0; })
29#endif
30
31
32void decode_address(char *buf, unsigned long address) 23void decode_address(char *buf, unsigned long address)
33{ 24{
34#ifdef CONFIG_DEBUG_VERBOSE
35 struct task_struct *p; 25 struct task_struct *p;
36 struct mm_struct *mm; 26 struct mm_struct *mm;
37 unsigned long flags, offset; 27 unsigned long flags, offset;
@@ -174,9 +164,6 @@ void decode_address(char *buf, unsigned long address)
174 164
175done: 165done:
176 write_unlock_irqrestore(&tasklist_lock, flags); 166 write_unlock_irqrestore(&tasklist_lock, flags);
177#else
178 sprintf(buf, " ");
179#endif
180} 167}
181 168
182#define EXPAND_LEN ((1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN) * 256 - 1) 169#define EXPAND_LEN ((1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN) * 256 - 1)
@@ -219,52 +206,52 @@ bool get_instruction(unsigned short *val, unsigned short *address)
219 * These are the normal instructions which cause change of flow, which 206 * These are the normal instructions which cause change of flow, which
220 * would be at the source of the trace buffer 207 * would be at the source of the trace buffer
221 */ 208 */
222#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_BFIN_HWTRACE_ON) 209#if defined(CONFIG_DEBUG_BFIN_HWTRACE_ON)
223static void decode_instruction(unsigned short *address) 210static void decode_instruction(unsigned short *address)
224{ 211{
225 unsigned short opcode; 212 unsigned short opcode;
226 213
227 if (get_instruction(&opcode, address)) { 214 if (get_instruction(&opcode, address)) {
228 if (opcode == 0x0010) 215 if (opcode == 0x0010)
229 verbose_printk("RTS"); 216 pr_cont("RTS");
230 else if (opcode == 0x0011) 217 else if (opcode == 0x0011)
231 verbose_printk("RTI"); 218 pr_cont("RTI");
232 else if (opcode == 0x0012) 219 else if (opcode == 0x0012)
233 verbose_printk("RTX"); 220 pr_cont("RTX");
234 else if (opcode == 0x0013) 221 else if (opcode == 0x0013)
235 verbose_printk("RTN"); 222 pr_cont("RTN");
236 else if (opcode == 0x0014) 223 else if (opcode == 0x0014)
237 verbose_printk("RTE"); 224 pr_cont("RTE");
238 else if (opcode == 0x0025) 225 else if (opcode == 0x0025)
239 verbose_printk("EMUEXCPT"); 226 pr_cont("EMUEXCPT");
240 else if (opcode >= 0x0040 && opcode <= 0x0047) 227 else if (opcode >= 0x0040 && opcode <= 0x0047)
241 verbose_printk("STI R%i", opcode & 7); 228 pr_cont("STI R%i", opcode & 7);
242 else if (opcode >= 0x0050 && opcode <= 0x0057) 229 else if (opcode >= 0x0050 && opcode <= 0x0057)
243 verbose_printk("JUMP (P%i)", opcode & 7); 230 pr_cont("JUMP (P%i)", opcode & 7);
244 else if (opcode >= 0x0060 && opcode <= 0x0067) 231 else if (opcode >= 0x0060 && opcode <= 0x0067)
245 verbose_printk("CALL (P%i)", opcode & 7); 232 pr_cont("CALL (P%i)", opcode & 7);
246 else if (opcode >= 0x0070 && opcode <= 0x0077) 233 else if (opcode >= 0x0070 && opcode <= 0x0077)
247 verbose_printk("CALL (PC+P%i)", opcode & 7); 234 pr_cont("CALL (PC+P%i)", opcode & 7);
248 else if (opcode >= 0x0080 && opcode <= 0x0087) 235 else if (opcode >= 0x0080 && opcode <= 0x0087)
249 verbose_printk("JUMP (PC+P%i)", opcode & 7); 236 pr_cont("JUMP (PC+P%i)", opcode & 7);
250 else if (opcode >= 0x0090 && opcode <= 0x009F) 237 else if (opcode >= 0x0090 && opcode <= 0x009F)
251 verbose_printk("RAISE 0x%x", opcode & 0xF); 238 pr_cont("RAISE 0x%x", opcode & 0xF);
252 else if (opcode >= 0x00A0 && opcode <= 0x00AF) 239 else if (opcode >= 0x00A0 && opcode <= 0x00AF)
253 verbose_printk("EXCPT 0x%x", opcode & 0xF); 240 pr_cont("EXCPT 0x%x", opcode & 0xF);
254 else if ((opcode >= 0x1000 && opcode <= 0x13FF) || (opcode >= 0x1800 && opcode <= 0x1BFF)) 241 else if ((opcode >= 0x1000 && opcode <= 0x13FF) || (opcode >= 0x1800 && opcode <= 0x1BFF))
255 verbose_printk("IF !CC JUMP"); 242 pr_cont("IF !CC JUMP");
256 else if ((opcode >= 0x1400 && opcode <= 0x17ff) || (opcode >= 0x1c00 && opcode <= 0x1fff)) 243 else if ((opcode >= 0x1400 && opcode <= 0x17ff) || (opcode >= 0x1c00 && opcode <= 0x1fff))
257 verbose_printk("IF CC JUMP"); 244 pr_cont("IF CC JUMP");
258 else if (opcode >= 0x2000 && opcode <= 0x2fff) 245 else if (opcode >= 0x2000 && opcode <= 0x2fff)
259 verbose_printk("JUMP.S"); 246 pr_cont("JUMP.S");
260 else if (opcode >= 0xe080 && opcode <= 0xe0ff) 247 else if (opcode >= 0xe080 && opcode <= 0xe0ff)
261 verbose_printk("LSETUP"); 248 pr_cont("LSETUP");
262 else if (opcode >= 0xe200 && opcode <= 0xe2ff) 249 else if (opcode >= 0xe200 && opcode <= 0xe2ff)
263 verbose_printk("JUMP.L"); 250 pr_cont("JUMP.L");
264 else if (opcode >= 0xe300 && opcode <= 0xe3ff) 251 else if (opcode >= 0xe300 && opcode <= 0xe3ff)
265 verbose_printk("CALL pcrel"); 252 pr_cont("CALL pcrel");
266 else 253 else
267 verbose_printk("0x%04x", opcode); 254 pr_cont("0x%04x", opcode);
268 } 255 }
269 256
270} 257}
@@ -272,7 +259,6 @@ static void decode_instruction(unsigned short *address)
272 259
273void dump_bfin_trace_buffer(void) 260void dump_bfin_trace_buffer(void)
274{ 261{
275#ifdef CONFIG_DEBUG_VERBOSE
276#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON 262#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON
277 int tflags, i = 0; 263 int tflags, i = 0;
278 char buf[150]; 264 char buf[150];
@@ -283,21 +269,21 @@ void dump_bfin_trace_buffer(void)
283 269
284 trace_buffer_save(tflags); 270 trace_buffer_save(tflags);
285 271
286 printk(KERN_NOTICE "Hardware Trace:\n"); 272 pr_notice("Hardware Trace:\n");
287 273
288#ifdef CONFIG_DEBUG_BFIN_HWTRACE_EXPAND 274#ifdef CONFIG_DEBUG_BFIN_HWTRACE_EXPAND
289 printk(KERN_NOTICE "WARNING: Expanded trace turned on - can not trace exceptions\n"); 275 pr_notice("WARNING: Expanded trace turned on - can not trace exceptions\n");
290#endif 276#endif
291 277
292 if (likely(bfin_read_TBUFSTAT() & TBUFCNT)) { 278 if (likely(bfin_read_TBUFSTAT() & TBUFCNT)) {
293 for (; bfin_read_TBUFSTAT() & TBUFCNT; i++) { 279 for (; bfin_read_TBUFSTAT() & TBUFCNT; i++) {
294 decode_address(buf, (unsigned long)bfin_read_TBUF()); 280 decode_address(buf, (unsigned long)bfin_read_TBUF());
295 printk(KERN_NOTICE "%4i Target : %s\n", i, buf); 281 pr_notice("%4i Target : %s\n", i, buf);
296 addr = (unsigned short *)bfin_read_TBUF(); 282 addr = (unsigned short *)bfin_read_TBUF();
297 decode_address(buf, (unsigned long)addr); 283 decode_address(buf, (unsigned long)addr);
298 printk(KERN_NOTICE " Source : %s ", buf); 284 pr_notice(" Source : %s ", buf);
299 decode_instruction(addr); 285 decode_instruction(addr);
300 printk("\n"); 286 pr_cont("\n");
301 } 287 }
302 } 288 }
303 289
@@ -310,14 +296,14 @@ void dump_bfin_trace_buffer(void)
310 j = (1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN) * 128; 296 j = (1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN) * 128;
311 while (j) { 297 while (j) {
312 decode_address(buf, software_trace_buff[index]); 298 decode_address(buf, software_trace_buff[index]);
313 printk(KERN_NOTICE "%4i Target : %s\n", i, buf); 299 pr_notice("%4i Target : %s\n", i, buf);
314 index -= 1; 300 index -= 1;
315 if (index < 0) 301 if (index < 0)
316 index = EXPAND_LEN; 302 index = EXPAND_LEN;
317 decode_address(buf, software_trace_buff[index]); 303 decode_address(buf, software_trace_buff[index]);
318 printk(KERN_NOTICE " Source : %s ", buf); 304 pr_notice(" Source : %s ", buf);
319 decode_instruction((unsigned short *)software_trace_buff[index]); 305 decode_instruction((unsigned short *)software_trace_buff[index]);
320 printk("\n"); 306 pr_cont("\n");
321 index -= 1; 307 index -= 1;
322 if (index < 0) 308 if (index < 0)
323 index = EXPAND_LEN; 309 index = EXPAND_LEN;
@@ -328,78 +314,73 @@ void dump_bfin_trace_buffer(void)
328 314
329 trace_buffer_restore(tflags); 315 trace_buffer_restore(tflags);
330#endif 316#endif
331#endif
332} 317}
333EXPORT_SYMBOL(dump_bfin_trace_buffer); 318EXPORT_SYMBOL(dump_bfin_trace_buffer);
334 319
335void dump_bfin_process(struct pt_regs *fp) 320void dump_bfin_process(struct pt_regs *fp)
336{ 321{
337#ifdef CONFIG_DEBUG_VERBOSE
338 /* We should be able to look at fp->ipend, but we don't push it on the 322 /* We should be able to look at fp->ipend, but we don't push it on the
339 * stack all the time, so do this until we fix that */ 323 * stack all the time, so do this until we fix that */
340 unsigned int context = bfin_read_IPEND(); 324 unsigned int context = bfin_read_IPEND();
341 325
342 if (oops_in_progress) 326 if (oops_in_progress)
343 verbose_printk(KERN_EMERG "Kernel OOPS in progress\n"); 327 pr_emerg("Kernel OOPS in progress\n");
344 328
345 if (context & 0x0020 && (fp->seqstat & SEQSTAT_EXCAUSE) == VEC_HWERR) 329 if (context & 0x0020 && (fp->seqstat & SEQSTAT_EXCAUSE) == VEC_HWERR)
346 verbose_printk(KERN_NOTICE "HW Error context\n"); 330 pr_notice("HW Error context\n");
347 else if (context & 0x0020) 331 else if (context & 0x0020)
348 verbose_printk(KERN_NOTICE "Deferred Exception context\n"); 332 pr_notice("Deferred Exception context\n");
349 else if (context & 0x3FC0) 333 else if (context & 0x3FC0)
350 verbose_printk(KERN_NOTICE "Interrupt context\n"); 334 pr_notice("Interrupt context\n");
351 else if (context & 0x4000) 335 else if (context & 0x4000)
352 verbose_printk(KERN_NOTICE "Deferred Interrupt context\n"); 336 pr_notice("Deferred Interrupt context\n");
353 else if (context & 0x8000) 337 else if (context & 0x8000)
354 verbose_printk(KERN_NOTICE "Kernel process context\n"); 338 pr_notice("Kernel process context\n");
355 339
356 /* Because we are crashing, and pointers could be bad, we check things 340 /* Because we are crashing, and pointers could be bad, we check things
357 * pretty closely before we use them 341 * pretty closely before we use them
358 */ 342 */
359 if ((unsigned long)current >= FIXED_CODE_START && 343 if ((unsigned long)current >= FIXED_CODE_START &&
360 !((unsigned long)current & 0x3) && current->pid) { 344 !((unsigned long)current & 0x3) && current->pid) {
361 verbose_printk(KERN_NOTICE "CURRENT PROCESS:\n"); 345 pr_notice("CURRENT PROCESS:\n");
362 if (current->comm >= (char *)FIXED_CODE_START) 346 if (current->comm >= (char *)FIXED_CODE_START)
363 verbose_printk(KERN_NOTICE "COMM=%s PID=%d", 347 pr_notice("COMM=%s PID=%d",
364 current->comm, current->pid); 348 current->comm, current->pid);
365 else 349 else
366 verbose_printk(KERN_NOTICE "COMM= invalid"); 350 pr_notice("COMM= invalid");
367 351
368 printk(KERN_CONT " CPU=%d\n", current_thread_info()->cpu); 352 pr_cont(" CPU=%d\n", current_thread_info()->cpu);
369 if (!((unsigned long)current->mm & 0x3) && (unsigned long)current->mm >= FIXED_CODE_START) 353 if (!((unsigned long)current->mm & 0x3) &&
370 verbose_printk(KERN_NOTICE 354 (unsigned long)current->mm >= FIXED_CODE_START) {
371 "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n" 355 pr_notice("TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n",
372 " BSS = 0x%p-0x%p USER-STACK = 0x%p\n\n",
373 (void *)current->mm->start_code, 356 (void *)current->mm->start_code,
374 (void *)current->mm->end_code, 357 (void *)current->mm->end_code,
375 (void *)current->mm->start_data, 358 (void *)current->mm->start_data,
376 (void *)current->mm->end_data, 359 (void *)current->mm->end_data);
360 pr_notice(" BSS = 0x%p-0x%p USER-STACK = 0x%p\n\n",
377 (void *)current->mm->end_data, 361 (void *)current->mm->end_data,
378 (void *)current->mm->brk, 362 (void *)current->mm->brk,
379 (void *)current->mm->start_stack); 363 (void *)current->mm->start_stack);
380 else 364 } else
381 verbose_printk(KERN_NOTICE "invalid mm\n"); 365 pr_notice("invalid mm\n");
382 } else 366 } else
383 verbose_printk(KERN_NOTICE 367 pr_notice("No Valid process in current context\n");
384 "No Valid process in current context\n");
385#endif
386} 368}
387 369
388void dump_bfin_mem(struct pt_regs *fp) 370void dump_bfin_mem(struct pt_regs *fp)
389{ 371{
390#ifdef CONFIG_DEBUG_VERBOSE
391 unsigned short *addr, *erraddr, val = 0, err = 0; 372 unsigned short *addr, *erraddr, val = 0, err = 0;
392 char sti = 0, buf[6]; 373 char sti = 0, buf[6];
393 374
394 erraddr = (void *)fp->pc; 375 erraddr = (void *)fp->pc;
395 376
396 verbose_printk(KERN_NOTICE "return address: [0x%p]; contents of:", erraddr); 377 pr_notice("return address: [0x%p]; contents of:", erraddr);
397 378
398 for (addr = (unsigned short *)((unsigned long)erraddr & ~0xF) - 0x10; 379 for (addr = (unsigned short *)((unsigned long)erraddr & ~0xF) - 0x10;
399 addr < (unsigned short *)((unsigned long)erraddr & ~0xF) + 0x10; 380 addr < (unsigned short *)((unsigned long)erraddr & ~0xF) + 0x10;
400 addr++) { 381 addr++) {
401 if (!((unsigned long)addr & 0xF)) 382 if (!((unsigned long)addr & 0xF))
402 verbose_printk(KERN_NOTICE "0x%p: ", addr); 383 pr_notice("0x%p: ", addr);
403 384
404 if (!get_instruction(&val, addr)) { 385 if (!get_instruction(&val, addr)) {
405 val = 0; 386 val = 0;
@@ -408,10 +389,10 @@ void dump_bfin_mem(struct pt_regs *fp)
408 sprintf(buf, "%04x", val); 389 sprintf(buf, "%04x", val);
409 390
410 if (addr == erraddr) { 391 if (addr == erraddr) {
411 verbose_printk("[%s]", buf); 392 pr_cont("[%s]", buf);
412 err = val; 393 err = val;
413 } else 394 } else
414 verbose_printk(" %s ", buf); 395 pr_cont(" %s ", buf);
415 396
416 /* Do any previous instructions turn on interrupts? */ 397 /* Do any previous instructions turn on interrupts? */
417 if (addr <= erraddr && /* in the past */ 398 if (addr <= erraddr && /* in the past */
@@ -420,16 +401,15 @@ void dump_bfin_mem(struct pt_regs *fp)
420 sti = 1; 401 sti = 1;
421 } 402 }
422 403
423 verbose_printk("\n"); 404 pr_cont("\n");
424 405
425 /* Hardware error interrupts can be deferred */ 406 /* Hardware error interrupts can be deferred */
426 if (unlikely(sti && (fp->seqstat & SEQSTAT_EXCAUSE) == VEC_HWERR && 407 if (unlikely(sti && (fp->seqstat & SEQSTAT_EXCAUSE) == VEC_HWERR &&
427 oops_in_progress)){ 408 oops_in_progress)){
428 verbose_printk(KERN_NOTICE "Looks like this was a deferred error - sorry\n"); 409 pr_notice("Looks like this was a deferred error - sorry\n");
429#ifndef CONFIG_DEBUG_HWERR 410#ifndef CONFIG_DEBUG_HWERR
430 verbose_printk(KERN_NOTICE 411 pr_notice("The remaining message may be meaningless\n");
431"The remaining message may be meaningless\n" 412 pr_notice("You should enable CONFIG_DEBUG_HWERR to get a better idea where it came from\n");
432"You should enable CONFIG_DEBUG_HWERR to get a better idea where it came from\n");
433#else 413#else
434 /* If we are handling only one peripheral interrupt 414 /* If we are handling only one peripheral interrupt
435 * and current mm and pid are valid, and the last error 415 * and current mm and pid are valid, and the last error
@@ -441,20 +421,18 @@ void dump_bfin_mem(struct pt_regs *fp)
441 /* And the last RETI points to the current userspace context */ 421 /* And the last RETI points to the current userspace context */
442 if ((fp + 1)->pc >= current->mm->start_code && 422 if ((fp + 1)->pc >= current->mm->start_code &&
443 (fp + 1)->pc <= current->mm->end_code) { 423 (fp + 1)->pc <= current->mm->end_code) {
444 verbose_printk(KERN_NOTICE "It might be better to look around here :\n"); 424 pr_notice("It might be better to look around here :\n");
445 verbose_printk(KERN_NOTICE "-------------------------------------------\n"); 425 pr_notice("-------------------------------------------\n");
446 show_regs(fp + 1); 426 show_regs(fp + 1);
447 verbose_printk(KERN_NOTICE "-------------------------------------------\n"); 427 pr_notice("-------------------------------------------\n");
448 } 428 }
449 } 429 }
450#endif 430#endif
451 } 431 }
452#endif
453} 432}
454 433
455void show_regs(struct pt_regs *fp) 434void show_regs(struct pt_regs *fp)
456{ 435{
457#ifdef CONFIG_DEBUG_VERBOSE
458 char buf[150]; 436 char buf[150];
459 struct irqaction *action; 437 struct irqaction *action;
460 unsigned int i; 438 unsigned int i;
@@ -462,19 +440,19 @@ void show_regs(struct pt_regs *fp)
462 unsigned int cpu = raw_smp_processor_id(); 440 unsigned int cpu = raw_smp_processor_id();
463 unsigned char in_atomic = (bfin_read_IPEND() & 0x10) || in_atomic(); 441 unsigned char in_atomic = (bfin_read_IPEND() & 0x10) || in_atomic();
464 442
465 verbose_printk(KERN_NOTICE "\n"); 443 pr_notice("\n");
466 if (CPUID != bfin_cpuid()) 444 if (CPUID != bfin_cpuid())
467 verbose_printk(KERN_NOTICE "Compiled for cpu family 0x%04x (Rev %d), " 445 pr_notice("Compiled for cpu family 0x%04x (Rev %d), "
468 "but running on:0x%04x (Rev %d)\n", 446 "but running on:0x%04x (Rev %d)\n",
469 CPUID, bfin_compiled_revid(), bfin_cpuid(), bfin_revid()); 447 CPUID, bfin_compiled_revid(), bfin_cpuid(), bfin_revid());
470 448
471 verbose_printk(KERN_NOTICE "ADSP-%s-0.%d", 449 pr_notice("ADSP-%s-0.%d",
472 CPU, bfin_compiled_revid()); 450 CPU, bfin_compiled_revid());
473 451
474 if (bfin_compiled_revid() != bfin_revid()) 452 if (bfin_compiled_revid() != bfin_revid())
475 verbose_printk("(Detected 0.%d)", bfin_revid()); 453 pr_cont("(Detected 0.%d)", bfin_revid());
476 454
477 verbose_printk(" %lu(MHz CCLK) %lu(MHz SCLK) (%s)\n", 455 pr_cont(" %lu(MHz CCLK) %lu(MHz SCLK) (%s)\n",
478 get_cclk()/1000000, get_sclk()/1000000, 456 get_cclk()/1000000, get_sclk()/1000000,
479#ifdef CONFIG_MPU 457#ifdef CONFIG_MPU
480 "mpu on" 458 "mpu on"
@@ -483,40 +461,40 @@ void show_regs(struct pt_regs *fp)
483#endif 461#endif
484 ); 462 );
485 463
486 verbose_printk(KERN_NOTICE "%s", linux_banner); 464 pr_notice("%s", linux_banner);
487 465
488 verbose_printk(KERN_NOTICE "\nSEQUENCER STATUS:\t\t%s\n", print_tainted()); 466 pr_notice("\nSEQUENCER STATUS:\t\t%s\n", print_tainted());
489 verbose_printk(KERN_NOTICE " SEQSTAT: %08lx IPEND: %04lx IMASK: %04lx SYSCFG: %04lx\n", 467 pr_notice(" SEQSTAT: %08lx IPEND: %04lx IMASK: %04lx SYSCFG: %04lx\n",
490 (long)fp->seqstat, fp->ipend, cpu_pda[raw_smp_processor_id()].ex_imask, fp->syscfg); 468 (long)fp->seqstat, fp->ipend, cpu_pda[raw_smp_processor_id()].ex_imask, fp->syscfg);
491 if (fp->ipend & EVT_IRPTEN) 469 if (fp->ipend & EVT_IRPTEN)
492 verbose_printk(KERN_NOTICE " Global Interrupts Disabled (IPEND[4])\n"); 470 pr_notice(" Global Interrupts Disabled (IPEND[4])\n");
493 if (!(cpu_pda[raw_smp_processor_id()].ex_imask & (EVT_IVG13 | EVT_IVG12 | EVT_IVG11 | 471 if (!(cpu_pda[raw_smp_processor_id()].ex_imask & (EVT_IVG13 | EVT_IVG12 | EVT_IVG11 |
494 EVT_IVG10 | EVT_IVG9 | EVT_IVG8 | EVT_IVG7 | EVT_IVTMR))) 472 EVT_IVG10 | EVT_IVG9 | EVT_IVG8 | EVT_IVG7 | EVT_IVTMR)))
495 verbose_printk(KERN_NOTICE " Peripheral interrupts masked off\n"); 473 pr_notice(" Peripheral interrupts masked off\n");
496 if (!(cpu_pda[raw_smp_processor_id()].ex_imask & (EVT_IVG15 | EVT_IVG14))) 474 if (!(cpu_pda[raw_smp_processor_id()].ex_imask & (EVT_IVG15 | EVT_IVG14)))
497 verbose_printk(KERN_NOTICE " Kernel interrupts masked off\n"); 475 pr_notice(" Kernel interrupts masked off\n");
498 if ((fp->seqstat & SEQSTAT_EXCAUSE) == VEC_HWERR) { 476 if ((fp->seqstat & SEQSTAT_EXCAUSE) == VEC_HWERR) {
499 verbose_printk(KERN_NOTICE " HWERRCAUSE: 0x%lx\n", 477 pr_notice(" HWERRCAUSE: 0x%lx\n",
500 (fp->seqstat & SEQSTAT_HWERRCAUSE) >> 14); 478 (fp->seqstat & SEQSTAT_HWERRCAUSE) >> 14);
501#ifdef EBIU_ERRMST 479#ifdef EBIU_ERRMST
502 /* If the error was from the EBIU, print it out */ 480 /* If the error was from the EBIU, print it out */
503 if (bfin_read_EBIU_ERRMST() & CORE_ERROR) { 481 if (bfin_read_EBIU_ERRMST() & CORE_ERROR) {
504 verbose_printk(KERN_NOTICE " EBIU Error Reason : 0x%04x\n", 482 pr_notice(" EBIU Error Reason : 0x%04x\n",
505 bfin_read_EBIU_ERRMST()); 483 bfin_read_EBIU_ERRMST());
506 verbose_printk(KERN_NOTICE " EBIU Error Address : 0x%08x\n", 484 pr_notice(" EBIU Error Address : 0x%08x\n",
507 bfin_read_EBIU_ERRADD()); 485 bfin_read_EBIU_ERRADD());
508 } 486 }
509#endif 487#endif
510 } 488 }
511 verbose_printk(KERN_NOTICE " EXCAUSE : 0x%lx\n", 489 pr_notice(" EXCAUSE : 0x%lx\n",
512 fp->seqstat & SEQSTAT_EXCAUSE); 490 fp->seqstat & SEQSTAT_EXCAUSE);
513 for (i = 2; i <= 15 ; i++) { 491 for (i = 2; i <= 15 ; i++) {
514 if (fp->ipend & (1 << i)) { 492 if (fp->ipend & (1 << i)) {
515 if (i != 4) { 493 if (i != 4) {
516 decode_address(buf, bfin_read32(EVT0 + 4*i)); 494 decode_address(buf, bfin_read32(EVT0 + 4*i));
517 verbose_printk(KERN_NOTICE " physical IVG%i asserted : %s\n", i, buf); 495 pr_notice(" physical IVG%i asserted : %s\n", i, buf);
518 } else 496 } else
519 verbose_printk(KERN_NOTICE " interrupts disabled\n"); 497 pr_notice(" interrupts disabled\n");
520 } 498 }
521 } 499 }
522 500
@@ -531,12 +509,12 @@ void show_regs(struct pt_regs *fp)
531 goto unlock; 509 goto unlock;
532 510
533 decode_address(buf, (unsigned int)action->handler); 511 decode_address(buf, (unsigned int)action->handler);
534 verbose_printk(KERN_NOTICE " logical irq %3d mapped : %s", i, buf); 512 pr_notice(" logical irq %3d mapped : %s", i, buf);
535 for (action = action->next; action; action = action->next) { 513 for (action = action->next; action; action = action->next) {
536 decode_address(buf, (unsigned int)action->handler); 514 decode_address(buf, (unsigned int)action->handler);
537 verbose_printk(", %s", buf); 515 pr_cont(", %s", buf);
538 } 516 }
539 verbose_printk("\n"); 517 pr_cont("\n");
540unlock: 518unlock:
541 if (!in_atomic) 519 if (!in_atomic)
542 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags); 520 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
@@ -544,51 +522,50 @@ unlock:
544 } 522 }
545 523
546 decode_address(buf, fp->rete); 524 decode_address(buf, fp->rete);
547 verbose_printk(KERN_NOTICE " RETE: %s\n", buf); 525 pr_notice(" RETE: %s\n", buf);
548 decode_address(buf, fp->retn); 526 decode_address(buf, fp->retn);
549 verbose_printk(KERN_NOTICE " RETN: %s\n", buf); 527 pr_notice(" RETN: %s\n", buf);
550 decode_address(buf, fp->retx); 528 decode_address(buf, fp->retx);
551 verbose_printk(KERN_NOTICE " RETX: %s\n", buf); 529 pr_notice(" RETX: %s\n", buf);
552 decode_address(buf, fp->rets); 530 decode_address(buf, fp->rets);
553 verbose_printk(KERN_NOTICE " RETS: %s\n", buf); 531 pr_notice(" RETS: %s\n", buf);
554 decode_address(buf, fp->pc); 532 decode_address(buf, fp->pc);
555 verbose_printk(KERN_NOTICE " PC : %s\n", buf); 533 pr_notice(" PC : %s\n", buf);
556 534
557 if (((long)fp->seqstat & SEQSTAT_EXCAUSE) && 535 if (((long)fp->seqstat & SEQSTAT_EXCAUSE) &&
558 (((long)fp->seqstat & SEQSTAT_EXCAUSE) != VEC_HWERR)) { 536 (((long)fp->seqstat & SEQSTAT_EXCAUSE) != VEC_HWERR)) {
559 decode_address(buf, cpu_pda[cpu].dcplb_fault_addr); 537 decode_address(buf, cpu_pda[cpu].dcplb_fault_addr);
560 verbose_printk(KERN_NOTICE "DCPLB_FAULT_ADDR: %s\n", buf); 538 pr_notice("DCPLB_FAULT_ADDR: %s\n", buf);
561 decode_address(buf, cpu_pda[cpu].icplb_fault_addr); 539 decode_address(buf, cpu_pda[cpu].icplb_fault_addr);
562 verbose_printk(KERN_NOTICE "ICPLB_FAULT_ADDR: %s\n", buf); 540 pr_notice("ICPLB_FAULT_ADDR: %s\n", buf);
563 } 541 }
564 542
565 verbose_printk(KERN_NOTICE "PROCESSOR STATE:\n"); 543 pr_notice("PROCESSOR STATE:\n");
566 verbose_printk(KERN_NOTICE " R0 : %08lx R1 : %08lx R2 : %08lx R3 : %08lx\n", 544 pr_notice(" R0 : %08lx R1 : %08lx R2 : %08lx R3 : %08lx\n",
567 fp->r0, fp->r1, fp->r2, fp->r3); 545 fp->r0, fp->r1, fp->r2, fp->r3);
568 verbose_printk(KERN_NOTICE " R4 : %08lx R5 : %08lx R6 : %08lx R7 : %08lx\n", 546 pr_notice(" R4 : %08lx R5 : %08lx R6 : %08lx R7 : %08lx\n",
569 fp->r4, fp->r5, fp->r6, fp->r7); 547 fp->r4, fp->r5, fp->r6, fp->r7);
570 verbose_printk(KERN_NOTICE " P0 : %08lx P1 : %08lx P2 : %08lx P3 : %08lx\n", 548 pr_notice(" P0 : %08lx P1 : %08lx P2 : %08lx P3 : %08lx\n",
571 fp->p0, fp->p1, fp->p2, fp->p3); 549 fp->p0, fp->p1, fp->p2, fp->p3);
572 verbose_printk(KERN_NOTICE " P4 : %08lx P5 : %08lx FP : %08lx SP : %08lx\n", 550 pr_notice(" P4 : %08lx P5 : %08lx FP : %08lx SP : %08lx\n",
573 fp->p4, fp->p5, fp->fp, (long)fp); 551 fp->p4, fp->p5, fp->fp, (long)fp);
574 verbose_printk(KERN_NOTICE " LB0: %08lx LT0: %08lx LC0: %08lx\n", 552 pr_notice(" LB0: %08lx LT0: %08lx LC0: %08lx\n",
575 fp->lb0, fp->lt0, fp->lc0); 553 fp->lb0, fp->lt0, fp->lc0);
576 verbose_printk(KERN_NOTICE " LB1: %08lx LT1: %08lx LC1: %08lx\n", 554 pr_notice(" LB1: %08lx LT1: %08lx LC1: %08lx\n",
577 fp->lb1, fp->lt1, fp->lc1); 555 fp->lb1, fp->lt1, fp->lc1);
578 verbose_printk(KERN_NOTICE " B0 : %08lx L0 : %08lx M0 : %08lx I0 : %08lx\n", 556 pr_notice(" B0 : %08lx L0 : %08lx M0 : %08lx I0 : %08lx\n",
579 fp->b0, fp->l0, fp->m0, fp->i0); 557 fp->b0, fp->l0, fp->m0, fp->i0);
580 verbose_printk(KERN_NOTICE " B1 : %08lx L1 : %08lx M1 : %08lx I1 : %08lx\n", 558 pr_notice(" B1 : %08lx L1 : %08lx M1 : %08lx I1 : %08lx\n",
581 fp->b1, fp->l1, fp->m1, fp->i1); 559 fp->b1, fp->l1, fp->m1, fp->i1);
582 verbose_printk(KERN_NOTICE " B2 : %08lx L2 : %08lx M2 : %08lx I2 : %08lx\n", 560 pr_notice(" B2 : %08lx L2 : %08lx M2 : %08lx I2 : %08lx\n",
583 fp->b2, fp->l2, fp->m2, fp->i2); 561 fp->b2, fp->l2, fp->m2, fp->i2);
584 verbose_printk(KERN_NOTICE " B3 : %08lx L3 : %08lx M3 : %08lx I3 : %08lx\n", 562 pr_notice(" B3 : %08lx L3 : %08lx M3 : %08lx I3 : %08lx\n",
585 fp->b3, fp->l3, fp->m3, fp->i3); 563 fp->b3, fp->l3, fp->m3, fp->i3);
586 verbose_printk(KERN_NOTICE "A0.w: %08lx A0.x: %08lx A1.w: %08lx A1.x: %08lx\n", 564 pr_notice("A0.w: %08lx A0.x: %08lx A1.w: %08lx A1.x: %08lx\n",
587 fp->a0w, fp->a0x, fp->a1w, fp->a1x); 565 fp->a0w, fp->a0x, fp->a1w, fp->a1x);
588 566
589 verbose_printk(KERN_NOTICE "USP : %08lx ASTAT: %08lx\n", 567 pr_notice("USP : %08lx ASTAT: %08lx\n",
590 rdusp(), fp->astat); 568 rdusp(), fp->astat);
591 569
592 verbose_printk(KERN_NOTICE "\n"); 570 pr_notice("\n");
593#endif
594} 571}