From: Jan Kiszka <[email protected]> Leave irqchip_cell_init earlier if initializing the root cell. This saves one indention level for the root cell irqchip bitmap updates. We will need it.
Signed-off-by: Jan Kiszka <[email protected]> --- hypervisor/arch/arm/irqchip.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/hypervisor/arch/arm/irqchip.c b/hypervisor/arch/arm/irqchip.c index fd9ae6f..bd31a7a 100644 --- a/hypervisor/arch/arm/irqchip.c +++ b/hypervisor/arch/arm/irqchip.c @@ -176,21 +176,22 @@ int irqchip_cell_init(struct cell *cell) if (err) return err; - if (cell != &root_cell) { - for_each_irqchip(chip, cell->config, n) { - if (chip->address != (unsigned long)gicd_base) - continue; - for (pos = 0; pos < ARRAY_SIZE(chip->pin_bitmap); pos++) - root_cell.arch.irq_bitmap[chip->pin_base/32] &= - ~chip->pin_bitmap[pos]; - } + if (cell == &root_cell) + return 0; - for (n = 32; n < sizeof(cell->arch.irq_bitmap) * 8; n++) { - if (irqchip_irq_in_cell(cell, n)) - irqchip.adjust_irq_target(cell, n); - if (irqchip_irq_in_cell(&root_cell, n)) - irqchip.adjust_irq_target(&root_cell, n); - } + for_each_irqchip(chip, cell->config, n) { + if (chip->address != (unsigned long)gicd_base) + continue; + for (pos = 0; pos < ARRAY_SIZE(chip->pin_bitmap); pos++) + root_cell.arch.irq_bitmap[chip->pin_base / 32] &= + ~chip->pin_bitmap[pos]; + } + + for (n = 32; n < sizeof(cell->arch.irq_bitmap) * 8; n++) { + if (irqchip_irq_in_cell(cell, n)) + irqchip.adjust_irq_target(cell, n); + if (irqchip_irq_in_cell(&root_cell, n)) + irqchip.adjust_irq_target(&root_cell, n); } return 0; -- 2.1.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.
