]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sparc64/kernel/rtrap.S
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
[linux-2.6-omap-h63xx.git] / arch / sparc64 / kernel / rtrap.S
index a55d517e76aad7d1ae4832ea983cc59b28864169..3522cd66f3bb36e0e1250b4ac7cd9dadebcfb52d 100644 (file)
@@ -5,7 +5,6 @@
  * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
  */
 
-#include <linux/config.h>
 
 #include <asm/asi.h>
 #include <asm/pstate.h>
@@ -234,8 +233,10 @@ rt_continue:       ldx                     [%sp + PTREGS_OFF + PT_V9_G1], %g1
 
                /* Normal globals are restored, go to trap globals.  */
 661:           wrpr                    %g0, RTRAP_PSTATE_AG_IRQOFF, %pstate
-               .section                .sun4v_1insn_patch, "ax"
+               nop
+               .section                .sun4v_2insn_patch, "ax"
                .word                   661b
+               wrpr                    %g0, RTRAP_PSTATE_IRQOFF, %pstate
                SET_GL(1)
                .previous
 
@@ -264,11 +265,23 @@ rt_continue:      ldx                     [%sp + PTREGS_OFF + PT_V9_G1], %g1
 
                brnz,pn                 %l3, kern_rtt
                 mov                    PRIMARY_CONTEXT, %l7
-               ldxa                    [%l7 + %l7] ASI_DMMU, %l0
+
+661:           ldxa                    [%l7 + %l7] ASI_DMMU, %l0
+               .section                .sun4v_1insn_patch, "ax"
+               .word                   661b
+               ldxa                    [%l7 + %l7] ASI_MMU, %l0
+               .previous
+
                sethi                   %hi(sparc64_kern_pri_nuc_bits), %l1
                ldx                     [%l1 + %lo(sparc64_kern_pri_nuc_bits)], %l1
                or                      %l0, %l1, %l0
-               stxa                    %l0, [%l7] ASI_DMMU
+
+661:           stxa                    %l0, [%l7] ASI_DMMU
+               .section                .sun4v_1insn_patch, "ax"
+               .word                   661b
+               stxa                    %l0, [%l7] ASI_MMU
+               .previous
+
                sethi                   %hi(KERNBASE), %l7
                flush                   %l7
                rdpr                    %wstate, %l1
@@ -303,7 +316,13 @@ user_rtt_fill_fixup:
                sethi   %hi(sparc64_kern_pri_context), %g2
                ldx     [%g2 + %lo(sparc64_kern_pri_context)], %g2
                mov     PRIMARY_CONTEXT, %g1
-               stxa    %g2, [%g1] ASI_DMMU
+
+661:           stxa    %g2, [%g1] ASI_DMMU
+               .section .sun4v_1insn_patch, "ax"
+               .word   661b
+               stxa    %g2, [%g1] ASI_MMU
+               .previous
+
                sethi   %hi(KERNBASE), %g1
                flush   %g1
 
@@ -313,7 +332,6 @@ user_rtt_fill_fixup:
 
                mov     %g6, %l1
                wrpr    %g0, 0x0, %tl
-               wrpr    %g0, RTRAP_PSTATE, %pstate
 
 661:           nop
                .section                .sun4v_1insn_patch, "ax"
@@ -321,6 +339,8 @@ user_rtt_fill_fixup:
                SET_GL(0)
                .previous
 
+               wrpr    %g0, RTRAP_PSTATE, %pstate
+
                mov     %l1, %g6
                ldx     [%g6 + TI_TASK], %g4
                LOAD_PER_CPU_BASE(%g5, %g6, %g1, %g2, %g3)