]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[MIPS] Fix use of ehb instruction for non-R2 configurations.
authorRalf Baechle <ralf@linux-mips.org>
Sat, 3 Jun 2006 21:40:15 +0000 (22:40 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 29 Jun 2006 20:10:49 +0000 (21:10 +0100)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/entry.S
arch/mips/kernel/gdb-low.S
arch/mips/kernel/genex.S
arch/mips/kernel/head.S
arch/mips/kernel/r4k_switch.S
arch/mips/kernel/smtc-asm.S
include/asm-mips/asmmacro.h
include/asm-mips/mipsregs.h
include/asm-mips/stackframe.h

index a9c6de1b954257e8e30e73518009f7cf3d1444ae..457565162dd56fc85583ea8d9d13315d93c6d430 100644 (file)
@@ -87,7 +87,7 @@ FEXPORT(restore_all)                  # restore full frame
        ori     v1, v0, TCSTATUS_IXMT
        mtc0    v1, CP0_TCSTATUS
        andi    v0, TCSTATUS_IXMT
-       ehb
+       _ehb
        mfc0    t0, CP0_TCCONTEXT
        DMT     9                               # dmt t1
        jal     mips_ihb
@@ -95,7 +95,7 @@ FEXPORT(restore_all)                  # restore full frame
        andi    t3, t0, 0xff00
        or      t2, t2, t3
        mtc0    t2, CP0_STATUS
-       ehb
+       _ehb
        andi    t1, t1, VPECONTROL_TE
        beqz    t1, 1f
        EMT
@@ -105,7 +105,7 @@ FEXPORT(restore_all)                        # restore full frame
        xori    v1, v1, TCSTATUS_IXMT
        or      v1, v0, v1
        mtc0    v1, CP0_TCSTATUS
-       ehb
+       _ehb
        xor     t0, t0, t3
        mtc0    t0, CP0_TCCONTEXT
 #endif /* CONFIG_MIPS_MT_SMTC */
index 5fd7a8af0c6256bc720c7fa232ee14d551be3e63..8760131f89d9c57f572bd138ceb42258248a3914 100644 (file)
                ori     t1, t2, TCSTATUS_IXMT
                mtc0    t1, CP0_TCSTATUS
                andi    t2, t2, TCSTATUS_IXMT
-               ehb
+               _ehb
                DMT     9                               # dmt   t1
                jal     mips_ihb
                nop
                xori    t1, t1, TCSTATUS_IXMT
                or      t1, t1, t2
                mtc0    t1, CP0_TCSTATUS
-               ehb
+               _ehb
 #endif /* CONFIG_MIPS_MT_SMTC */
                LONG_L  v0, GDB_FR_STATUS(sp)
                LONG_L  v1, GDB_FR_EPC(sp)
index ff7af369f2862eedd4e8fbf08eb6eb3adf263010..6888cde560afc1b277c3d5844a3fcdca55c1b1b9 100644 (file)
@@ -214,7 +214,7 @@ NESTED(except_vec_vi_handler, 0, sp)
        mtc0    t0, CP0_TCCONTEXT
        xor     t1, t1, t0
        mtc0    t1, CP0_STATUS
-       ehb
+       _ehb
 #endif /* CONFIG_MIPS_MT_SMTC */
        CLI
        move    a0, sp
index bdf6f6eff721262d1c98a9dc48adba2b569adba9..c018098c9a5600ce721ae000f92ef567e92949ed 100644 (file)
@@ -96,7 +96,7 @@
        /* Clear TKSU, leave IXMT */
        xori    t0, 0x00001800
        mtc0    t0, CP0_TCSTATUS
-       ehb
+       _ehb
        /* We need to leave the global IE bit set, but clear EXL...*/
        mfc0    t0, CP0_STATUS
        or      t0, ST0_CU0 | ST0_EXL | ST0_ERL | \set | \clr
index db94e556fc97939eaad0dbcc540d088145c41fe9..e1b85e6c486a1cd392ba351e6f423325b3593636 100644 (file)
@@ -94,7 +94,7 @@
        ori     t1, t2, TCSTATUS_IXMT
        mtc0    t1, CP0_TCSTATUS
        andi    t2, t2, TCSTATUS_IXMT
-       ehb
+       _ehb
        DMT     8                               # dmt   t0
        move    t1,ra
        jal     mips_ihb
        or      a2, t1
        mtc0    a2, CP0_STATUS
 #ifdef CONFIG_MIPS_MT_SMTC
-       ehb
+       _ehb
        andi    t0, t0, VPECONTROL_TE
        beqz    t0, 1f
        emt
        xori    t1, t1, TCSTATUS_IXMT
        or      t1, t1, t2
        mtc0    t1, CP0_TCSTATUS
-       ehb
+       _ehb
 #endif /* CONFIG_MIPS_MT_SMTC */
        move    v0, a0
        jr      ra
index c9d65196d91760a0ee1876b93ab7a1f69f6c4f8c..72c6d98f8854283cc2dad1e1dc1ac593fe4edd4c 100644 (file)
@@ -52,12 +52,12 @@ FEXPORT(__smtc_ipi_vector)
        .set    noat
        /* Disable thread scheduling to make Status update atomic */
        DMT     27                                      # dmt   k1
-       ehb
+       _ehb
        /* Set EXL */
        mfc0    k0,CP0_STATUS
        ori     k0,k0,ST0_EXL
        mtc0    k0,CP0_STATUS
-       ehb
+       _ehb
        /* Thread scheduling now inhibited by EXL. Restore TE state. */
        andi    k1,k1,VPECONTROL_TE
        beqz    k1,1f
@@ -82,7 +82,7 @@ FEXPORT(__smtc_ipi_vector)
        li      k1,ST0_CU0
        or      k1,k1,k0
        mtc0    k1,CP0_STATUS
-       ehb
+       _ehb
        get_saved_sp
        /* Interrupting TC will have pre-set values in slots in the new frame */
 2:     subu    k1,k1,PT_SIZE
@@ -90,7 +90,7 @@ FEXPORT(__smtc_ipi_vector)
        lw      k0,PT_TCSTATUS(k1)
        /* Write it to TCStatus to restore CU/KSU/IXMT state */
        mtc0    k0,$2,1
-       ehb
+       _ehb
        lw      k0,PT_EPC(k1)
        mtc0    k0,CP0_EPC
        /* Save all will redundantly recompute the SP, but use it for now */
@@ -116,7 +116,7 @@ LEAF(self_ipi)
        mfc0    t0,CP0_TCSTATUS
        ori     t1,t0,TCSTATUS_IXMT
        mtc0    t1,CP0_TCSTATUS
-       ehb
+       _ehb
        /* We know we're in kernel mode, so prepare stack frame */
        subu    t1,sp,PT_SIZE
        sw      ra,PT_EPC(t1)
index 2c42f6b00a49e2f171d09043395e35d39781e947..92e62ef711edbac3d7aeedd7d73ffcccfc705fa4 100644 (file)
        ori     \reg, \reg, TCSTATUS_IXMT
        xori    \reg, \reg, TCSTATUS_IXMT
        mtc0    \reg, CP0_TCSTATUS
-       ehb
+       _ehb
        .endm
 
        .macro  local_irq_disable reg=t0
        mfc0    \reg, CP0_TCSTATUS
        ori     \reg, \reg, TCSTATUS_IXMT
        mtc0    \reg, CP0_TCSTATUS
-       ehb
+       _ehb
        .endm
 #else
        .macro  local_irq_enable reg=t0
index 673977901ed3e65b490031bbd2ecb38fef279c71..9192d76c133dc444d49148a3ebb1d5bfd3eade74 100644 (file)
@@ -1459,7 +1459,8 @@ static inline void __emt(unsigned int previous)
 static inline void __ehb(void)
 {
        __asm__ __volatile__(
-       "       ehb                                                     \n");
+       "       .set    mips32r2                                        \n"
+       "       ehb                                                     \n"             "       .set    mips0                                           \n");
 }
 
 /*
index 513aa5133830e59aa0f0dfa9c1162accbbbefc72..158a4cd12e460a0dfb7a4a5ee56fc25ee28008f2 100644 (file)
                mfc0    v0, CP0_TCSTATUS
                ori     v0, TCSTATUS_IXMT
                mtc0    v0, CP0_TCSTATUS
-               ehb
+               _ehb
                DMT     5                               # dmt a1
                jal     mips_ihb
 #endif /* CONFIG_MIPS_MT_SMTC */
  * restore TCStatus.IXMT.
  */
                LONG_L  v1, PT_TCSTATUS(sp)
