xen/arm: gic-v2: deactivate interrupts during initialization
PATCH 1/1 xen/arm: gic-v2: deactivate interrupts during initialization
Interrupts could be ACTIVE at boot. Make sure to deactivate them during initialization.
--- xen/arch/arm/gic-v2.c | 4 ++++ 1 file changed, 4 insertions(+)
xen/arch/arm/gic-v2.c +4 -0
@@ -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 */
Signature · 7 lines
1.9.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 7 lines · Stefano Stabellini
Interrupts could be ACTIVE at boot. Make sure to deactivate them during initialization.
Signed-off-by Stefano Stabellini <[email protected]>
Quoted 28 lines
--- xen/arch/arm/gic-v2.c | 4 ++++ 1 file changed, 4 insertions(+)xen/arch/arm/gic-v2.c +4
-0@@ -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 */
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 4 lines · Stefano Stabellini
Interrupts could be ACTIVE at boot. Make sure to deactivate them during initialization.
Signed-off-by Stefano Stabellini <[email protected]>
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 43 lines
-----Original Message-----
From: Stefano Stabellini [mailto:[email protected]]
Sent: 2019年2月6日 5:39
To: [email protected]
Cc: [email protected]; Stefano Stabellini <[email protected]>; [email protected]; Peng Fan <[email protected]>; [email protected]
Subject: [PATCH for-4.12] xen/arm: gic-v2: deactivate interrupts during initializationInterrupts could be ACTIVE at boot. Make sure to deactivate them during initialization.
Signed-off-by Stefano Stabellini <[email protected]>--- xen/arch/arm/gic-v2.c | 4 ++++ 1 file changed, 4 insertions(+)xen/arch/arm/gic-v2.c index renamed from xen/arch/arm/gic-v2.c +0
-0e9fb8a0..256988c 100644
xen/arch/arm/gic-v2.c +3
-0@@ -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 */
Quoted 4 lines
writel_gicd(0xffff0000, GICD_ICENABLER); /* Disable all PPI */ writel_gicd(0x0000ffff, GICD_ISENABLER); /* Enable all SGI */--
Quoted 1 line
1.9.1
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel