linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] um: irq: Fix LAST_IRQ usage
@ 2019-07-31 20:29 Johannes Berg
  2019-07-31 20:29 ` [PATCH 2/2] um: drivers: Add virtio vhost-user driver Johannes Berg
  2019-07-31 20:46 ` [PATCH 1/2] um: irq: Fix LAST_IRQ usage Anton Ivanov
  0 siblings, 2 replies; 19+ messages in thread
From: Johannes Berg @ 2019-07-31 20:29 UTC (permalink / raw)
  To: linux-um; +Cc: Richard Weinberger, Jeff Dike, Erel Geron, Anton Ivanov

From: Erel Geron <erelx.geron@intel.com>

LAST_IRQ was used incorrectly in init_IRQ.
Fix this.

Signed-off-by: Erel Geron <erelx.geron@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
Anton submitted a very similar patch, but didn't update init_IRQ(),
which seems necessary.
---
 arch/um/include/asm/irq.h | 2 +-
 arch/um/kernel/irq.c      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/um/include/asm/irq.h b/arch/um/include/asm/irq.h
index 49ed3e35b35a..ce7a78c3bcf2 100644
--- a/arch/um/include/asm/irq.h
+++ b/arch/um/include/asm/irq.h
@@ -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
 
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index efde1f16c603..402e59bdb65b 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -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();
-- 
2.20.1


_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2019-10-08 14:49 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-31 20:29 [PATCH 1/2] um: irq: Fix LAST_IRQ usage Johannes Berg
2019-07-31 20:29 ` [PATCH 2/2] um: drivers: Add virtio vhost-user driver Johannes Berg
2019-07-31 20:50   ` Anton Ivanov
2019-07-31 21:05     ` Johannes Berg
2019-07-31 21:23       ` Anton Ivanov
2019-07-31 21:50         ` Johannes Berg
2019-08-08  7:18   ` Anton Ivanov
2019-08-14  5:39   ` Anton Ivanov
2019-08-14  5:49     ` Anton Ivanov
2019-08-14 10:34       ` Anton Ivanov
2019-08-14 13:38         ` Geron, ErelX
2019-08-15  5:03           ` Anton Ivanov
2019-08-20  7:18             ` Johannes Berg
2019-08-20  7:28               ` Anton Ivanov
2019-10-08  9:26   ` Anton Ivanov
2019-10-08 11:57     ` Johannes Berg
2019-10-08 14:17       ` Anton Ivanov
2019-10-08 14:49         ` Johannes Berg
2019-07-31 20:46 ` [PATCH 1/2] um: irq: Fix LAST_IRQ usage Anton Ivanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).