]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/sparc64/kernel/head.S
[SPARC64]: Make sure IRQs are disabled properly during early boot.
[karo-tx-linux.git] / arch / sparc64 / kernel / head.S
index 31c5892f5acc49669c4326bf5162a42ebceb36ea..c8e9dc9d68a9758c62d8e6efc7b5e0a02d88a8e4 100644 (file)
@@ -7,7 +7,6 @@
  * Copyright (C) 1997 Miguel de Icaza (miguel@nuclecu.unam.mx)
  */
 
-#include <linux/config.h>
 #include <linux/version.h>
 #include <linux/errno.h>
 #include <linux/threads.h>
@@ -552,9 +551,10 @@ setup_trap_table:
        save    %sp, -192, %sp
 
        /* Force interrupts to be disabled. */
-       rdpr    %pstate, %o1
-       andn    %o1, PSTATE_IE, %o1
+       rdpr    %pstate, %l0
+       andn    %l0, PSTATE_IE, %o1
        wrpr    %o1, 0x0, %pstate
+       rdpr    %pil, %l1
        wrpr    %g0, 15, %pil
 
        /* Make the firmware call to jump over to the Linux trap table.  */
@@ -623,11 +623,9 @@ setup_trap_table:
        call    init_irqwork_curcpu
         nop
 
-       /* Now we can turn interrupts back on. */
-       rdpr    %pstate, %o1
-       or      %o1, PSTATE_IE, %o1
-       wrpr    %o1, 0, %pstate
-       wrpr    %g0, 0x0, %pil
+       /* Now we can restore interrupt state. */
+       wrpr    %l0, 0, %pstate
+       wrpr    %l1, 0x0, %pil
 
        ret
         restore