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 13:15:49 +0200 committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2023-07-19 16:37:03 +0200 commit: eca4937e394f64c21574432cb0545ea860ad01ee parent: 7b43d7b8664c05c3926d738c9246c06368b2b633
Commit Summary:
sh: mach-r2d: Handle virq offset in cascaded IRL demux
Diffstat:
1 file changed, 2 insertions, 2 deletions
diff --git a/arch/sh/boards/mach-r2d/irq.c b/arch/sh/boards/mach-r2d/irq.c
index e34f81e9ae81..d0a54a9adbce 100644
--- a/arch/sh/boards/mach-r2d/irq.c
+++ b/arch/sh/boards/mach-r2d/irq.c
@@ -117,10 +117,10 @@ static unsigned char irl2irq[R2D_NR_IRL];
 
 int rts7751r2d_irq_demux(int irq)
 {
-	if (irq >= R2D_NR_IRL || irq < 0 || !irl2irq[irq])
+	if (irq >= R2D_NR_IRL + 16 || irq < 16 || !irl2irq[irq - 16])
 		return irq;
 
-	return irl2irq[irq];
+	return irl2irq[irq - 16];
 }
 
 /*