]> xenbits.xensource.com Git - people/liuw/xen.git/commitdiff
xen/arm: gic-v2: deactivate interrupts during initialization
authorStefano Stabellini <sstabellini@kernel.org>
Tue, 5 Feb 2019 21:38:53 +0000 (13:38 -0800)
committerStefano Stabellini <sstabellini@kernel.org>
Thu, 7 Feb 2019 17:14:39 +0000 (09:14 -0800)
Interrupts could be ACTIVE at boot. Make sure to deactivate them during
initialization.

Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
CC: julien.grall@arm.com
CC: peng.fan@nxp.com
CC: jgross@suse.com
xen/arch/arm/gic-v2.c

index e9fb8a01aba2a4c839552ab63adde78c4287c7bd..256988c665b76fe74ff682c7de45e28ccd5a1066 100644 (file)
@@ -379,7 +379,10 @@ static void __init gicv2_dist_init(void)
 
     /* Disable all global interrupts */
     for ( i = 32; i < nr_lines; i += 32 )
+    {
         writel_gicd(~0x0, GICD_ICENABLER + (i / 32) * 4);
+        writel_gicd(~0x0, GICD_ICACTIVER + (i / 32) * 4);
+    }
 
     /* Turn on the distributor */
     writel_gicd(GICD_CTL_ENABLE, GICD_CTLR);
@@ -394,6 +397,7 @@ static void gicv2_cpu_init(void)
     /* The first 32 interrupts (PPI and SGI) are banked per-cpu, so
      * even though they are controlled with GICD registers, they must
      * be set up here with the other per-cpu state. */
+    writel_gicd(0xffffffff, GICD_ICACTIVER); /* Diactivate PPIs and SGIs */
     writel_gicd(0xffff0000, GICD_ICENABLER); /* Disable all PPI */
     writel_gicd(0x0000ffff, GICD_ISENABLER); /* Enable all SGI */