Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1cbf8990 authored by Diana Craciun's avatar Diana Craciun Committed by Michael Ellerman
Browse files

powerpc/fsl: Add macro to flush the branch predictor



The BUCSR register can be used to invalidate the entries in the
branch prediction mechanisms.

Signed-off-by: default avatarDiana Craciun <diana.craciun@nxp.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 76a5eaa3
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -806,4 +806,14 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601)
	stringify_in_c(.long (_target) - . ;)	\
	stringify_in_c(.previous)

#ifdef CONFIG_PPC_FSL_BOOK3E
#define BTB_FLUSH(reg)			\
	lis reg,BUCSR_INIT@h;		\
	ori reg,reg,BUCSR_INIT@l;	\
	mtspr SPRN_BUCSR,reg;		\
	isync;
#else
#define BTB_FLUSH(reg)
#endif /* CONFIG_PPC_FSL_BOOK3E */

#endif /* _ASM_POWERPC_PPC_ASM_H */