#ifndef _ASM_SYSTEM_H
#define _ASM_SYSTEM_H
+#include <asm/asm.h>
#include <asm/sgidefs.h>
#include <asm/ptrace.h>
+#include <linux/stringify.h>
#if 0
#include <linux/kernel.h>
#endif
#define die_if_kernel(msg, regs) \
__die_if_kernel(msg, regs, __FILE__ ":"__FUNCTION__, __LINE__)
+static inline void execution_hazard_barrier(void)
+{
+ __asm__ __volatile__(
+ ".set noreorder\n"
+ "ehb\n"
+ ".set reorder");
+}
+
+static inline void instruction_hazard_barrier(void)
+{
+ unsigned long tmp;
+
+ asm volatile(
+ __stringify(PTR_LA) "\t%0, 1f\n"
+ " jr.hb %0\n"
+ "1: .insn"
+ : "=&r"(tmp));
+}
+
#endif /* _ASM_SYSTEM_H */