-               ehb
+               _ehb
                mfc0    v0, CP0_TCSTATUS
                andi    v1, TCSTATUS_IXMT
                /* We know that TCStatua.IXMT should be set from above */
                xori    v0, v0, TCSTATUS_IXMT
                or      v0, v0, v1
                mtc0    v0, CP0_TCSTATUS
-               ehb
+               _ehb
                andi    a1, a1, VPECONTROL_TE
                beqz    a1, 1f
                emt
                /* Clear TKSU, leave IXMT */
                xori    t0, 0x00001800
                mtc0    t0, CP0_TCSTATUS
-               ehb
+               _ehb
                /* We need to leave the global IE bit set, but clear EXL...*/
                mfc0    t0, CP0_STATUS
                ori     t0, ST0_EXL | ST0_ERL
                 * and enable interrupts only for the
                 * current TC, using the TCStatus register.
                 */
-               ehb
+               _ehb
                mfc0    t0,CP0_TCSTATUS
                /* Fortunately CU 0 is in the same place in both registers */
                /* Set TCU0, TKSU (for later inversion) and IXMT */
                /* Clear TKSU *and* IXMT */
                xori    t0, 0x00001c00
                mtc0    t0, CP0_TCSTATUS
-               ehb
+               _ehb
                /* We need to leave the global IE bit set, but clear EXL...*/
                mfc0    t0, CP0_STATUS
                ori     t0, ST0_EXL
                andi    v1, v0, TCSTATUS_IXMT
                ori     v0, TCSTATUS_IXMT
                mtc0    v0, CP0_TCSTATUS
-               ehb
+               _ehb
                DMT     2                               # dmt   v0
                /*
                 * We don't know a priori if ra is "live"
                xori    t0, 0x1e
                mtc0    t0, CP0_STATUS
 #ifdef CONFIG_MIPS_MT_SMTC
-               ehb
+               _ehb
                andi    v0, v0, VPECONTROL_TE
                beqz    v0, 2f
                nop     /* delay slot */