RISC-V: No need to pass scause as arg to do_IRQ()
authorAnup Patel <anup@brainfault.org>
Tue, 2 Oct 2018 19:14:54 +0000 (12:14 -0700)
committerPalmer Dabbelt <palmer@sifive.com>
Tue, 23 Oct 2018 00:03:35 +0000 (17:03 -0700)
The scause is already part of pt_regs so no need to pass
scause as separate arg to do_IRQ().

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
arch/riscv/kernel/entry.S
arch/riscv/kernel/irq.c

index fa2c08e3c05e6ee74ea0258b62cdf6580f98a385..6eaacfa5b63d6d57b0cd354b74098647c9e34d01 100644 (file)
@@ -168,7 +168,6 @@ ENTRY(handle_exception)
 
        /* Handle interrupts */
        move a0, sp /* pt_regs */
-       move a1, s4 /* scause */
        tail do_IRQ
 1:
        /* Exceptions run with interrupts enabled */
index 0cfac48a1272d98f95cd0fcc6ffaa536d862b408..ca4593317e457257e068b8c2e4d6a171cd295bb7 100644 (file)
  */
 #define INTERRUPT_CAUSE_FLAG   (1UL << (__riscv_xlen - 1))
 
-asmlinkage void __irq_entry do_IRQ(struct pt_regs *regs, unsigned long cause)
+asmlinkage void __irq_entry do_IRQ(struct pt_regs *regs)
 {
        struct pt_regs *old_regs = set_irq_regs(regs);
 
        irq_enter();
-       switch (cause & ~INTERRUPT_CAUSE_FLAG) {
+       switch (regs->scause & ~INTERRUPT_CAUSE_FLAG) {
        case INTERRUPT_CAUSE_TIMER:
                riscv_timer_interrupt();
                break;