diff options
-rw-r--r-- | arch/blackfin/Kconfig.debug | 13 | ||||
-rw-r--r-- | arch/blackfin/kernel/traps.c | 230 |
2 files changed, 143 insertions, 100 deletions
diff --git a/arch/blackfin/Kconfig.debug b/arch/blackfin/Kconfig.debug index f08aea4fc5eb..3ad25983ec97 100644 --- a/arch/blackfin/Kconfig.debug +++ b/arch/blackfin/Kconfig.debug | |||
@@ -5,6 +5,19 @@ source "lib/Kconfig.debug" | |||
5 | config HAVE_ARCH_KGDB | 5 | config HAVE_ARCH_KGDB |
6 | def_bool y | 6 | def_bool y |
7 | 7 | ||
8 | config DEBUG_VERBOSE | ||
9 | bool "Verbose fault messages" | ||
10 | default y | ||
11 | select PRINTK | ||
12 | help | ||
13 | When a program crashes due to an exception, or the kernel detects | ||
14 | an internal error, the kernel can print a not so brief message | ||
15 | explaining what the problem was. This debugging information is | ||
16 | useful to developers and kernel hackers when tracking down problems, | ||
17 | but mostly meaningless to other people. This is always helpful for | ||
18 | debugging but serves no purpose on a production system. | ||
19 | Most people should say N here. | ||
20 | |||
8 | config DEBUG_MMRS | 21 | config DEBUG_MMRS |
9 | bool "Generate Blackfin MMR tree" | 22 | bool "Generate Blackfin MMR tree" |
10 | select DEBUG_FS | 23 | select DEBUG_FS |
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 709c247b7016..1aa2c788e228 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c | |||
@@ -58,6 +58,15 @@ | |||
58 | # define CHK_DEBUGGER_TRAP_MAYBE() do { } while (0) | 58 | # define CHK_DEBUGGER_TRAP_MAYBE() do { } while (0) |
59 | #endif | 59 | #endif |
60 | 60 | ||
61 | |||
62 | #ifdef CONFIG_VERBOSE_DEBUG | ||
63 | #define verbose_printk(fmt, arg...) \ | ||
64 | printk(fmt, ##arg) | ||
65 | #else | ||
66 | #define verbose_printk(fmt, arg...) \ | ||
67 | ({ if (0) printk(fmt, ##arg); 0; }) | ||
68 | #endif | ||
69 | |||
61 | /* Initiate the event table handler */ | 70 | /* Initiate the event table handler */ |
62 | void __init trap_init(void) | 71 | void __init trap_init(void) |
63 | { | 72 | { |
@@ -78,6 +87,7 @@ unsigned long saved_retx, saved_seqstat, | |||
78 | 87 | ||
79 | static void decode_address(char *buf, unsigned long address) | 88 | static void decode_address(char *buf, unsigned long address) |
80 | { | 89 | { |
90 | #ifdef CONFIG_DEBUG_VERBOSE | ||
81 | struct vm_list_struct *vml; | 91 | struct vm_list_struct *vml; |
82 | struct task_struct *p; | 92 | struct task_struct *p; |
83 | struct mm_struct *mm; | 93 | struct mm_struct *mm; |
@@ -185,12 +195,16 @@ static void decode_address(char *buf, unsigned long address) | |||
185 | 195 | ||
186 | done: | 196 | done: |
187 | write_unlock_irqrestore(&tasklist_lock, flags); | 197 | write_unlock_irqrestore(&tasklist_lock, flags); |
198 | #else | ||
199 | sprintf(buf, " "); | ||
200 | #endif | ||
188 | } | 201 | } |
189 | 202 | ||
190 | asmlinkage void double_fault_c(struct pt_regs *fp) | 203 | asmlinkage void double_fault_c(struct pt_regs *fp) |
191 | { | 204 | { |
192 | console_verbose(); | 205 | console_verbose(); |
193 | oops_in_progress = 1; | 206 | oops_in_progress = 1; |
207 | #ifdef CONFIG_DEBUG_VERBOSE | ||
194 | printk(KERN_EMERG "\n" KERN_EMERG "Double Fault\n"); | 208 | printk(KERN_EMERG "\n" KERN_EMERG "Double Fault\n"); |
195 | #ifdef CONFIG_DEBUG_DOUBLEFAULT_PRINT | 209 | #ifdef CONFIG_DEBUG_DOUBLEFAULT_PRINT |
196 | if (((long)fp->seqstat & SEQSTAT_EXCAUSE) == VEC_UNCOV) { | 210 | if (((long)fp->seqstat & SEQSTAT_EXCAUSE) == VEC_UNCOV) { |
@@ -213,6 +227,7 @@ asmlinkage void double_fault_c(struct pt_regs *fp) | |||
213 | dump_bfin_mem(fp); | 227 | dump_bfin_mem(fp); |
214 | show_regs(fp); | 228 | show_regs(fp); |
215 | } | 229 | } |
230 | #endif | ||
216 | panic("Double Fault - unrecoverable event\n"); | 231 | panic("Double Fault - unrecoverable event\n"); |
217 | 232 | ||
218 | } | 233 | } |
@@ -288,7 +303,7 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
288 | case VEC_EXCPT03: | 303 | case VEC_EXCPT03: |
289 | info.si_code = SEGV_STACKFLOW; | 304 | info.si_code = SEGV_STACKFLOW; |
290 | sig = SIGSEGV; | 305 | sig = SIGSEGV; |
291 | printk(KERN_NOTICE EXC_0x03(KERN_NOTICE)); | 306 | verbose_printk(KERN_NOTICE EXC_0x03(KERN_NOTICE)); |
292 | CHK_DEBUGGER_TRAP_MAYBE(); | 307 | CHK_DEBUGGER_TRAP_MAYBE(); |
293 | break; | 308 | break; |
294 | /* 0x02 - KGDB initial connection and break signal trap */ | 309 | /* 0x02 - KGDB initial connection and break signal trap */ |
@@ -317,7 +332,7 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
317 | case VEC_EXCPT04 ... VEC_EXCPT15: | 332 | case VEC_EXCPT04 ... VEC_EXCPT15: |
318 | info.si_code = ILL_ILLPARAOP; | 333 | info.si_code = ILL_ILLPARAOP; |
319 | sig = SIGILL; | 334 | sig = SIGILL; |
320 | printk(KERN_NOTICE EXC_0x04(KERN_NOTICE)); | 335 | verbose_printk(KERN_NOTICE EXC_0x04(KERN_NOTICE)); |
321 | CHK_DEBUGGER_TRAP_MAYBE(); | 336 | CHK_DEBUGGER_TRAP_MAYBE(); |
322 | break; | 337 | break; |
323 | /* 0x10 HW Single step, handled here */ | 338 | /* 0x10 HW Single step, handled here */ |
@@ -334,7 +349,7 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
334 | case VEC_OVFLOW: | 349 | case VEC_OVFLOW: |
335 | info.si_code = TRAP_TRACEFLOW; | 350 | info.si_code = TRAP_TRACEFLOW; |
336 | sig = SIGTRAP; | 351 | sig = SIGTRAP; |
337 | printk(KERN_NOTICE EXC_0x11(KERN_NOTICE)); | 352 | verbose_printk(KERN_NOTICE EXC_0x11(KERN_NOTICE)); |
338 | CHK_DEBUGGER_TRAP_MAYBE(); | 353 | CHK_DEBUGGER_TRAP_MAYBE(); |
339 | break; | 354 | break; |
340 | /* 0x12 - Reserved, Caught by default */ | 355 | /* 0x12 - Reserved, Caught by default */ |
@@ -356,35 +371,35 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
356 | case VEC_UNDEF_I: | 371 | case VEC_UNDEF_I: |
357 | info.si_code = ILL_ILLOPC; | 372 | info.si_code = ILL_ILLOPC; |
358 | sig = SIGILL; | 373 | sig = SIGILL; |
359 | printk(KERN_NOTICE EXC_0x21(KERN_NOTICE)); | 374 | verbose_printk(KERN_NOTICE EXC_0x21(KERN_NOTICE)); |
360 | CHK_DEBUGGER_TRAP_MAYBE(); | 375 | CHK_DEBUGGER_TRAP_MAYBE(); |
361 | break; | 376 | break; |
362 | /* 0x22 - Illegal Instruction Combination, handled here */ | 377 | /* 0x22 - Illegal Instruction Combination, handled here */ |
363 | case VEC_ILGAL_I: | 378 | case VEC_ILGAL_I: |
364 | info.si_code = ILL_ILLPARAOP; | 379 | info.si_code = ILL_ILLPARAOP; |
365 | sig = SIGILL; | 380 | sig = SIGILL; |
366 | printk(KERN_NOTICE EXC_0x22(KERN_NOTICE)); | 381 | verbose_printk(KERN_NOTICE EXC_0x22(KERN_NOTICE)); |
367 | CHK_DEBUGGER_TRAP_MAYBE(); | 382 | CHK_DEBUGGER_TRAP_MAYBE(); |
368 | break; | 383 | break; |
369 | /* 0x23 - Data CPLB protection violation, handled here */ | 384 | /* 0x23 - Data CPLB protection violation, handled here */ |
370 | case VEC_CPLB_VL: | 385 | case VEC_CPLB_VL: |
371 | info.si_code = ILL_CPLB_VI; | 386 | info.si_code = ILL_CPLB_VI; |
372 | sig = SIGBUS; | 387 | sig = SIGBUS; |
373 | printk(KERN_NOTICE EXC_0x23(KERN_NOTICE)); | 388 | verbose_printk(KERN_NOTICE EXC_0x23(KERN_NOTICE)); |
374 | CHK_DEBUGGER_TRAP_MAYBE(); | 389 | CHK_DEBUGGER_TRAP_MAYBE(); |
375 | break; | 390 | break; |
376 | /* 0x24 - Data access misaligned, handled here */ | 391 | /* 0x24 - Data access misaligned, handled here */ |
377 | case VEC_MISALI_D: | 392 | case VEC_MISALI_D: |
378 | info.si_code = BUS_ADRALN; | 393 | info.si_code = BUS_ADRALN; |
379 | sig = SIGBUS; | 394 | sig = SIGBUS; |
380 | printk(KERN_NOTICE EXC_0x24(KERN_NOTICE)); | 395 | verbose_printk(KERN_NOTICE EXC_0x24(KERN_NOTICE)); |
381 | CHK_DEBUGGER_TRAP_MAYBE(); | 396 | CHK_DEBUGGER_TRAP_MAYBE(); |
382 | break; | 397 | break; |
383 | /* 0x25 - Unrecoverable Event, handled here */ | 398 | /* 0x25 - Unrecoverable Event, handled here */ |
384 | case VEC_UNCOV: | 399 | case VEC_UNCOV: |
385 | info.si_code = ILL_ILLEXCPT; | 400 | info.si_code = ILL_ILLEXCPT; |
386 | sig = SIGILL; | 401 | sig = SIGILL; |
387 | printk(KERN_NOTICE EXC_0x25(KERN_NOTICE)); | 402 | verbose_printk(KERN_NOTICE EXC_0x25(KERN_NOTICE)); |
388 | CHK_DEBUGGER_TRAP_MAYBE(); | 403 | CHK_DEBUGGER_TRAP_MAYBE(); |
389 | break; | 404 | break; |
390 | /* 0x26 - Data CPLB Miss, normal case is handled in _cplb_hdr, | 405 | /* 0x26 - Data CPLB Miss, normal case is handled in _cplb_hdr, |
@@ -392,7 +407,7 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
392 | case VEC_CPLB_M: | 407 | case VEC_CPLB_M: |
393 | info.si_code = BUS_ADRALN; | 408 | info.si_code = BUS_ADRALN; |
394 | sig = SIGBUS; | 409 | sig = SIGBUS; |
395 | printk(KERN_NOTICE EXC_0x26(KERN_NOTICE)); | 410 | verbose_printk(KERN_NOTICE EXC_0x26(KERN_NOTICE)); |
396 | break; | 411 | break; |
397 | /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero, handled here */ | 412 | /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero, handled here */ |
398 | case VEC_CPLB_MHIT: | 413 | case VEC_CPLB_MHIT: |
@@ -400,10 +415,10 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
400 | sig = SIGSEGV; | 415 | sig = SIGSEGV; |
401 | #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO | 416 | #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO |
402 | if (saved_dcplb_fault_addr < FIXED_CODE_START) | 417 | if (saved_dcplb_fault_addr < FIXED_CODE_START) |
403 | printk(KERN_NOTICE "NULL pointer access\n"); | 418 | verbose_printk(KERN_NOTICE "NULL pointer access\n"); |
404 | else | 419 | else |
405 | #endif | 420 | #endif |
406 | printk(KERN_NOTICE EXC_0x27(KERN_NOTICE)); | 421 | verbose_printk(KERN_NOTICE EXC_0x27(KERN_NOTICE)); |
407 | CHK_DEBUGGER_TRAP_MAYBE(); | 422 | CHK_DEBUGGER_TRAP_MAYBE(); |
408 | break; | 423 | break; |
409 | /* 0x28 - Emulation Watchpoint, handled here */ | 424 | /* 0x28 - Emulation Watchpoint, handled here */ |
@@ -422,7 +437,7 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
422 | case VEC_ISTRU_VL: /* ADSP-BF535 only (MH) */ | 437 | case VEC_ISTRU_VL: /* ADSP-BF535 only (MH) */ |
423 | info.si_code = BUS_OPFETCH; | 438 | info.si_code = BUS_OPFETCH; |
424 | sig = SIGBUS; | 439 | sig = SIGBUS; |
425 | printk(KERN_NOTICE "BF535: VEC_ISTRU_VL\n"); | 440 | verbose_printk(KERN_NOTICE "BF535: VEC_ISTRU_VL\n"); |
426 | CHK_DEBUGGER_TRAP_MAYBE(); | 441 | CHK_DEBUGGER_TRAP_MAYBE(); |
427 | break; | 442 | break; |
428 | #else | 443 | #else |
@@ -432,21 +447,21 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
432 | case VEC_MISALI_I: | 447 | case VEC_MISALI_I: |
433 | info.si_code = BUS_ADRALN; | 448 | info.si_code = BUS_ADRALN; |
434 | sig = SIGBUS; | 449 | sig = SIGBUS; |
435 | printk(KERN_NOTICE EXC_0x2A(KERN_NOTICE)); | 450 | verbose_printk(KERN_NOTICE EXC_0x2A(KERN_NOTICE)); |
436 | CHK_DEBUGGER_TRAP_MAYBE(); | 451 | CHK_DEBUGGER_TRAP_MAYBE(); |
437 | break; | 452 | break; |
438 | /* 0x2B - Instruction CPLB protection violation, handled here */ | 453 | /* 0x2B - Instruction CPLB protection violation, handled here */ |
439 | case VEC_CPLB_I_VL: | 454 | case VEC_CPLB_I_VL: |
440 | info.si_code = ILL_CPLB_VI; | 455 | info.si_code = ILL_CPLB_VI; |
441 | sig = SIGBUS; | 456 | sig = SIGBUS; |
442 | printk(KERN_NOTICE EXC_0x2B(KERN_NOTICE)); | 457 | verbose_printk(KERN_NOTICE EXC_0x2B(KERN_NOTICE)); |
443 | CHK_DEBUGGER_TRAP_MAYBE(); | 458 | CHK_DEBUGGER_TRAP_MAYBE(); |
444 | break; | 459 | break; |
445 | /* 0x2C - Instruction CPLB miss, handled in _cplb_hdr */ | 460 | /* 0x2C - Instruction CPLB miss, handled in _cplb_hdr */ |
446 | case VEC_CPLB_I_M: | 461 | case VEC_CPLB_I_M: |
447 | info.si_code = ILL_CPLB_MISS; | 462 | info.si_code = ILL_CPLB_MISS; |
448 | sig = SIGBUS; | 463 | sig = SIGBUS; |
449 | printk(KERN_NOTICE EXC_0x2C(KERN_NOTICE)); | 464 | verbose_printk(KERN_NOTICE EXC_0x2C(KERN_NOTICE)); |
450 | break; | 465 | break; |
451 | /* 0x2D - Instruction CPLB Multiple Hits, handled here */ | 466 | /* 0x2D - Instruction CPLB Multiple Hits, handled here */ |
452 | case VEC_CPLB_I_MHIT: | 467 | case VEC_CPLB_I_MHIT: |
@@ -454,17 +469,17 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
454 | sig = SIGSEGV; | 469 | sig = SIGSEGV; |
455 | #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO | 470 | #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO |
456 | if (saved_icplb_fault_addr < FIXED_CODE_START) | 471 | if (saved_icplb_fault_addr < FIXED_CODE_START) |
457 | printk(KERN_NOTICE "Jump to NULL address\n"); | 472 | verbose_printk(KERN_NOTICE "Jump to NULL address\n"); |
458 | else | 473 | else |
459 | #endif | 474 | #endif |
460 | printk(KERN_NOTICE EXC_0x2D(KERN_NOTICE)); | 475 | verbose_printk(KERN_NOTICE EXC_0x2D(KERN_NOTICE)); |
461 | CHK_DEBUGGER_TRAP_MAYBE(); | 476 | CHK_DEBUGGER_TRAP_MAYBE(); |
462 | break; | 477 | break; |
463 | /* 0x2E - Illegal use of Supervisor Resource, handled here */ | 478 | /* 0x2E - Illegal use of Supervisor Resource, handled here */ |
464 | case VEC_ILL_RES: | 479 | case VEC_ILL_RES: |
465 | info.si_code = ILL_PRVOPC; | 480 | info.si_code = ILL_PRVOPC; |
466 | sig = SIGILL; | 481 | sig = SIGILL; |
467 | printk(KERN_NOTICE EXC_0x2E(KERN_NOTICE)); | 482 | verbose_printk(KERN_NOTICE EXC_0x2E(KERN_NOTICE)); |
468 | CHK_DEBUGGER_TRAP_MAYBE(); | 483 | CHK_DEBUGGER_TRAP_MAYBE(); |
469 | break; | 484 | break; |
470 | /* 0x2F - Reserved, Caught by default */ | 485 | /* 0x2F - Reserved, Caught by default */ |
@@ -492,17 +507,17 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
492 | case (SEQSTAT_HWERRCAUSE_SYSTEM_MMR): | 507 | case (SEQSTAT_HWERRCAUSE_SYSTEM_MMR): |
493 | info.si_code = BUS_ADRALN; | 508 | info.si_code = BUS_ADRALN; |
494 | sig = SIGBUS; | 509 | sig = SIGBUS; |
495 | printk(KERN_NOTICE HWC_x2(KERN_NOTICE)); | 510 | verbose_printk(KERN_NOTICE HWC_x2(KERN_NOTICE)); |
496 | break; | 511 | break; |
497 | /* External Memory Addressing Error */ | 512 | /* External Memory Addressing Error */ |
498 | case (SEQSTAT_HWERRCAUSE_EXTERN_ADDR): | 513 | case (SEQSTAT_HWERRCAUSE_EXTERN_ADDR): |
499 | info.si_code = BUS_ADRERR; | 514 | info.si_code = BUS_ADRERR; |
500 | sig = SIGBUS; | 515 | sig = SIGBUS; |
501 | printk(KERN_NOTICE HWC_x3(KERN_NOTICE)); | 516 | verbose_printk(KERN_NOTICE HWC_x3(KERN_NOTICE)); |
502 | break; | 517 | break; |
503 | /* Performance Monitor Overflow */ | 518 | /* Performance Monitor Overflow */ |
504 | case (SEQSTAT_HWERRCAUSE_PERF_FLOW): | 519 | case (SEQSTAT_HWERRCAUSE_PERF_FLOW): |
505 | printk(KERN_NOTICE HWC_x12(KERN_NOTICE)); | 520 | verbose_printk(KERN_NOTICE HWC_x12(KERN_NOTICE)); |
506 | break; | 521 | break; |
507 | /* RAISE 5 instruction */ | 522 | /* RAISE 5 instruction */ |
508 | case (SEQSTAT_HWERRCAUSE_RAISE_5): | 523 | case (SEQSTAT_HWERRCAUSE_RAISE_5): |
@@ -522,7 +537,7 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
522 | oops_in_progress = 1; | 537 | oops_in_progress = 1; |
523 | info.si_code = ILL_ILLPARAOP; | 538 | info.si_code = ILL_ILLPARAOP; |
524 | sig = SIGILL; | 539 | sig = SIGILL; |
525 | printk(KERN_EMERG "Caught Unhandled Exception, code = %08lx\n", | 540 | verbose_printk(KERN_EMERG "Caught Unhandled Exception, code = %08lx\n", |
526 | (fp->seqstat & SEQSTAT_EXCAUSE)); | 541 | (fp->seqstat & SEQSTAT_EXCAUSE)); |
527 | CHK_DEBUGGER_TRAP_MAYBE(); | 542 | CHK_DEBUGGER_TRAP_MAYBE(); |
528 | break; | 543 | break; |
@@ -531,7 +546,6 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
531 | BUG_ON(sig == 0); | 546 | BUG_ON(sig == 0); |
532 | 547 | ||
533 | if (sig != SIGTRAP) { | 548 | if (sig != SIGTRAP) { |
534 | unsigned long *stack; | ||
535 | dump_bfin_process(fp); | 549 | dump_bfin_process(fp); |
536 | dump_bfin_mem(fp); | 550 | dump_bfin_mem(fp); |
537 | show_regs(fp); | 551 | show_regs(fp); |
@@ -539,7 +553,7 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
539 | /* Print out the trace buffer if it makes sense */ | 553 | /* Print out the trace buffer if it makes sense */ |
540 | #ifndef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE | 554 | #ifndef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE |
541 | if (trapnr == VEC_CPLB_I_M || trapnr == VEC_CPLB_M) | 555 | if (trapnr == VEC_CPLB_I_M || trapnr == VEC_CPLB_M) |
542 | printk(KERN_NOTICE "No trace since you do not have " | 556 | verbose_printk(KERN_NOTICE "No trace since you do not have " |
543 | "CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE enabled\n" | 557 | "CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE enabled\n" |
544 | KERN_NOTICE "\n"); | 558 | KERN_NOTICE "\n"); |
545 | else | 559 | else |
@@ -548,20 +562,22 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
548 | 562 | ||
549 | if (oops_in_progress) { | 563 | if (oops_in_progress) { |
550 | /* Dump the current kernel stack */ | 564 | /* Dump the current kernel stack */ |
551 | printk(KERN_NOTICE "\n" KERN_NOTICE "Kernel Stack\n"); | 565 | verbose_printk(KERN_NOTICE "\n" KERN_NOTICE "Kernel Stack\n"); |
552 | show_stack(current, NULL); | 566 | show_stack(current, NULL); |
553 | |||
554 | print_modules(); | 567 | print_modules(); |
555 | #ifndef CONFIG_ACCESS_CHECK | 568 | #ifndef CONFIG_ACCESS_CHECK |
556 | printk(KERN_EMERG "Please turn on " | 569 | verbose_printk(KERN_EMERG "Please turn on " |
557 | "CONFIG_ACCESS_CHECK\n"); | 570 | "CONFIG_ACCESS_CHECK\n"); |
558 | #endif | 571 | #endif |
559 | panic("Kernel exception"); | 572 | panic("Kernel exception"); |
560 | } else { | 573 | } else { |
574 | #ifdef CONFIG_VERBOSE_DEBUG | ||
575 | unsigned long *stack; | ||
561 | /* Dump the user space stack */ | 576 | /* Dump the user space stack */ |
562 | stack = (unsigned long *)rdusp(); | 577 | stack = (unsigned long *)rdusp(); |
563 | printk(KERN_NOTICE "Userspace Stack\n"); | 578 | verbose_printk(KERN_NOTICE "Userspace Stack\n"); |
564 | show_stack(NULL, stack); | 579 | show_stack(NULL, stack); |
580 | #endif | ||
565 | } | 581 | } |
566 | } | 582 | } |
567 | 583 | ||
@@ -582,7 +598,7 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
582 | * Similar to get_user, do some address checking, then dereference | 598 | * Similar to get_user, do some address checking, then dereference |
583 | * Return true on sucess, false on bad address | 599 | * Return true on sucess, false on bad address |
584 | */ | 600 | */ |
585 | bool get_instruction(unsigned short *val, unsigned short *address) | 601 | static bool get_instruction(unsigned short *val, unsigned short *address) |
586 | { | 602 | { |
587 | 603 | ||
588 | unsigned long addr; | 604 | unsigned long addr; |
@@ -643,45 +659,48 @@ bool get_instruction(unsigned short *val, unsigned short *address) | |||
643 | * These are the normal instructions which cause change of flow, which | 659 | * These are the normal instructions which cause change of flow, which |
644 | * would be at the source of the trace buffer | 660 | * would be at the source of the trace buffer |
645 | */ | 661 | */ |
646 | void decode_instruction(unsigned short *address) | 662 | #ifdef CONFIG_DEBUG_VERBOSE |
663 | static void decode_instruction(unsigned short *address) | ||
647 | { | 664 | { |
648 | unsigned short opcode; | 665 | unsigned short opcode; |
649 | 666 | ||
650 | if (get_instruction(&opcode, address)) { | 667 | if (get_instruction(&opcode, address)) { |
651 | if (opcode == 0x0010) | 668 | if (opcode == 0x0010) |
652 | printk("RTS"); | 669 | verbose_printk("RTS"); |
653 | else if (opcode == 0x0011) | 670 | else if (opcode == 0x0011) |
654 | printk("RTI"); | 671 | verbose_printk("RTI"); |
655 | else if (opcode == 0x0012) | 672 | else if (opcode == 0x0012) |
656 | printk("RTX"); | 673 | verbose_printk("RTX"); |
657 | else if (opcode >= 0x0050 && opcode <= 0x0057) | 674 | else if (opcode >= 0x0050 && opcode <= 0x0057) |
658 | printk("JUMP (P%i)", opcode & 7); | 675 | verbose_printk("JUMP (P%i)", opcode & 7); |
659 | else if (opcode >= 0x0060 && opcode <= 0x0067) | 676 | else if (opcode >= 0x0060 && opcode <= 0x0067) |
660 | printk("CALL (P%i)", opcode & 7); | 677 | verbose_printk("CALL (P%i)", opcode & 7); |
661 | else if (opcode >= 0x0070 && opcode <= 0x0077) | 678 | else if (opcode >= 0x0070 && opcode <= 0x0077) |
662 | printk("CALL (PC+P%i)", opcode & 7); | 679 | verbose_printk("CALL (PC+P%i)", opcode & 7); |
663 | else if (opcode >= 0x0080 && opcode <= 0x0087) | 680 | else if (opcode >= 0x0080 && opcode <= 0x0087) |
664 | printk("JUMP (PC+P%i)", opcode & 7); | 681 | verbose_printk("JUMP (PC+P%i)", opcode & 7); |
665 | else if ((opcode >= 0x1000 && opcode <= 0x13FF) || (opcode >= 0x1800 && opcode <= 0x1BFF)) | 682 | else if ((opcode >= 0x1000 && opcode <= 0x13FF) || (opcode >= 0x1800 && opcode <= 0x1BFF)) |
666 | printk("IF !CC JUMP"); | 683 | verbose_printk("IF !CC JUMP"); |
667 | else if ((opcode >= 0x1400 && opcode <= 0x17ff) || (opcode >= 0x1c00 && opcode <= 0x1fff)) | 684 | else if ((opcode >= 0x1400 && opcode <= 0x17ff) || (opcode >= 0x1c00 && opcode <= 0x1fff)) |
668 | printk("IF CC JUMP"); | 685 | verbose_printk("IF CC JUMP"); |
669 | else if (opcode >= 0x2000 && opcode <= 0x2fff) | 686 | else if (opcode >= 0x2000 && opcode <= 0x2fff) |
670 | printk("JUMP.S"); | 687 | verbose_printk("JUMP.S"); |
671 | else if (opcode >= 0xe080 && opcode <= 0xe0ff) | 688 | else if (opcode >= 0xe080 && opcode <= 0xe0ff) |
672 | printk("LSETUP"); | 689 | verbose_printk("LSETUP"); |
673 | else if (opcode >= 0xe200 && opcode <= 0xe2ff) | 690 | else if (opcode >= 0xe200 && opcode <= 0xe2ff) |
674 | printk("JUMP.L"); | 691 | verbose_printk("JUMP.L"); |
675 | else if (opcode >= 0xe300 && opcode <= 0xe3ff) | 692 | else if (opcode >= 0xe300 && opcode <= 0xe3ff) |
676 | printk("CALL pcrel"); | 693 | verbose_printk("CALL pcrel"); |
677 | else | 694 | else |
678 | printk("0x%04x", opcode); | 695 | verbose_printk("0x%04x", opcode); |
679 | } | 696 | } |
680 | 697 | ||
681 | } | 698 | } |
699 | #endif | ||
682 | 700 | ||
683 | void dump_bfin_trace_buffer(void) | 701 | void dump_bfin_trace_buffer(void) |
684 | { | 702 | { |
703 | #ifdef CONFIG_DEBUG_VERBOSE | ||
685 | #ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON | 704 | #ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON |
686 | int tflags, i = 0; | 705 | int tflags, i = 0; |
687 | char buf[150]; | 706 | char buf[150]; |
@@ -737,6 +756,7 @@ void dump_bfin_trace_buffer(void) | |||
737 | 756 | ||
738 | trace_buffer_restore(tflags); | 757 | trace_buffer_restore(tflags); |
739 | #endif | 758 | #endif |
759 | #endif | ||
740 | } | 760 | } |
741 | EXPORT_SYMBOL(dump_bfin_trace_buffer); | 761 | EXPORT_SYMBOL(dump_bfin_trace_buffer); |
742 | 762 | ||
@@ -744,7 +764,7 @@ EXPORT_SYMBOL(dump_bfin_trace_buffer); | |||
744 | * Checks to see if the address pointed to is either a | 764 | * Checks to see if the address pointed to is either a |
745 | * 16-bit CALL instruction, or a 32-bit CALL instruction | 765 | * 16-bit CALL instruction, or a 32-bit CALL instruction |
746 | */ | 766 | */ |
747 | bool is_bfin_call(unsigned short *addr) | 767 | static bool is_bfin_call(unsigned short *addr) |
748 | { | 768 | { |
749 | unsigned short opcode = 0, *ins_addr; | 769 | unsigned short opcode = 0, *ins_addr; |
750 | ins_addr = (unsigned short *)addr; | 770 | ins_addr = (unsigned short *)addr; |
@@ -766,8 +786,10 @@ bool is_bfin_call(unsigned short *addr) | |||
766 | return false; | 786 | return false; |
767 | 787 | ||
768 | } | 788 | } |
789 | |||
769 | void show_stack(struct task_struct *task, unsigned long *stack) | 790 | void show_stack(struct task_struct *task, unsigned long *stack) |
770 | { | 791 | { |
792 | #ifdef CONFIG_PRINTK | ||
771 | unsigned int *addr, *endstack, *fp = 0, *frame; | 793 | unsigned int *addr, *endstack, *fp = 0, *frame; |
772 | unsigned short *ins_addr; | 794 | unsigned short *ins_addr; |
773 | char buf[150]; | 795 | char buf[150]; |
@@ -792,8 +814,10 @@ void show_stack(struct task_struct *task, unsigned long *stack) | |||
792 | } else | 814 | } else |
793 | endstack = (unsigned int *)PAGE_ALIGN((unsigned int)stack); | 815 | endstack = (unsigned int *)PAGE_ALIGN((unsigned int)stack); |
794 | 816 | ||
817 | printk(KERN_NOTICE "Stack info:\n"); | ||
795 | decode_address(buf, (unsigned int)stack); | 818 | decode_address(buf, (unsigned int)stack); |
796 | printk(KERN_NOTICE "Stack info:\n" KERN_NOTICE " SP: [0x%p] %s\n", stack, buf); | 819 | printk(KERN_NOTICE " SP: [0x%p] %s\n", stack, buf); |
820 | |||
797 | addr = (unsigned int *)((unsigned int)stack & ~0x3F); | 821 | addr = (unsigned int *)((unsigned int)stack & ~0x3F); |
798 | 822 | ||
799 | /* First thing is to look for a frame pointer */ | 823 | /* First thing is to look for a frame pointer */ |
@@ -884,7 +908,7 @@ void show_stack(struct task_struct *task, unsigned long *stack) | |||
884 | if (!j) | 908 | if (!j) |
885 | printk("\n"); | 909 | printk("\n"); |
886 | } | 910 | } |
887 | 911 | #endif | |
888 | } | 912 | } |
889 | 913 | ||
890 | void dump_stack(void) | 914 | void dump_stack(void) |
@@ -902,38 +926,39 @@ EXPORT_SYMBOL(dump_stack); | |||
902 | 926 | ||
903 | void dump_bfin_process(struct pt_regs *fp) | 927 | void dump_bfin_process(struct pt_regs *fp) |
904 | { | 928 | { |
929 | #ifdef CONFIG_DEBUG_VERBOSE | ||
905 | /* We should be able to look at fp->ipend, but we don't push it on the | 930 | /* We should be able to look at fp->ipend, but we don't push it on the |
906 | * stack all the time, so do this until we fix that */ | 931 | * stack all the time, so do this until we fix that */ |
907 | unsigned int context = bfin_read_IPEND(); | 932 | unsigned int context = bfin_read_IPEND(); |
908 | 933 | ||
909 | if (oops_in_progress) | 934 | if (oops_in_progress) |
910 | printk(KERN_EMERG "Kernel OOPS in progress\n"); | 935 | verbose_printk(KERN_EMERG "Kernel OOPS in progress\n"); |
911 | 936 | ||
912 | if (context & 0x0020 && (fp->seqstat & SEQSTAT_EXCAUSE) == VEC_HWERR) | 937 | if (context & 0x0020 && (fp->seqstat & SEQSTAT_EXCAUSE) == VEC_HWERR) |
913 | printk(KERN_NOTICE "HW Error context\n"); | 938 | verbose_printk(KERN_NOTICE "HW Error context\n"); |
914 | else if (context & 0x0020) | 939 | else if (context & 0x0020) |
915 | printk(KERN_NOTICE "Deferred Exception context\n"); | 940 | verbose_printk(KERN_NOTICE "Deferred Exception context\n"); |
916 | else if (context & 0x3FC0) | 941 | else if (context & 0x3FC0) |
917 | printk(KERN_NOTICE "Interrupt context\n"); | 942 | verbose_printk(KERN_NOTICE "Interrupt context\n"); |
918 | else if (context & 0x4000) | 943 | else if (context & 0x4000) |
919 | printk(KERN_NOTICE "Deferred Interrupt context\n"); | 944 | verbose_printk(KERN_NOTICE "Deferred Interrupt context\n"); |
920 | else if (context & 0x8000) | 945 | else if (context & 0x8000) |
921 | printk(KERN_NOTICE "Kernel process context\n"); | 946 | verbose_printk(KERN_NOTICE "Kernel process context\n"); |
922 | 947 | ||
923 | /* Because we are crashing, and pointers could be bad, we check things | 948 | /* Because we are crashing, and pointers could be bad, we check things |
924 | * pretty closely before we use them | 949 | * pretty closely before we use them |
925 | */ | 950 | */ |
926 | if ((unsigned long)current >= FIXED_CODE_START && | 951 | if ((unsigned long)current >= FIXED_CODE_START && |
927 | !((unsigned long)current & 0x3) && current->pid) { | 952 | !((unsigned long)current & 0x3) && current->pid) { |
928 | printk(KERN_NOTICE "CURRENT PROCESS:\n"); | 953 | verbose_printk(KERN_NOTICE "CURRENT PROCESS:\n"); |
929 | if (current->comm >= (char *)FIXED_CODE_START) | 954 | if (current->comm >= (char *)FIXED_CODE_START) |
930 | printk(KERN_NOTICE "COMM=%s PID=%d\n", | 955 | verbose_printk(KERN_NOTICE "COMM=%s PID=%d\n", |
931 | current->comm, current->pid); | 956 | current->comm, current->pid); |
932 | else | 957 | else |
933 | printk(KERN_NOTICE "COMM= invalid\n"); | 958 | verbose_printk(KERN_NOTICE "COMM= invalid\n"); |
934 | 959 | ||
935 | if (!((unsigned long)current->mm & 0x3) && (unsigned long)current->mm >= FIXED_CODE_START) | 960 | if (!((unsigned long)current->mm & 0x3) && (unsigned long)current->mm >= FIXED_CODE_START) |
936 | printk(KERN_NOTICE "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n" | 961 | verbose_printk(KERN_NOTICE "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n" |
937 | KERN_NOTICE " BSS = 0x%p-0x%p USER-STACK = 0x%p\n" | 962 | KERN_NOTICE " BSS = 0x%p-0x%p USER-STACK = 0x%p\n" |
938 | KERN_NOTICE "\n", | 963 | KERN_NOTICE "\n", |
939 | (void *)current->mm->start_code, | 964 | (void *)current->mm->start_code, |
@@ -944,26 +969,28 @@ void dump_bfin_process(struct pt_regs *fp) | |||
944 | (void *)current->mm->brk, | 969 | (void *)current->mm->brk, |
945 | (void *)current->mm->start_stack); | 970 | (void *)current->mm->start_stack); |
946 | else | 971 | else |
947 | printk(KERN_NOTICE "invalid mm\n"); | 972 | verbose_printk(KERN_NOTICE "invalid mm\n"); |
948 | } else | 973 | } else |
949 | printk(KERN_NOTICE "\n" KERN_NOTICE | 974 | verbose_printk(KERN_NOTICE "\n" KERN_NOTICE |
950 | "No Valid process in current context\n"); | 975 | "No Valid process in current context\n"); |
976 | #endif | ||
951 | } | 977 | } |
952 | 978 | ||
953 | void dump_bfin_mem(struct pt_regs *fp) | 979 | void dump_bfin_mem(struct pt_regs *fp) |
954 | { | 980 | { |
981 | #ifdef CONFIG_DEBUG_VERBOSE | ||
955 | unsigned short *addr, *erraddr, val = 0, err = 0; | 982 | unsigned short *addr, *erraddr, val = 0, err = 0; |
956 | char sti = 0, buf[6]; | 983 | char sti = 0, buf[6]; |
957 | 984 | ||
958 | erraddr = (void *)fp->pc; | 985 | erraddr = (void *)fp->pc; |
959 | 986 | ||
960 | printk(KERN_NOTICE "return address: [0x%p]; contents of:", erraddr); | 987 | verbose_printk(KERN_NOTICE "return address: [0x%p]; contents of:", erraddr); |
961 | 988 | ||
962 | for (addr = (unsigned short *)((unsigned long)erraddr & ~0xF) - 0x10; | 989 | for (addr = (unsigned short *)((unsigned long)erraddr & ~0xF) - 0x10; |
963 | addr < (unsigned short *)((unsigned long)erraddr & ~0xF) + 0x10; | 990 | addr < (unsigned short *)((unsigned long)erraddr & ~0xF) + 0x10; |
964 | addr++) { | 991 | addr++) { |
965 | if (!((unsigned long)addr & 0xF)) | 992 | if (!((unsigned long)addr & 0xF)) |
966 | printk("\n" KERN_NOTICE "0x%p: ", addr); | 993 | verbose_printk("\n" KERN_NOTICE "0x%p: ", addr); |
967 | 994 | ||
968 | if (!get_instruction(&val, addr)) { | 995 | if (!get_instruction(&val, addr)) { |
969 | val = 0; | 996 | val = 0; |
@@ -972,10 +999,10 @@ void dump_bfin_mem(struct pt_regs *fp) | |||
972 | sprintf(buf, "%04x", val); | 999 | sprintf(buf, "%04x", val); |
973 | 1000 | ||
974 | if (addr == erraddr) { | 1001 | if (addr == erraddr) { |
975 | printk("[%s]", buf); | 1002 | verbose_printk("[%s]", buf); |
976 | err = val; | 1003 | err = val; |
977 | } else | 1004 | } else |
978 | printk(" %s ", buf); | 1005 | verbose_printk(" %s ", buf); |
979 | 1006 | ||
980 | /* Do any previous instructions turn on interrupts? */ | 1007 | /* Do any previous instructions turn on interrupts? */ |
981 | if (addr <= erraddr && /* in the past */ | 1008 | if (addr <= erraddr && /* in the past */ |
@@ -984,14 +1011,14 @@ void dump_bfin_mem(struct pt_regs *fp) | |||
984 | sti = 1; | 1011 | sti = 1; |
985 | } | 1012 | } |
986 | 1013 | ||
987 | printk("\n"); | 1014 | verbose_printk("\n"); |
988 | 1015 | ||
989 | /* Hardware error interrupts can be deferred */ | 1016 | /* Hardware error interrupts can be deferred */ |
990 | if (unlikely(sti && (fp->seqstat & SEQSTAT_EXCAUSE) == VEC_HWERR && | 1017 | if (unlikely(sti && (fp->seqstat & SEQSTAT_EXCAUSE) == VEC_HWERR && |
991 | oops_in_progress)){ | 1018 | oops_in_progress)){ |
992 | printk(KERN_NOTICE "Looks like this was a deferred error - sorry\n"); | 1019 | verbose_printk(KERN_NOTICE "Looks like this was a deferred error - sorry\n"); |
993 | #ifndef CONFIG_DEBUG_HWERR | 1020 | #ifndef CONFIG_DEBUG_HWERR |
994 | printk(KERN_NOTICE "The remaining message may be meaningless\n" | 1021 | verbose_printk(KERN_NOTICE "The remaining message may be meaningless\n" |
995 | KERN_NOTICE "You should enable CONFIG_DEBUG_HWERR to get a" | 1022 | KERN_NOTICE "You should enable CONFIG_DEBUG_HWERR to get a" |
996 | " better idea where it came from\n"); | 1023 | " better idea where it came from\n"); |
997 | #else | 1024 | #else |
@@ -1005,45 +1032,47 @@ void dump_bfin_mem(struct pt_regs *fp) | |||
1005 | /* And the last RETI points to the current userspace context */ | 1032 | /* And the last RETI points to the current userspace context */ |
1006 | if ((fp + 1)->pc >= current->mm->start_code && | 1033 | if ((fp + 1)->pc >= current->mm->start_code && |
1007 | (fp + 1)->pc <= current->mm->end_code) { | 1034 | (fp + 1)->pc <= current->mm->end_code) { |
1008 | printk(KERN_NOTICE "It might be better to look around here : \n"); | 1035 | verbose_printk(KERN_NOTICE "It might be better to look around here : \n"); |
1009 | printk(KERN_NOTICE "-------------------------------------------\n"); | 1036 | verbose_printk(KERN_NOTICE "-------------------------------------------\n"); |
1010 | show_regs(fp + 1); | 1037 | show_regs(fp + 1); |
1011 | printk(KERN_NOTICE "-------------------------------------------\n"); | 1038 | verbose_printk(KERN_NOTICE "-------------------------------------------\n"); |
1012 | } | 1039 | } |
1013 | } | 1040 | } |
1014 | #endif | 1041 | #endif |
1015 | } | 1042 | } |
1043 | #endif | ||
1016 | } | 1044 | } |
1017 | 1045 | ||
1018 | void show_regs(struct pt_regs *fp) | 1046 | void show_regs(struct pt_regs *fp) |
1019 | { | 1047 | { |
1048 | #ifdef CONFIG_DEBUG_VERBOSE | ||
1020 | char buf [150]; | 1049 | char buf [150]; |
1021 | struct irqaction *action; | 1050 | struct irqaction *action; |
1022 | unsigned int i; | 1051 | unsigned int i; |
1023 | unsigned long flags; | 1052 | unsigned long flags; |
1024 | 1053 | ||
1025 | printk(KERN_NOTICE "\n" KERN_NOTICE "SEQUENCER STATUS:\t\t%s\n", print_tainted()); | 1054 | verbose_printk(KERN_NOTICE "\n" KERN_NOTICE "SEQUENCER STATUS:\t\t%s\n", print_tainted()); |
1026 | printk(KERN_NOTICE " SEQSTAT: %08lx IPEND: %04lx SYSCFG: %04lx\n", | 1055 | verbose_printk(KERN_NOTICE " SEQSTAT: %08lx IPEND: %04lx SYSCFG: %04lx\n", |
1027 | (long)fp->seqstat, fp->ipend, fp->syscfg); | 1056 | (long)fp->seqstat, fp->ipend, fp->syscfg); |
1028 | if ((fp->seqstat & SEQSTAT_EXCAUSE) == VEC_HWERR) { | 1057 | if ((fp->seqstat & SEQSTAT_EXCAUSE) == VEC_HWERR) { |
1029 | printk(KERN_NOTICE " HWERRCAUSE: 0x%lx\n", | 1058 | verbose_printk(KERN_NOTICE " HWERRCAUSE: 0x%lx\n", |
1030 | (fp->seqstat & SEQSTAT_HWERRCAUSE) >> 14); | 1059 | (fp->seqstat & SEQSTAT_HWERRCAUSE) >> 14); |
1031 | #ifdef EBIU_ERRMST | 1060 | #ifdef EBIU_ERRMST |
1032 | /* If the error was from the EBIU, print it out */ | 1061 | /* If the error was from the EBIU, print it out */ |
1033 | if (bfin_read_EBIU_ERRMST() & CORE_ERROR) { | 1062 | if (bfin_read_EBIU_ERRMST() & CORE_ERROR) { |
1034 | printk(KERN_NOTICE " EBIU Error Reason : 0x%04x\n", | 1063 | verbose_printk(KERN_NOTICE " EBIU Error Reason : 0x%04x\n", |
1035 | bfin_read_EBIU_ERRMST()); | 1064 | bfin_read_EBIU_ERRMST()); |
1036 | printk(KERN_NOTICE " EBIU Error Address : 0x%08x\n", | 1065 | verbose_printk(KERN_NOTICE " EBIU Error Address : 0x%08x\n", |
1037 | bfin_read_EBIU_ERRADD()); | 1066 | bfin_read_EBIU_ERRADD()); |
1038 | } | 1067 | } |
1039 | #endif | 1068 | #endif |
1040 | } | 1069 | } |
1041 | printk(KERN_NOTICE " EXCAUSE : 0x%lx\n", | 1070 | verbose_printk(KERN_NOTICE " EXCAUSE : 0x%lx\n", |
1042 | fp->seqstat & SEQSTAT_EXCAUSE); | 1071 | fp->seqstat & SEQSTAT_EXCAUSE); |
1043 | for (i = 6; i <= 15 ; i++) { | 1072 | for (i = 6; i <= 15 ; i++) { |
1044 | if (fp->ipend & (1 << i)) { | 1073 | if (fp->ipend & (1 << i)) { |
1045 | decode_address(buf, bfin_read32(EVT0 + 4*i)); | 1074 | decode_address(buf, bfin_read32(EVT0 + 4*i)); |
1046 | printk(KERN_NOTICE " physical IVG%i asserted : %s\n", i, buf); | 1075 | verbose_printk(KERN_NOTICE " physical IVG%i asserted : %s\n", i, buf); |
1047 | } | 1076 | } |
1048 | } | 1077 | } |
1049 | 1078 | ||
@@ -1056,64 +1085,65 @@ void show_regs(struct pt_regs *fp) | |||
1056 | goto unlock; | 1085 | goto unlock; |
1057 | 1086 | ||
1058 | decode_address(buf, (unsigned int)action->handler); | 1087 | decode_address(buf, (unsigned int)action->handler); |
1059 | printk(KERN_NOTICE " logical irq %3d mapped : %s", i, buf); | 1088 | verbose_printk(KERN_NOTICE " logical irq %3d mapped : %s", i, buf); |
1060 | for (action = action->next; action; action = action->next) { | 1089 | for (action = action->next; action; action = action->next) { |
1061 | decode_address(buf, (unsigned int)action->handler); | 1090 | decode_address(buf, (unsigned int)action->handler); |
1062 | printk(", %s", buf); | 1091 | verbose_printk(", %s", buf); |
1063 | } | 1092 | } |
1064 | printk("\n"); | 1093 | verbose_printk("\n"); |
1065 | unlock: | 1094 | unlock: |
1066 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 1095 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); |
1067 | } | 1096 | } |
1068 | } | 1097 | } |
1069 | 1098 | ||
1070 | decode_address(buf, fp->rete); | 1099 | decode_address(buf, fp->rete); |
1071 | printk(KERN_NOTICE " RETE: %s\n", buf); | 1100 | verbose_printk(KERN_NOTICE " RETE: %s\n", buf); |
1072 | decode_address(buf, fp->retn); | 1101 | decode_address(buf, fp->retn); |
1073 | printk(KERN_NOTICE " RETN: %s\n", buf); | 1102 | verbose_printk(KERN_NOTICE " RETN: %s\n", buf); |
1074 | decode_address(buf, fp->retx); | 1103 | decode_address(buf, fp->retx); |
1075 | printk(KERN_NOTICE " RETX: %s\n", buf); | 1104 | verbose_printk(KERN_NOTICE " RETX: %s\n", buf); |
1076 | decode_address(buf, fp->rets); | 1105 | decode_address(buf, fp->rets); |
1077 | printk(KERN_NOTICE " RETS: %s\n", buf); | 1106 | verbose_printk(KERN_NOTICE " RETS: %s\n", buf); |
1078 | decode_address(buf, fp->pc); | 1107 | decode_address(buf, fp->pc); |
1079 | printk(KERN_NOTICE " PC : %s\n", buf); | 1108 | verbose_printk(KERN_NOTICE " PC : %s\n", buf); |
1080 | 1109 | ||
1081 | if (((long)fp->seqstat & SEQSTAT_EXCAUSE) && | 1110 | if (((long)fp->seqstat & SEQSTAT_EXCAUSE) && |
1082 | (((long)fp->seqstat & SEQSTAT_EXCAUSE) != VEC_HWERR)) { | 1111 | (((long)fp->seqstat & SEQSTAT_EXCAUSE) != VEC_HWERR)) { |
1083 | decode_address(buf, saved_dcplb_fault_addr); | 1112 | decode_address(buf, saved_dcplb_fault_addr); |
1084 | printk(KERN_NOTICE "DCPLB_FAULT_ADDR: %s\n", buf); | 1113 | verbose_printk(KERN_NOTICE "DCPLB_FAULT_ADDR: %s\n", buf); |
1085 | decode_address(buf, saved_icplb_fault_addr); | 1114 | decode_address(buf, saved_icplb_fault_addr); |
1086 | printk(KERN_NOTICE "ICPLB_FAULT_ADDR: %s\n", buf); | 1115 | verbose_printk(KERN_NOTICE "ICPLB_FAULT_ADDR: %s\n", buf); |
1087 | } | 1116 | } |
1088 | 1117 | ||
1089 | printk(KERN_NOTICE "\n" KERN_NOTICE "PROCESSOR STATE:\n"); | 1118 | verbose_printk(KERN_NOTICE "\n" KERN_NOTICE "PROCESSOR STATE:\n"); |
1090 | printk(KERN_NOTICE " R0 : %08lx R1 : %08lx R2 : %08lx R3 : %08lx\n", | 1119 | verbose_printk(KERN_NOTICE " R0 : %08lx R1 : %08lx R2 : %08lx R3 : %08lx\n", |
1091 | fp->r0, fp->r1, fp->r2, fp->r3); | 1120 | fp->r0, fp->r1, fp->r2, fp->r3); |
1092 | printk(KERN_NOTICE " R4 : %08lx R5 : %08lx R6 : %08lx R7 : %08lx\n", | 1121 | verbose_printk(KERN_NOTICE " R4 : %08lx R5 : %08lx R6 : %08lx R7 : %08lx\n", |
1093 | fp->r4, fp->r5, fp->r6, fp->r7); | 1122 | fp->r4, fp->r5, fp->r6, fp->r7); |
1094 | printk(KERN_NOTICE " P0 : %08lx P1 : %08lx P2 : %08lx P3 : %08lx\n", | 1123 | verbose_printk(KERN_NOTICE " P0 : %08lx P1 : %08lx P2 : %08lx P3 : %08lx\n", |
1095 | fp->p0, fp->p1, fp->p2, fp->p3); | 1124 | fp->p0, fp->p1, fp->p2, fp->p3); |
1096 | printk(KERN_NOTICE " P4 : %08lx P5 : %08lx FP : %08lx SP : %08lx\n", | 1125 | verbose_printk(KERN_NOTICE " P4 : %08lx P5 : %08lx FP : %08lx SP : %08lx\n", |
1097 | fp->p4, fp->p5, fp->fp, (long)fp); | 1126 | fp->p4, fp->p5, fp->fp, (long)fp); |
1098 | printk(KERN_NOTICE " LB0: %08lx LT0: %08lx LC0: %08lx\n", | 1127 | verbose_printk(KERN_NOTICE " LB0: %08lx LT0: %08lx LC0: %08lx\n", |
1099 | fp->lb0, fp->lt0, fp->lc0); | 1128 | fp->lb0, fp->lt0, fp->lc0); |
1100 | printk(KERN_NOTICE " LB1: %08lx LT1: %08lx LC1: %08lx\n", | 1129 | verbose_printk(KERN_NOTICE " LB1: %08lx LT1: %08lx LC1: %08lx\n", |
1101 | fp->lb1, fp->lt1, fp->lc1); | 1130 | fp->lb1, fp->lt1, fp->lc1); |
1102 | printk(KERN_NOTICE " B0 : %08lx L0 : %08lx M0 : %08lx I0 : %08lx\n", | 1131 | verbose_printk(KERN_NOTICE " B0 : %08lx L0 : %08lx M0 : %08lx I0 : %08lx\n", |
1103 | fp->b0, fp->l0, fp->m0, fp->i0); | 1132 | fp->b0, fp->l0, fp->m0, fp->i0); |
1104 | printk(KERN_NOTICE " B1 : %08lx L1 : %08lx M1 : %08lx I1 : %08lx\n", | 1133 | verbose_printk(KERN_NOTICE " B1 : %08lx L1 : %08lx M1 : %08lx I1 : %08lx\n", |
1105 | fp->b1, fp->l1, fp->m1, fp->i1); | 1134 | fp->b1, fp->l1, fp->m1, fp->i1); |
1106 | printk(KERN_NOTICE " B2 : %08lx L2 : %08lx M2 : %08lx I2 : %08lx\n", | 1135 | verbose_printk(KERN_NOTICE " B2 : %08lx L2 : %08lx M2 : %08lx I2 : %08lx\n", |
1107 | fp->b2, fp->l2, fp->m2, fp->i2); | 1136 | fp->b2, fp->l2, fp->m2, fp->i2); |
1108 | printk(KERN_NOTICE " B3 : %08lx L3 : %08lx M3 : %08lx I3 : %08lx\n", | 1137 | verbose_printk(KERN_NOTICE " B3 : %08lx L3 : %08lx M3 : %08lx I3 : %08lx\n", |
1109 | fp->b3, fp->l3, fp->m3, fp->i3); | 1138 | fp->b3, fp->l3, fp->m3, fp->i3); |
1110 | printk(KERN_NOTICE "A0.w: %08lx A0.x: %08lx A1.w: %08lx A1.x: %08lx\n", | 1139 | verbose_printk(KERN_NOTICE "A0.w: %08lx A0.x: %08lx A1.w: %08lx A1.x: %08lx\n", |
1111 | fp->a0w, fp->a0x, fp->a1w, fp->a1x); | 1140 | fp->a0w, fp->a0x, fp->a1w, fp->a1x); |
1112 | 1141 | ||
1113 | printk(KERN_NOTICE "USP : %08lx ASTAT: %08lx\n", | 1142 | verbose_printk(KERN_NOTICE "USP : %08lx ASTAT: %08lx\n", |
1114 | rdusp(), fp->astat); | 1143 | rdusp(), fp->astat); |
1115 | 1144 | ||
1116 | printk(KERN_NOTICE "\n"); | 1145 | verbose_printk(KERN_NOTICE "\n"); |
1146 | #endif | ||
1117 | } | 1147 | } |
1118 | 1148 | ||
1119 | #ifdef CONFIG_SYS_BFIN_SPINLOCK_L1 | 1149 | #ifdef CONFIG_SYS_BFIN_SPINLOCK_L1 |