#include <asm/addrspace.h>
#include <asm/ptrace.h>
+#include <asm/hazards.h>
__asm__ (
".macro\tlocal_irq_enable\n\t"
"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");
"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");
".set\tpop\n\t"
".endm");
-#define local_save_flags(x) \
+#define local_save_flags(x) \
__asm__ __volatile__( \
"local_save_flags %0" \
: "=r" (x))
"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");
: /* 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"
"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; \
\