From da2bcc4252b488ad0740df9af6e2a5a90bc4f164 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Sun, 26 Jun 2016 12:10:25 +0200 Subject: [PATCH] arm: Remove SPI target reset on cell destruction There is no point in updating the SPI routing on cell destruction: all CPUs the cell owned will be given back to the root cell. So any previously written valid target configuration remain valid. Signed-off-by: Jan Kiszka --- hypervisor/arch/arm/gic-v2.c | 2 -- hypervisor/arch/arm/gic-v3.c | 7 ------- hypervisor/arch/arm/irqchip.c | 3 ++- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/hypervisor/arch/arm/gic-v2.c b/hypervisor/arch/arm/gic-v2.c index c53e58a..9d1d311 100644 --- a/hypervisor/arch/arm/gic-v2.c +++ b/hypervisor/arch/arm/gic-v2.c @@ -216,8 +216,6 @@ static void gic_cell_exit(struct cell *cell) { paging_destroy(&cell->arch.mm, (unsigned long)gicc_base, gicc_size, PAGING_NON_COHERENT); - /* Reset interrupt routing of the cell's spis */ - gic_target_spis(cell, &root_cell); } static int gic_send_sgi(struct sgi *sgi) diff --git a/hypervisor/arch/arm/gic-v3.c b/hypervisor/arch/arm/gic-v3.c index a231571..ca989d0 100644 --- a/hypervisor/arch/arm/gic-v3.c +++ b/hypervisor/arch/arm/gic-v3.c @@ -283,12 +283,6 @@ static int gic_cell_init(struct cell *cell) return 0; } -static void gic_cell_exit(struct cell *cell) -{ - /* Reset interrupt routing of the cell's spis*/ - gic_route_spis(cell, &root_cell); -} - static int gic_send_sgi(struct sgi *sgi) { u64 val; @@ -454,7 +448,6 @@ struct irqchip_ops irqchip = { .cpu_init = gic_cpu_init, .cpu_reset = gic_cpu_reset, .cell_init = gic_cell_init, - .cell_exit = gic_cell_exit, .send_sgi = gic_send_sgi, .handle_irq = gic_handle_irq, .inject_irq = gic_inject_irq, diff --git a/hypervisor/arch/arm/irqchip.c b/hypervisor/arch/arm/irqchip.c index e3c813f..47673dd 100644 --- a/hypervisor/arch/arm/irqchip.c +++ b/hypervisor/arch/arm/irqchip.c @@ -202,7 +202,8 @@ void irqchip_cell_exit(struct cell *cell) chip->pin_bitmap[pos]; } - irqchip.cell_exit(cell); + if (irqchip.cell_exit) + irqchip.cell_exit(cell); } void irqchip_root_cell_shrink(struct cell *cell) -- 2.39.2