Commit 61e30277199e5 ("GICv3: Fix the GICD_IROUTER offset")
in ATF[1] specifies that GICv3 documention mentions the wrong offset
about GICD_IROUTER and gives proper calculation for interrupt id.
Importing the same here.

[1] https://github.com/ARM-software/arm-trusted-firmware

Signed-off-by: Lokesh Vutla <[email protected]>
---
 hypervisor/arch/arm/gic-v3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hypervisor/arch/arm/gic-v3.c b/hypervisor/arch/arm/gic-v3.c
index 8d7c9aa..3fcaf10 100644
--- a/hypervisor/arch/arm/gic-v3.c
+++ b/hypervisor/arch/arm/gic-v3.c
@@ -204,7 +204,7 @@ static void gic_cpu_shutdown(struct per_cpu *cpu_data)
 
 static void gic_adjust_irq_target(struct cell *cell, u16 irq_id)
 {
-       void *irouter = gicd_base + GICD_IROUTER + irq_id;
+       void *irouter = gicd_base + GICD_IROUTER + 8 * irq_id;
        u32 route = mmio_read32(irouter);
 
        if (!cell_owns_cpu(cell, route))
-- 
2.13.0

-- 
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