The current location of ehb() in mipsmtregs.h does not make sense, since
it is not strictly related to multi-threading, and may be used in code
which does not include mipsmtregs.h

Signed-off-by: Matt Redfearn <[email protected]>
---

 arch/mips/include/asm/barrier.h    | 13 +++++++++++++
 arch/mips/include/asm/mipsmtregs.h |  8 --------
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/arch/mips/include/asm/barrier.h b/arch/mips/include/asm/barrier.h
index a5eb1bb199a7..a98fd8a2bba2 100644
--- a/arch/mips/include/asm/barrier.h
+++ b/arch/mips/include/asm/barrier.h
@@ -222,6 +222,19 @@
 #define __smp_mb__before_atomic()      __smp_mb__before_llsc()
 #define __smp_mb__after_atomic()       smp_llsc_mb()
 
+/**
+ * ehb() - Execution Hazard Barrier
+ *
+ * Stop instruction execution until execution hazards are cleared
+ */
+static inline void ehb(void)
+{
+       __asm__ __volatile__(
+       "       .set    mips32r2                                \n"
+       "       ehb                                             \n"
+       "       .set    mips0                                   \n");
+}
+
 #include <asm-generic/barrier.h>
 
 #endif /* __ASM_BARRIER_H */
diff --git a/arch/mips/include/asm/mipsmtregs.h 
b/arch/mips/include/asm/mipsmtregs.h
index 212336b7c0f4..4acfc78bc504 100644
--- a/arch/mips/include/asm/mipsmtregs.h
+++ b/arch/mips/include/asm/mipsmtregs.h
@@ -274,14 +274,6 @@ static inline void emt(int previous)
                __raw_emt();
 }
 
-static inline void ehb(void)
-{
-       __asm__ __volatile__(
-       "       .set    mips32r2                                \n"
-       "       ehb                                             \n"
-       "       .set    mips0                                   \n");
-}
-
 #define mftc0(rt,sel)                                                  \
 ({                                                                     \
         unsigned long  __res;                                          \
-- 
2.7.4

Reply via email to