Skip to content

Commit 1ed4237

Browse files
avpatelpalmer-dabbelt
authored andcommitted
RISC-V: No need to pass scause as arg to do_IRQ()
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>
1 parent 84df952 commit 1ed4237

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

arch/riscv/kernel/entry.S

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ ENTRY(handle_exception)
168168

169169
/* Handle interrupts */
170170
move a0, sp /* pt_regs */
171-
move a1, s4 /* scause */
172171
tail do_IRQ
173172
1:
174173
/* Exceptions run with interrupts enabled */

arch/riscv/kernel/irq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
*/
2525
#define INTERRUPT_CAUSE_FLAG (1UL << (__riscv_xlen - 1))
2626

27-
asmlinkage void __irq_entry do_IRQ(struct pt_regs *regs, unsigned long cause)
27+
asmlinkage void __irq_entry do_IRQ(struct pt_regs *regs)
2828
{
2929
struct pt_regs *old_regs = set_irq_regs(regs);
3030

3131
irq_enter();
32-
switch (cause & ~INTERRUPT_CAUSE_FLAG) {
32+
switch (regs->scause & ~INTERRUPT_CAUSE_FLAG) {
3333
case INTERRUPT_CAUSE_TIMER:
3434
riscv_timer_interrupt();
3535
break;

0 commit comments

Comments
 (0)