Message ID | 20190411115623.5749-9-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/9] riscv: use asm-generic/extable.h | expand |
Στις 2019-04-11 14:56, Christoph Hellwig έγραψε: > This has been helpful when debugging my pending nommu port. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- > arch/riscv/kernel/irq.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/riscv/kernel/irq.c b/arch/riscv/kernel/irq.c > index 48e6b7db83a1..b10af8ccd656 100644 > --- a/arch/riscv/kernel/irq.c > +++ b/arch/riscv/kernel/irq.c > @@ -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->xcause); > + BUG(); > } > irq_exit(); Did you mean regs->scause ? There is no xcause field on struct pt_regs and also there is no such register name: https://github.com/torvalds/linux/blob/master/arch/riscv/include/asm/ptrace.h
On Thu, Apr 11, 2019 at 06:52:06PM +0300, Nick Kossifidis wrote: >> default: >> - panic("unexpected interrupt cause"); >> + pr_alert("unexpected interrupt cause 0x%lx", regs->xcause); >> + BUG(); >> } >> irq_exit(); > > Did you mean regs->scause ? There is no xcause field on struct pt_regs and > also there is no such register name: > https://github.com/torvalds/linux/blob/master/arch/riscv/include/asm/ptrace.h Oops. The field gets renamed in my nommu tree to deal with the fact that depending on the kernel build it could hold scause or mcause. I'll respin it without this rename.
On Thu, 11 Apr 2019, Christoph Hellwig wrote: > This has been helpful when debugging my pending nommu port. > > Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Paul Walmsley <paul.walmsley@sifive.com> > --- > arch/riscv/kernel/irq.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/riscv/kernel/irq.c b/arch/riscv/kernel/irq.c > index 48e6b7db83a1..b10af8ccd656 100644 > --- a/arch/riscv/kernel/irq.c > +++ b/arch/riscv/kernel/irq.c > @@ -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->xcause); > + BUG(); > } > irq_exit(); > > -- > 2.20.1 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv >
diff --git a/arch/riscv/kernel/irq.c b/arch/riscv/kernel/irq.c index 48e6b7db83a1..b10af8ccd656 100644 --- a/arch/riscv/kernel/irq.c +++ b/arch/riscv/kernel/irq.c @@ -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->xcause); + BUG(); } irq_exit();
This has been helpful when debugging my pending nommu port. Signed-off-by: Christoph Hellwig <hch@lst.de> --- arch/riscv/kernel/irq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)