[PATCH 5/5] SPARC BSPs: disable interrupts as early as possible

Daniel Hellstrom daniel at gaisler.com
Thu Oct 31 13:58:54 UTC 2013


There is no point having interrupts enabled before reaching
boot_card() that disables interrupt. We better have it off
all the time.

It is required to turn off interrupt on secondary CPUs in an
SMP system.

Signed-off-by: Daniel Hellstrom <daniel at gaisler.com>
---
 c/src/lib/libbsp/sparc/shared/start.S |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/c/src/lib/libbsp/sparc/shared/start.S b/c/src/lib/libbsp/sparc/shared/start.S
index 83cfab4..721336d 100644
--- a/c/src/lib/libbsp/sparc/shared/start.S
+++ b/c/src/lib/libbsp/sparc/shared/start.S
@@ -226,8 +226,8 @@ SYM(hard_reset):
 	sll	%g3, %g2, %g3
         mov     %g3, %wim
 
-	or	%g1, 0x20, %g1
-        wr      %g1, %psr		! enable traps
+	or	%g1, 0xf20, %g1
+        wr      %g1, %psr		! enable traps and disable ints
 
         nop
         nop
-- 
1.7.0.4




More information about the devel mailing list