sh: mach-dreamcast: Handle virq offset in cascaded IRQ demux
authorGeert Uytterhoeven <geert+renesas@glider.be>
Sun, 9 Jul 2023 13:10:43 +0000 (15:10 +0200)
committerJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Thu, 13 Jul 2023 06:37:43 +0000 (08:37 +0200)
Take into account the virq offset when translating cascaded interrupts.

Fixes: a8ac2961148e8c72 ("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/7d0cb246c9f1cd24bb1f637ec5cb67e799a4c3b8.1688908227.git.geert+renesas@glider.be
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
arch/sh/boards/mach-dreamcast/irq.c

index cc06e4cdb4cdf9b7cab0597183b06061a5901ec9..0eec82fb85e7c6b4cb262fc79ed7fa24d3e4f70b 100644 (file)
@@ -108,13 +108,13 @@ int systemasic_irq_demux(int irq)
        __u32 j, bit;
 
        switch (irq) {
-       case 13:
+       case 13 + 16:
                level = 0;
                break;
-       case 11:
+       case 11 + 16:
                level = 1;
                break;
-       case  9:
+       case 9 + 16:
                level = 2;
                break;
        default: