[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] arm: gic-v3: clear GICR active interrupts



On 24/01/2019 07:22, Peng Fan wrote:
Hi Julien

Hi Peng,

Are you ok with the following patch?

This looks ok. Please resend it formally with the tag for-4.12 and the release manager (jgross@xxxxxxxx) in CC.


     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>

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);
  }

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.