]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: lse: fix LSE atomics with LLVM's integrated assembler
authorSami Tolvanen <samitolvanen@google.com>
Thu, 31 Oct 2019 19:57:05 +0000 (12:57 -0700)
committerWill Deacon <will@kernel.org>
Thu, 16 Jan 2020 17:25:10 +0000 (17:25 +0000)
commitbdb4ef9c9a72eb9cb1a2f8dfcde5aaffa31df308
tree71b7d809433f946029bb3dd4d27ad17cf552cd4d
parent646cf7ee5f9780d038ddeb0aba0fbb1435cffff2
arm64: lse: fix LSE atomics with LLVM's integrated assembler

Unlike gcc, clang considers each inline assembly block to be independent
and therefore, when using the integrated assembler for inline assembly,
any preambles that enable features must be repeated in each block.

This change defines __LSE_PREAMBLE and adds it to each inline assembly
block that has LSE instructions, which allows them to be compiled also
with clang's assembler.

Link: https://github.com/ClangBuiltLinux/linux/issues/671
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Tested-by: Andrew Murray <andrew.murray@arm.com>
Tested-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Andrew Murray <andrew.murray@arm.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/atomic_lse.h
arch/arm64/include/asm/lse.h