arm-trusted-firmware/include/arch/aarch64
Andre Przywara 2be491b1dc aarch64/arm: Add compiler barrier to barrier instructions
When issuing barrier instructions like DSB or DMB, we must make sure
that the compiler does not undermine out efforts to fence off
instructions. Currently the compiler is free to move the barrier
instruction around, in respect to former or later memory access
statements, which is not what we want.

Add a compiler barrier to the inline assembly statement in our
DEFINE_SYSOP_TYPE_FUNC macro, to make sure memory accesses are not
reordered by the compiler.
This is in line with Linux' definition:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/include/asm/barrier.h

Since those instructions share a definition, apart from DSB and DMB this
now also covers some TLBI instructions. Having a compiler barrier there
also is useful, although we probably have stronger barriers in place
already.

Change-Id: If6fe97b13a562643a643efc507cb4aad29daa5b6
Reported-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2020-10-27 16:15:00 +00:00
..
arch.h Increase type widths to satisfy width requirements 2020-10-12 10:55:03 -05:00
arch_features.h Enable ARMv8.6-ECV Self-Synch when booting to EL2 2020-06-02 09:18:58 -05:00
arch_helpers.h aarch64/arm: Add compiler barrier to barrier instructions 2020-10-27 16:15:00 +00:00
asm_macros.S Use Speculation Barrier instruction for v8.5 cores 2020-03-11 11:11:05 -05:00
assert_macros.S Reorganize architecture-dependent header files 2019-01-04 10:43:16 +00:00
console_macros.S Console: remove deprecated finish_console_register 2019-04-03 14:55:18 +01:00
el3_common_macros.S Increase type widths to satisfy width requirements 2020-10-12 10:55:03 -05:00
smccc_helpers.h Replace __ASSEMBLY__ with compiler-builtin __ASSEMBLER__ 2019-08-01 13:14:12 -07:00