VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   30 Branches   50 Tags
author: Geert Uytterhoeven <geert+renesas@glider.be> 2023-07-09 15:10:23 +0200 committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2023-07-19 16:37:03 +0200 commit: 42530519c7f23b5c23b32b98bab1feea5e8bcb47 parent: eca4937e394f64c21574432cb0545ea860ad01ee
Commit Summary:
sh: mach-highlander: Handle virq offset in cascaded IRL demux
Diffstat:
1 file 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)