Merge tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[firefly-linux-kernel-4.4.55.git] / arch / mips / kernel / traps.c
index d2d1c1933bc9f598efaa81735d132af1ff12adee..2a7b38ed23f06e817bba6187b8890b98489e168d 100644 (file)
@@ -236,6 +236,7 @@ static void __show_regs(const struct pt_regs *regs)
 {
        const int field = 2 * sizeof(unsigned long);
        unsigned int cause = regs->cp0_cause;
+       unsigned int exccode;
        int i;
 
        show_regs_print_info(KERN_DEFAULT);
@@ -317,10 +318,10 @@ static void __show_regs(const struct pt_regs *regs)
        }
        printk("\n");
 
-       printk("Cause : %08x\n", cause);
+       exccode = (cause & CAUSEF_EXCCODE) >> CAUSEB_EXCCODE;
+       printk("Cause : %08x (ExcCode %02x)\n", cause, exccode);
 
-       cause = (cause & CAUSEF_EXCCODE) >> CAUSEB_EXCCODE;
-       if (1 <= cause && cause <= 5)
+       if (1 <= exccode && exccode <= 5)
                printk("BadVA : %0*lx\n", field, regs->cp0_badvaddr);
 
        printk("PrId  : %08x (%s)\n", read_c0_prid(),
@@ -2184,11 +2185,6 @@ void __init trap_init(void)
 
        check_wait();
 
-#if defined(CONFIG_KGDB)
-       if (kgdb_early_setup)
-               return; /* Already done */
-#endif
-
        if (cpu_has_veic || cpu_has_vint) {
                unsigned long size = 0x200 + VECTORSPACING*64;
                ebase = (unsigned long)