|
@@ -76,6 +76,21 @@ do { \
|
|
___p1; \
|
|
___p1; \
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+#ifdef CONFIG_PPC_BOOK3S_64
|
|
|
|
+/*
|
|
|
|
+ * Prevent execution of subsequent instructions until preceding branches have
|
|
|
|
+ * been fully resolved and are no longer executing speculatively.
|
|
|
|
+ */
|
|
|
|
+#define barrier_nospec_asm ori 31,31,0
|
|
|
|
+
|
|
|
|
+// This also acts as a compiler barrier due to the memory clobber.
|
|
|
|
+#define barrier_nospec() asm (stringify_in_c(barrier_nospec_asm) ::: "memory")
|
|
|
|
+
|
|
|
|
+#else /* !CONFIG_PPC_BOOK3S_64 */
|
|
|
|
+#define barrier_nospec_asm
|
|
|
|
+#define barrier_nospec()
|
|
|
|
+#endif
|
|
|
|
+
|
|
#include <asm-generic/barrier.h>
|
|
#include <asm-generic/barrier.h>
|
|
|
|
|
|
#endif /* _ASM_POWERPC_BARRIER_H */
|
|
#endif /* _ASM_POWERPC_BARRIER_H */
|