]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: introduce nops and __nops macros for NOP sequences
authorHeiko Stuebner <heiko@sntech.de>
Tue, 7 Jun 2022 14:30:58 +0000 (16:30 +0200)
committerPalmer Dabbelt <palmer@rivosinc.com>
Fri, 22 Jul 2022 00:17:29 +0000 (17:17 -0700)
commita53ea26fe82d71cc8f4aaea14330e6a7560fd1c7
tree010b56d7116e13d42a6fc622e072167adec493c6
parentf040cca4b0da0180bf9de9141ef5c95f60f85182
riscv: introduce nops and __nops macros for NOP sequences

NOP sequences tend to get used for padding out alternative sections

This change adds macros for generating these sequences as both inline
asm blocks, but also as strings suitable for embedding in other asm
blocks directly.

It essentially mimics similar functionality from arm64 introduced by
Wil Deacon in commit 29d5800a52ec ("arm64: barriers: introduce nops
and __nops macros for NOP sequences").

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20220607143059.1054074-2-heiko@sntech.de
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/asm.h
arch/riscv/include/asm/barrier.h