u-boot-brain/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 MIPS: sync I/O related header files with linux-4.4 2016-01-16 21:06:46 +01:00
addrspace.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
asm-offsets.h MIPS: add asm-offsets for struct pt_regs 2016-11-30 16:11:46 +01:00
asm.h MIPS: sync processor and register definitions with linux-4.4 2016-01-16 21:06:46 +01:00
bitops.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
byteorder.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
cache.h mips: Let cache.h be included from assembly source 2016-11-30 16:13:17 +01:00
cachectl.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
cacheops.h MIPS: fix mips_cache fallback without __builtin_mips_cache 2016-03-09 11:00:40 +01:00
cm.h MIPS: Join the coherent domain when a CM is present 2016-09-21 15:04:04 +02:00
config.h MIPS: add support for pre-relocation malloc 2015-01-21 14:07:23 +01:00
const.h mips: Use common _AC macro now. 2017-01-10 08:19:26 -05:00
cpu-features.h MIPS: sync I/O related header files with linux-4.4 2016-01-16 21:06:46 +01:00
global_data.h MIPS: L2 cache support 2016-09-21 15:04:04 +02:00
gpio.h MIPS: add asm/gpio.h to fix compilation error with CONFIG_CMD_GPIO. 2016-01-16 21:06:45 +01:00
io.h mips: Use asm-generic/io.h 2017-10-02 21:52:23 -04:00
isadep.h MIPS: sync processor and register definitions with linux-4.4 2016-01-16 21:06:46 +01:00
linkage.h efi: Use asmlinkage for EFIAPI 2016-10-19 09:01:53 +02:00
malta.h malta: IDE support 2015-01-29 13:11:02 +01:00
mipsregs.h MIPS: fix iand optimize setup of CP0 registers 2016-11-30 16:11:46 +01:00
pgtable-bits.h MIPS: sync I/O related header files with linux-4.4 2016-01-16 21:06:46 +01:00
posix_types.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
processor.h MIPS: sync processor and register definitions with linux-4.4 2016-01-16 21:06:46 +01:00
ptrace.h MIPS: sync processor and register definitions with linux-4.4 2016-01-16 21:06:46 +01:00
reboot.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
reg.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
regdef.h MIPS: sync processor and register definitions with linux-4.4 2016-01-16 21:06:46 +01:00
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 MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
string.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
system.h MIPS: Clear instruction hazards in flush_cache() 2017-11-28 21:59:30 +01:00
types.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
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 MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00