[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 819 820 820 asmlinkage void do_mcheck(struct pt_regs *regs) 821 821 { 822 + const int field = 2 * sizeof(unsigned long); 823 + int multi_match = regs->cp0_status & ST0_TS; 824 + 822 825 show_regs(regs); 823 - dump_tlb_all(); 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 + 824 839 /* 825 840 * Some chips may have other causes of machine check (e.g. SB1 826 841 * graduation timer) 827 842 */ 828 843 panic("Caught Machine Check exception - %scaused by multiple " 829 844 "matching entries in the TLB.", 830 - (regs->cp0_status & ST0_TS) ? "" : "not "); 845 + (multi_match) ? "" : "not "); 831 846 } 832 847 833 848 asmlinkage void do_mt(struct pt_regs *regs)