u-boot/arch/mips/include/asm
Paul Burton d8b326976a MIPS: Clear instruction hazards in flush_cache()
When writing code, for example during relocation, we ensure that the
icache has a coherent view of the new instructions with a call to
flush_cache(). This handles the bulk of the work to ensure the new
instructions will execute as expected, however it does not ensure that
the CPU pipeline doesn't already contain instructions taken from a stale
view of the affected memory. This could theoretically be a problem for
relocation, but in practice typically isn't because we sync caches for
enough code after the entry point of the newly written code that by the
time the CPU pipeline might possibly fetch any of it we'll have long ago
written it back & invalidated any stale icache entries. This is however
a problem for shorter regions of code.

In preparation for later patches which write shorter segments of code,
ensure any instruction hazards are cleared by flush_cache() by
introducing & using a new instruction_hazard_barrier() function which
makes use of the jr.hb instruction to clear the hazard.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: u-boot@lists.denx.de
2017-11-28 21:59:30 +01:00
..
mach-generic
addrspace.h
asm-offsets.h MIPS: add asm-offsets for struct pt_regs 2016-11-30 16:11:46 +01:00
asm.h
bitops.h
byteorder.h
cache.h mips: Let cache.h be included from assembly source 2016-11-30 16:13:17 +01:00
cachectl.h
cacheops.h
cm.h MIPS: Join the coherent domain when a CM is present 2016-09-21 15:04:04 +02:00
config.h
const.h mips: Use common _AC macro now. 2017-01-10 08:19:26 -05:00
cpu-features.h
global_data.h MIPS: L2 cache support 2016-09-21 15:04:04 +02:00
gpio.h
io.h mips: Use asm-generic/io.h 2017-10-02 21:52:23 -04:00
isadep.h
linkage.h efi: Use asmlinkage for EFIAPI 2016-10-19 09:01:53 +02:00
malta.h
mipsregs.h MIPS: fix iand optimize setup of CP0 registers 2016-11-30 16:11:46 +01:00
pgtable-bits.h
posix_types.h
processor.h
ptrace.h
reboot.h
reg.h
regdef.h
relocs.h MIPS: Stop building position independent code 2017-07-25 20:44:00 +02:00
sections.h MIPS: Stop building position independent code 2017-07-25 20:44:00 +02:00
sgidefs.h
string.h
system.h MIPS: Clear instruction hazards in flush_cache() 2017-11-28 21:59:30 +01:00
types.h
u-boot-mips.h MIPS: add handling for generic and EJTAG exceptions 2016-11-30 16:12:17 +01:00
u-boot.h mips: Make u-boot-mips.h a private header 2017-06-05 11:02:33 -04:00
unaligned.h