The gic_enable() of gic v2 can enable only first 32 interrupts.
This commit allows to enable other interrupts as well.

Signed-off-by: Vitaly Andrianov <[email protected]>
---
 inmates/lib/arm/gic-v2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/inmates/lib/arm/gic-v2.c b/inmates/lib/arm/gic-v2.c
index 5618084..6824409 100644
--- a/inmates/lib/arm/gic-v2.c
+++ b/inmates/lib/arm/gic-v2.c
@@ -24,7 +24,8 @@
 
 void gic_enable(unsigned int irqn)
 {
-       mmio_write32(GICD_BASE + GICD_ISENABLER, 1 << irqn);
+       mmio_write32(GICD_BASE + GICD_ISENABLER + ((irqn >> 3) & ~0x3),
+                    1 << (irqn & 0x1f));
 }
 
 int gic_init(void)
-- 
2.7.4

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to