[PATCH] inmates: arm: Do not report spurious interrupt ID to handler

3 views
Skip to first unread message

Jan Kiszka

unread,
Sep 21, 2016, 1:44:45 PM9/21/16
to Jailhouse, Rosa, Johannes
This ID is the break condition for the loop ("no more interrupts"),
nothing the handler should be interested in.

Reported-by: Johannes Rosa <johann...@siemens.com>
Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
inmates/lib/arm/gic.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/inmates/lib/arm/gic.c b/inmates/lib/arm/gic.c
index 0ab8198..925b348 100644
--- a/inmates/lib/arm/gic.c
+++ b/inmates/lib/arm/gic.c
@@ -21,15 +21,16 @@ void vector_irq(void)
{
u32 irqn;

- do {
+ while (1) {
irqn = gic_read_ack();
+ if (irqn == 0x3ff)
+ break;

if (irq_handler)
irq_handler(irqn);

gic_write_eoi(irqn);
-
- } while (irqn != 0x3ff);
+ }
}

void gic_setup(irq_handler_t handler)
--
2.1.4
Reply all
Reply to author
Forward
0 new messages