[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH for-4.12] arm: gic: deactivate sgi immediately after eoi
On i.MX8, we implemented partition reboot which means Cortex-A reboot will not impact M4 cores and System control Unit core. However GICv3 is not reset because we also need to support A72 Cluster reboot without affecting A53 Cluster. The gic-v3 controller is configured with EOImode to 1, so during xen reboot, there is a function call "smp_call_function(halt_this_cpu, NULL, 0);" ,but halt_this_cpu never return, that means other CPUs have no chance to deactive the SGI interrupt, because the deactivate_irq operation is at the end of do_sgi. During xen booting again, CPU0 will issue GIC_SGI_CALL_FUNCTION to other CPUs. Because GIC_SGI_CALL_FUNCTION of other CPUs are active during the last reboot, interrupts could not be triggered unless we deactivate the interrupt first. To fix this issue, let's move the deactivate_irq operation just after eoi_irq, then the SGI interrupt will be in deactive state when smp_call_function_interrupt. Signed-off-by: Peng Fan <peng.fan@xxxxxxx> --- xen/arch/arm/gic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index 6cc7dec706..300fdbd9ae 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -347,6 +347,8 @@ static void do_sgi(struct cpu_user_regs *regs, enum gic_sgi sgi) /* Lower the priority */ gic_hw_ops->eoi_irq(desc); + /* Deactivate */ + gic_hw_ops->deactivate_irq(desc); /* * Ensure any shared data written by the CPU sending @@ -370,9 +372,6 @@ static void do_sgi(struct cpu_user_regs *regs, enum gic_sgi sgi) panic("Unhandled SGI %d on CPU%d\n", sgi, smp_processor_id()); break; } - - /* Deactivate */ - gic_hw_ops->deactivate_irq(desc); } /* Accept an interrupt from the GIC and dispatch its handler */ -- 2.14.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |