diff options
Diffstat (limited to 'arch/blackfin/kernel/traps.c')
-rw-r--r-- | arch/blackfin/kernel/traps.c | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 8eeb457ce5d5..bf2b2d1f8ae5 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c | |||
@@ -212,7 +212,7 @@ asmlinkage void double_fault_c(struct pt_regs *fp) | |||
212 | console_verbose(); | 212 | console_verbose(); |
213 | oops_in_progress = 1; | 213 | oops_in_progress = 1; |
214 | #ifdef CONFIG_DEBUG_VERBOSE | 214 | #ifdef CONFIG_DEBUG_VERBOSE |
215 | printk(KERN_EMERG "\n" KERN_EMERG "Double Fault\n"); | 215 | printk(KERN_EMERG "Double Fault\n"); |
216 | #ifdef CONFIG_DEBUG_DOUBLEFAULT_PRINT | 216 | #ifdef CONFIG_DEBUG_DOUBLEFAULT_PRINT |
217 | if (((long)fp->seqstat & SEQSTAT_EXCAUSE) == VEC_UNCOV) { | 217 | if (((long)fp->seqstat & SEQSTAT_EXCAUSE) == VEC_UNCOV) { |
218 | unsigned int cpu = smp_processor_id(); | 218 | unsigned int cpu = smp_processor_id(); |
@@ -570,11 +570,12 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
570 | if (kernel_mode_regs(fp) || (current && !current->mm)) { | 570 | if (kernel_mode_regs(fp) || (current && !current->mm)) { |
571 | console_verbose(); | 571 | console_verbose(); |
572 | oops_in_progress = 1; | 572 | oops_in_progress = 1; |
573 | if (strerror) | ||
574 | verbose_printk(strerror); | ||
575 | } | 573 | } |
576 | 574 | ||
577 | if (sig != SIGTRAP) { | 575 | if (sig != SIGTRAP) { |
576 | if (strerror) | ||
577 | verbose_printk(strerror); | ||
578 | |||
578 | dump_bfin_process(fp); | 579 | dump_bfin_process(fp); |
579 | dump_bfin_mem(fp); | 580 | dump_bfin_mem(fp); |
580 | show_regs(fp); | 581 | show_regs(fp); |
@@ -583,15 +584,14 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
583 | #ifndef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE | 584 | #ifndef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE |
584 | if (trapnr == VEC_CPLB_I_M || trapnr == VEC_CPLB_M) | 585 | if (trapnr == VEC_CPLB_I_M || trapnr == VEC_CPLB_M) |
585 | verbose_printk(KERN_NOTICE "No trace since you do not have " | 586 | verbose_printk(KERN_NOTICE "No trace since you do not have " |
586 | "CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE enabled\n" | 587 | "CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE enabled\n\n"); |
587 | KERN_NOTICE "\n"); | ||
588 | else | 588 | else |
589 | #endif | 589 | #endif |
590 | dump_bfin_trace_buffer(); | 590 | dump_bfin_trace_buffer(); |
591 | 591 | ||
592 | if (oops_in_progress) { | 592 | if (oops_in_progress) { |
593 | /* Dump the current kernel stack */ | 593 | /* Dump the current kernel stack */ |
594 | verbose_printk(KERN_NOTICE "\n" KERN_NOTICE "Kernel Stack\n"); | 594 | verbose_printk(KERN_NOTICE "Kernel Stack\n"); |
595 | show_stack(current, NULL); | 595 | show_stack(current, NULL); |
596 | print_modules(); | 596 | print_modules(); |
597 | #ifndef CONFIG_ACCESS_CHECK | 597 | #ifndef CONFIG_ACCESS_CHECK |
@@ -620,7 +620,9 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
620 | force_sig_info(sig, &info, current); | 620 | force_sig_info(sig, &info, current); |
621 | } | 621 | } |
622 | 622 | ||
623 | if (ANOMALY_05000461 && trapnr == VEC_HWERR && !access_ok(VERIFY_READ, fp->pc, 8)) | 623 | if ((ANOMALY_05000461 && trapnr == VEC_HWERR && !access_ok(VERIFY_READ, fp->pc, 8)) || |
624 | (ANOMALY_05000281 && trapnr == VEC_HWERR) || | ||
625 | (ANOMALY_05000189 && (trapnr == VEC_CPLB_I_VL || trapnr == VEC_CPLB_VL))) | ||
624 | fp->pc = SAFE_USER_INSTRUCTION; | 626 | fp->pc = SAFE_USER_INSTRUCTION; |
625 | 627 | ||
626 | traps_done: | 628 | traps_done: |
@@ -906,7 +908,7 @@ void show_stack(struct task_struct *task, unsigned long *stack) | |||
906 | 908 | ||
907 | ret_addr = 0; | 909 | ret_addr = 0; |
908 | if (!j && i % 8 == 0) | 910 | if (!j && i % 8 == 0) |
909 | printk("\n" KERN_NOTICE "%p:",addr); | 911 | printk(KERN_NOTICE "%p:",addr); |
910 | 912 | ||
911 | /* if it is an odd address, or zero, just skip it */ | 913 | /* if it is an odd address, or zero, just skip it */ |
912 | if (*addr & 0x1 || !*addr) | 914 | if (*addr & 0x1 || !*addr) |
@@ -996,9 +998,9 @@ void dump_bfin_process(struct pt_regs *fp) | |||
996 | 998 | ||
997 | printk(KERN_NOTICE "CPU = %d\n", current_thread_info()->cpu); | 999 | printk(KERN_NOTICE "CPU = %d\n", current_thread_info()->cpu); |
998 | if (!((unsigned long)current->mm & 0x3) && (unsigned long)current->mm >= FIXED_CODE_START) | 1000 | if (!((unsigned long)current->mm & 0x3) && (unsigned long)current->mm >= FIXED_CODE_START) |
999 | verbose_printk(KERN_NOTICE "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n" | 1001 | verbose_printk(KERN_NOTICE |
1000 | KERN_NOTICE " BSS = 0x%p-0x%p USER-STACK = 0x%p\n" | 1002 | "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n" |
1001 | KERN_NOTICE "\n", | 1003 | " BSS = 0x%p-0x%p USER-STACK = 0x%p\n\n", |
1002 | (void *)current->mm->start_code, | 1004 | (void *)current->mm->start_code, |
1003 | (void *)current->mm->end_code, | 1005 | (void *)current->mm->end_code, |
1004 | (void *)current->mm->start_data, | 1006 | (void *)current->mm->start_data, |
@@ -1009,8 +1011,8 @@ void dump_bfin_process(struct pt_regs *fp) | |||
1009 | else | 1011 | else |
1010 | verbose_printk(KERN_NOTICE "invalid mm\n"); | 1012 | verbose_printk(KERN_NOTICE "invalid mm\n"); |
1011 | } else | 1013 | } else |
1012 | verbose_printk(KERN_NOTICE "\n" KERN_NOTICE | 1014 | verbose_printk(KERN_NOTICE |
1013 | "No Valid process in current context\n"); | 1015 | "No Valid process in current context\n"); |
1014 | #endif | 1016 | #endif |
1015 | } | 1017 | } |
1016 | 1018 | ||
@@ -1028,7 +1030,7 @@ void dump_bfin_mem(struct pt_regs *fp) | |||
1028 | addr < (unsigned short *)((unsigned long)erraddr & ~0xF) + 0x10; | 1030 | addr < (unsigned short *)((unsigned long)erraddr & ~0xF) + 0x10; |
1029 | addr++) { | 1031 | addr++) { |
1030 | if (!((unsigned long)addr & 0xF)) | 1032 | if (!((unsigned long)addr & 0xF)) |
1031 | verbose_printk("\n" KERN_NOTICE "0x%p: ", addr); | 1033 | verbose_printk(KERN_NOTICE "0x%p: ", addr); |
1032 | 1034 | ||
1033 | if (!get_instruction(&val, addr)) { | 1035 | if (!get_instruction(&val, addr)) { |
1034 | val = 0; | 1036 | val = 0; |
@@ -1056,9 +1058,9 @@ void dump_bfin_mem(struct pt_regs *fp) | |||
1056 | oops_in_progress)){ | 1058 | oops_in_progress)){ |
1057 | verbose_printk(KERN_NOTICE "Looks like this was a deferred error - sorry\n"); | 1059 | verbose_printk(KERN_NOTICE "Looks like this was a deferred error - sorry\n"); |
1058 | #ifndef CONFIG_DEBUG_HWERR | 1060 | #ifndef CONFIG_DEBUG_HWERR |
1059 | verbose_printk(KERN_NOTICE "The remaining message may be meaningless\n" | 1061 | verbose_printk(KERN_NOTICE |
1060 | KERN_NOTICE "You should enable CONFIG_DEBUG_HWERR to get a" | 1062 | "The remaining message may be meaningless\n" |
1061 | " better idea where it came from\n"); | 1063 | "You should enable CONFIG_DEBUG_HWERR to get a better idea where it came from\n"); |
1062 | #else | 1064 | #else |
1063 | /* If we are handling only one peripheral interrupt | 1065 | /* If we are handling only one peripheral interrupt |
1064 | * and current mm and pid are valid, and the last error | 1066 | * and current mm and pid are valid, and the last error |
@@ -1114,9 +1116,10 @@ void show_regs(struct pt_regs *fp) | |||
1114 | 1116 | ||
1115 | verbose_printk(KERN_NOTICE "%s", linux_banner); | 1117 | verbose_printk(KERN_NOTICE "%s", linux_banner); |
1116 | 1118 | ||
1117 | verbose_printk(KERN_NOTICE "\n" KERN_NOTICE "SEQUENCER STATUS:\t\t%s\n", print_tainted()); | 1119 | verbose_printk(KERN_NOTICE "\nSEQUENCER STATUS:\t\t%s\n", |
1120 | print_tainted()); | ||
1118 | verbose_printk(KERN_NOTICE " SEQSTAT: %08lx IPEND: %04lx SYSCFG: %04lx\n", | 1121 | verbose_printk(KERN_NOTICE " SEQSTAT: %08lx IPEND: %04lx SYSCFG: %04lx\n", |
1119 | (long)fp->seqstat, fp->ipend, fp->syscfg); | 1122 | (long)fp->seqstat, fp->ipend, fp->syscfg); |
1120 | if ((fp->seqstat & SEQSTAT_EXCAUSE) == VEC_HWERR) { | 1123 | if ((fp->seqstat & SEQSTAT_EXCAUSE) == VEC_HWERR) { |
1121 | verbose_printk(KERN_NOTICE " HWERRCAUSE: 0x%lx\n", | 1124 | verbose_printk(KERN_NOTICE " HWERRCAUSE: 0x%lx\n", |
1122 | (fp->seqstat & SEQSTAT_HWERRCAUSE) >> 14); | 1125 | (fp->seqstat & SEQSTAT_HWERRCAUSE) >> 14); |
@@ -1184,7 +1187,7 @@ unlock: | |||
1184 | verbose_printk(KERN_NOTICE "ICPLB_FAULT_ADDR: %s\n", buf); | 1187 | verbose_printk(KERN_NOTICE "ICPLB_FAULT_ADDR: %s\n", buf); |
1185 | } | 1188 | } |
1186 | 1189 | ||
1187 | verbose_printk(KERN_NOTICE "\n" KERN_NOTICE "PROCESSOR STATE:\n"); | 1190 | verbose_printk(KERN_NOTICE "PROCESSOR STATE:\n"); |
1188 | verbose_printk(KERN_NOTICE " R0 : %08lx R1 : %08lx R2 : %08lx R3 : %08lx\n", | 1191 | verbose_printk(KERN_NOTICE " R0 : %08lx R1 : %08lx R2 : %08lx R3 : %08lx\n", |
1189 | fp->r0, fp->r1, fp->r2, fp->r3); | 1192 | fp->r0, fp->r1, fp->r2, fp->r3); |
1190 | verbose_printk(KERN_NOTICE " R4 : %08lx R5 : %08lx R6 : %08lx R7 : %08lx\n", | 1193 | verbose_printk(KERN_NOTICE " R4 : %08lx R5 : %08lx R6 : %08lx R7 : %08lx\n", |