powerpc/fsl: Add barrier_nospec implementation for NXP PowerPC Book3E
Implement the barrier_nospec as a isync;sync instruction sequence. The implementation uses the infrastructure built for BOOK3S 64. Signed-off-by: Diana Craciun <diana.craciun@nxp.com> [mpe: Split out of larger patch] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
406d2b6ae3
commit
ebcd1bfc33
@@ -78,12 +78,18 @@ do { \
|
||||
___p1; \
|
||||
})
|
||||
|
||||
#ifdef CONFIG_PPC_BOOK3S_64
|
||||
#define NOSPEC_BARRIER_SLOT nop
|
||||
#elif defined(CONFIG_PPC_FSL_BOOK3E)
|
||||
#define NOSPEC_BARRIER_SLOT nop; nop
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PPC_BARRIER_NOSPEC
|
||||
/*
|
||||
* Prevent execution of subsequent instructions until preceding branches have
|
||||
* been fully resolved and are no longer executing speculatively.
|
||||
*/
|
||||
#define barrier_nospec_asm NOSPEC_BARRIER_FIXUP_SECTION; nop
|
||||
#define barrier_nospec_asm NOSPEC_BARRIER_FIXUP_SECTION; NOSPEC_BARRIER_SLOT
|
||||
|
||||
// This also acts as a compiler barrier due to the memory clobber.
|
||||
#define barrier_nospec() asm (stringify_in_c(barrier_nospec_asm) ::: "memory")
|
||||
|
Reference in New Issue
Block a user