Skip to contentSkip to conversation

um: irq: Fix LAST_IRQ usage

PATCH In review Johannes Berg 1 participant 2 messages Sep 4, 2019 User-mode Linux (UML)

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH v2 1/1 um: irq: Fix LAST_IRQ usage

From: Erel Geron <[email protected]>

LAST_IRQ was used incorrectly in init_IRQ.
Fix this.

Change-Id I8676920b31fbe61adadc35e36d6f8ad677af5b08

Reviewed-on: https://git-ger-8.devtools.intel.com/gerrit/95123

---
 arch/um/include/asm/irq.h | 2 +-
 arch/um/kernel/irq.c      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/um/include/asm/irq.h +1 -1
index 49ed3e35b35a..ce7a78c3bcf2 100644
@@ -23,7 +23,7 @@
 #define VECTOR_BASE_IRQ		15
 #define VECTOR_IRQ_SPACE	8
 
-#define LAST_IRQ (VECTOR_IRQ_SPACE + VECTOR_BASE_IRQ)
+#define LAST_IRQ (VECTOR_IRQ_SPACE + VECTOR_BASE_IRQ - 1)
 
 #else
 
arch/um/kernel/irq.c +1 -1
index efde1f16c603..402e59bdb65b 100644
@@ -480,7 +480,7 @@ void __init init_IRQ(void)
 	irq_set_chip_and_handler(TIMER_IRQ, &SIGVTALRM_irq_type, handle_edge_irq);
 
 
-	for (i = 1; i < LAST_IRQ; i++)
+	for (i = 1; i <= LAST_IRQ; i++)
 		irq_set_chip_and_handler(i, &normal_irq_type, handle_edge_irq);
 	/* Initialize EPOLL Loop */
 	os_setup_epoll();
Signature · 7 lines
2.20.1


_______________________________________________
linux-um mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-um