[MIPS] Print more information if we're struck by a machine check exception. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

+17 -2
+17 -2
arch/mips/kernel/traps.c
··· 819 820 asmlinkage void do_mcheck(struct pt_regs *regs) 821 { 822 show_regs(regs); 823 - dump_tlb_all(); 824 /* 825 * Some chips may have other causes of machine check (e.g. SB1 826 * graduation timer) 827 */ 828 panic("Caught Machine Check exception - %scaused by multiple " 829 "matching entries in the TLB.", 830 - (regs->cp0_status & ST0_TS) ? "" : "not "); 831 } 832 833 asmlinkage void do_mt(struct pt_regs *regs)
··· 819 820 asmlinkage void do_mcheck(struct pt_regs *regs) 821 { 822 + const int field = 2 * sizeof(unsigned long); 823 + int multi_match = regs->cp0_status & ST0_TS; 824 + 825 show_regs(regs); 826 + 827 + if (multi_match) { 828 + printk("Index : %0x\n", read_c0_index()); 829 + printk("Pagemask: %0x\n", read_c0_pagemask()); 830 + printk("EntryHi : %0*lx\n", field, read_c0_entryhi()); 831 + printk("EntryLo0: %0*lx\n", field, read_c0_entrylo0()); 832 + printk("EntryLo1: %0*lx\n", field, read_c0_entrylo1()); 833 + printk("\n"); 834 + dump_tlb_all(); 835 + } 836 + 837 + show_code((unsigned int *) regs->cp0_epc); 838 + 839 /* 840 * Some chips may have other causes of machine check (e.g. SB1 841 * graduation timer) 842 */ 843 panic("Caught Machine Check exception - %scaused by multiple " 844 "matching entries in the TLB.", 845 + (multi_match) ? "" : "not "); 846 } 847 848 asmlinkage void do_mt(struct pt_regs *regs)