VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / include / asm-mips / system.h
index 9b7354b..9bacd11 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <asm/addrspace.h>
 #include <asm/ptrace.h>
+#include <asm/hazards.h>
 
 __asm__ (
        ".macro\tlocal_irq_enable\n\t"
@@ -29,6 +30,7 @@ __asm__ (
        "ori\t$1,0x1f\n\t"
        "xori\t$1,0x1e\n\t"
        "mtc0\t$1,$12\n\t"
+       "irq_enable_hazard\n\t"
        ".set\tpop\n\t"
        ".endm");
 
@@ -57,9 +59,7 @@ __asm__ (
        "xori\t$1,1\n\t"
        ".set\tnoreorder\n\t"
        "mtc0\t$1,$12\n\t"
-       "sll\t$0, $0, 1\t\t\t# nop\n\t"
-       "sll\t$0, $0, 1\t\t\t# nop\n\t"
-       "sll\t$0, $0, 1\t\t\t# nop\n\t"
+       "irq_disable_hazard\n\t"
        ".set\tpop\n\t"
        ".endm");
 
@@ -80,7 +80,7 @@ __asm__ (
        ".set\tpop\n\t"
        ".endm");
 
-#define local_save_flags(x)                                                    \
+#define local_save_flags(x)                                            \
 __asm__ __volatile__(                                                  \
        "local_save_flags %0"                                           \
        : "=r" (x))
@@ -95,9 +95,7 @@ __asm__ (
        "xori\t$1, 1\n\t"
        ".set\tnoreorder\n\t"
        "mtc0\t$1, $12\n\t"
-       "sll\t$0, $0, 1\t\t\t# nop\n\t"
-       "sll\t$0, $0, 1\t\t\t# nop\n\t"
-       "sll\t$0, $0, 1\t\t\t# nop\n\t"
+       "irq_disable_hazard\n\t"
        ".set\tpop\n\t"
        ".endm");
 
@@ -108,7 +106,8 @@ __asm__ __volatile__(                                                       \
        : /* no inputs */                                               \
        : "memory")
 
-__asm__(".macro\tlocal_irq_restore flags\n\t"
+__asm__ (
+       ".macro\tlocal_irq_restore flags\n\t"
        ".set\tnoreorder\n\t"
        ".set\tnoat\n\t"
        "mfc0\t$1, $12\n\t"
@@ -117,14 +116,12 @@ __asm__(".macro\tlocal_irq_restore flags\n\t"
        "xori\t$1, 1\n\t"
        "or\t\\flags, $1\n\t"
        "mtc0\t\\flags, $12\n\t"
-       "sll\t$0, $0, 1\t\t\t# nop\n\t"
-       "sll\t$0, $0, 1\t\t\t# nop\n\t"
-       "sll\t$0, $0, 1\t\t\t# nop\n\t"
+       "irq_disable_hazard\n\t"
        ".set\tat\n\t"
        ".set\treorder\n\t"
        ".endm");
 
-#define local_irq_restore(flags)                                               \
+#define local_irq_restore(flags)                                       \
 do {                                                                   \
        unsigned long __tmp1;                                           \
                                                                        \