diff options
author | Will Deacon <will.deacon@arm.com> | 2016-09-06 16:40:23 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-09-09 18:12:28 +0100 |
commit | f99a250cb6a3b301b101b4c0f5fcb80593bba6dc (patch) | |
tree | f22f51a75b8215b43807ba2186ec8f9e0a9d5827 /arch/arm64/include/asm/assembler.h | |
parent | 8a71f0c656e0521867931eecff54eb3a35ca65a7 (diff) |
arm64: barriers: introduce nops and __nops macros for NOP sequences
NOP sequences tend to get used for padding out alternative sections
and uarch-specific pipeline flushes in errata workarounds.
This patch adds macros for generating these sequences as both inline
asm blocks, but also as strings suitable for embedding in other asm
blocks directly.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/assembler.h')
-rw-r--r-- | arch/arm64/include/asm/assembler.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/assembler.h index f09a5ae48a44..28bfe6132eb6 100644 --- a/arch/arm64/include/asm/assembler.h +++ b/arch/arm64/include/asm/assembler.h @@ -87,6 +87,15 @@ .endm /* + * NOP sequence + */ + .macro nops, num + .rept \num + nop + .endr + .endm + +/* * Emit an entry into the exception table */ .macro _asm_extable, from, to |