diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-09-10 13:56:22 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-07 18:59:19 +0200 |
commit | 39a3ff30b6ad338a004cdea8969db148f8a68013 (patch) | |
tree | 5433570184e6741faed6594ab041560d24ead14a /drivers | |
parent | 15786d677bbc22a7a02fa2f6c443fe1e36b5af7b (diff) | |
download | linux-stable-39a3ff30b6ad338a004cdea8969db148f8a68013.tar.gz linux-stable-39a3ff30b6ad338a004cdea8969db148f8a68013.tar.bz2 linux-stable-39a3ff30b6ad338a004cdea8969db148f8a68013.zip |
arm64: fix unreachable code issue with cmpxchg
[ Upstream commit 920fdab7b3ce98c14c840261e364f490f3679a62 ]
On arm64 build with clang, sometimes the __cmpxchg_mb is not inlined
when CONFIG_OPTIMIZE_INLINING is set.
Clang then fails a compile-time assertion, because it cannot tell at
compile time what the size of the argument is:
mm/memcontrol.o: In function `__cmpxchg_mb':
memcontrol.c:(.text+0x1a4c): undefined reference to `__compiletime_assert_175'
memcontrol.c:(.text+0x1a4c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `__compiletime_assert_175'
Mark all of the cmpxchg() style functions as __always_inline to
ensure that the compiler can see the result.
Acked-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Nathan Chancellor <natechancellor@gmail.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/648
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Andrew Murray <andrew.murray@arm.com>
Tested-by: Andrew Murray <andrew.murray@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions