Skip to content

Commit

Permalink
sh: mach-highlander: Handle virq offset in cascaded IRL demux
Browse files Browse the repository at this point in the history
commit a2601b8 upstream.

Take into account the virq offset when translating cascaded IRL
interrupts.

Fixes: a8ac296 ("sh: Avoid using IRQ0 on SH3 and SH4")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Link: https://lore.kernel.org/r/4fcb0d08a2b372431c41e04312742dc9e41e1be4.1688908186.git.geert+renesas@glider.be
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Geert Uytterhoeven authored and Greg Kroah-Hartman committed Jul 19, 2023
1 parent fe7daa3 commit 5628b9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/sh/boards/mach-highlander/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,10 @@ static unsigned char irl2irq[HL_NR_IRL];

static int highlander_irq_demux(int irq)
{
if (irq >= HL_NR_IRL || irq < 0 || !irl2irq[irq])
if (irq >= HL_NR_IRL + 16 || irq < 16 || !irl2irq[irq - 16])
return irq;

return irl2irq[irq];
return irl2irq[irq - 16];
}

static void __init highlander_init_irq(void)
Expand Down

0 comments on commit 5628b9a

Please sign in to comment.