diff options
Diffstat (limited to 'arch/mips/kernel/traps.c')
-rw-r--r-- | arch/mips/kernel/traps.c | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 4901f0a37fca..ad16eceb24dd 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -65,7 +65,7 @@ extern asmlinkage void handle_mcheck(void); | |||
65 | extern asmlinkage void handle_reserved(void); | 65 | extern asmlinkage void handle_reserved(void); |
66 | 66 | ||
67 | extern int fpu_emulator_cop1Handler(struct pt_regs *xcp, | 67 | extern int fpu_emulator_cop1Handler(struct pt_regs *xcp, |
68 | struct mips_fpu_soft_struct *ctx); | 68 | struct mips_fpu_struct *ctx); |
69 | 69 | ||
70 | void (*board_be_init)(void); | 70 | void (*board_be_init)(void); |
71 | int (*board_be_handler)(struct pt_regs *regs, int is_fixup); | 71 | int (*board_be_handler)(struct pt_regs *regs, int is_fixup); |
@@ -600,8 +600,7 @@ asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31) | |||
600 | preempt_enable(); | 600 | preempt_enable(); |
601 | 601 | ||
602 | /* Run the emulator */ | 602 | /* Run the emulator */ |
603 | sig = fpu_emulator_cop1Handler (regs, | 603 | sig = fpu_emulator_cop1Handler (regs, ¤t->thread.fpu); |
604 | ¤t->thread.fpu.soft); | ||
605 | 604 | ||
606 | preempt_disable(); | 605 | preempt_disable(); |
607 | 606 | ||
@@ -610,7 +609,7 @@ asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31) | |||
610 | * We can't allow the emulated instruction to leave any of | 609 | * We can't allow the emulated instruction to leave any of |
611 | * the cause bit set in $fcr31. | 610 | * the cause bit set in $fcr31. |
612 | */ | 611 | */ |
613 | current->thread.fpu.soft.fcr31 &= ~FPU_CSR_ALL_X; | 612 | current->thread.fpu.fcr31 &= ~FPU_CSR_ALL_X; |
614 | 613 | ||
615 | /* Restore the hardware register state */ | 614 | /* Restore the hardware register state */ |
616 | restore_fp(current); | 615 | restore_fp(current); |
@@ -755,7 +754,7 @@ asmlinkage void do_cpu(struct pt_regs *regs) | |||
755 | 754 | ||
756 | if (!cpu_has_fpu) { | 755 | if (!cpu_has_fpu) { |
757 | int sig = fpu_emulator_cop1Handler(regs, | 756 | int sig = fpu_emulator_cop1Handler(regs, |
758 | ¤t->thread.fpu.soft); | 757 | ¤t->thread.fpu); |
759 | if (sig) | 758 | if (sig) |
760 | force_sig(sig, current); | 759 | force_sig(sig, current); |
761 | #ifdef CONFIG_MIPS_MT_FPAFF | 760 | #ifdef CONFIG_MIPS_MT_FPAFF |
@@ -819,15 +818,30 @@ asmlinkage void do_watch(struct pt_regs *regs) | |||
819 | 818 | ||
820 | asmlinkage void do_mcheck(struct pt_regs *regs) | 819 | asmlinkage void do_mcheck(struct pt_regs *regs) |
821 | { | 820 | { |
821 | const int field = 2 * sizeof(unsigned long); | ||
822 | int multi_match = regs->cp0_status & ST0_TS; | ||
823 | |||
822 | show_regs(regs); | 824 | show_regs(regs); |
823 | dump_tlb_all(); | 825 | |
826 | if (multi_match) { | ||
827 | printk("Index : %0x\n", read_c0_index()); | ||
828 | printk("Pagemask: %0x\n", read_c0_pagemask()); | ||
829 | printk("EntryHi : %0*lx\n", field, read_c0_entryhi()); | ||
830 | printk("EntryLo0: %0*lx\n", field, read_c0_entrylo0()); | ||
831 | printk("EntryLo1: %0*lx\n", field, read_c0_entrylo1()); | ||
832 | printk("\n"); | ||
833 | dump_tlb_all(); | ||
834 | } | ||
835 | |||
836 | show_code((unsigned int *) regs->cp0_epc); | ||
837 | |||
824 | /* | 838 | /* |
825 | * Some chips may have other causes of machine check (e.g. SB1 | 839 | * Some chips may have other causes of machine check (e.g. SB1 |
826 | * graduation timer) | 840 | * graduation timer) |
827 | */ | 841 | */ |
828 | panic("Caught Machine Check exception - %scaused by multiple " | 842 | panic("Caught Machine Check exception - %scaused by multiple " |
829 | "matching entries in the TLB.", | 843 | "matching entries in the TLB.", |
830 | (regs->cp0_status & ST0_TS) ? "" : "not "); | 844 | (multi_match) ? "" : "not "); |
831 | } | 845 | } |
832 | 846 | ||
833 | asmlinkage void do_mt(struct pt_regs *regs) | 847 | asmlinkage void do_mt(struct pt_regs *regs) |
@@ -902,6 +916,7 @@ static inline void parity_protection_init(void) | |||
902 | { | 916 | { |
903 | switch (current_cpu_data.cputype) { | 917 | switch (current_cpu_data.cputype) { |
904 | case CPU_24K: | 918 | case CPU_24K: |
919 | case CPU_34K: | ||
905 | case CPU_5KC: | 920 | case CPU_5KC: |
906 | write_c0_ecc(0x80000000); | 921 | write_c0_ecc(0x80000000); |
907 | back_to_back_c0_hazard(); | 922 | back_to_back_c0_hazard(); |