summary refs log tree commit diff
path: root/arch
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2023-07-09 15:10:23 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-07-19 16:22:18 +0200
commit5628b9aa31798387a1340d889d4c6d7a33ecabe1 (patch)
tree1c68226ae15f0ef2542b4b0c6ef7cb08e884110b /arch
parentfe7daa313d13085c9323711554bfe173a083a166 (diff)
downloadlinux-5628b9aa31798387a1340d889d4c6d7a33ecabe1.tar.gz
sh: mach-highlander: Handle virq offset in cascaded IRL demux
commit a2601b8d8f077368c6d113b4d496559415c6d495 upstream.

Take into account the virq offset when translating cascaded IRL
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/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>
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/boards/mach-highlander/setup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sh/boards/mach-highlander/setup.c b/arch/sh/boards/mach-highlander/setup.c
index 533393d779c2..01565660a669 100644
--- a/arch/sh/boards/mach-highlander/setup.c
+++ b/arch/sh/boards/mach-highlander/setup.c
@@ -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)