riscv: print the unexpected interrupt cause
authorChristoph Hellwig <hch@lst.de>
Mon, 15 Apr 2019 09:14:41 +0000 (11:14 +0200)
committerPalmer Dabbelt <palmer@sifive.com>
Thu, 25 Apr 2019 21:51:11 +0000 (14:51 -0700)
This has been helpful when debugging my pending nommu port.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nick Kossifidis <mick@ics.forth.gr>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
arch/riscv/kernel/irq.c

index 48e6b7db83a1d17db763e362a15500602b1711e7..c738132eecf822559e950b9db6f44593441df073 100644 (file)
@@ -54,7 +54,8 @@ asmlinkage void __irq_entry do_IRQ(struct pt_regs *regs)
                handle_arch_irq(regs);
                break;
        default:
-               panic("unexpected interrupt cause");
+               pr_alert("unexpected interrupt cause 0x%lx", regs->scause);
+               BUG();
        }
        irq_exit();