Re: [PATCH v5 03/10] arm64: atomics: avoid out-of-line ll/sc atomics
From: Nathan Chancellor <hidden>
Date: 2019-09-03 06:01:00
On Thu, Aug 29, 2019 at 04:48:27PM +0100, Will Deacon wrote:
From: Andrew Murray <redacted> When building for LSE atomics (CONFIG_ARM64_LSE_ATOMICS), if the hardware or toolchain doesn't support it the existing code will fallback to ll/sc atomics. It achieves this by branching from inline assembly to a function that is built with special compile flags. Further this results in the clobbering of registers even when the fallback isn't used increasing register pressure. Improve this by providing inline implementations of both LSE and ll/sc and use a static key to select between them, which allows for the compiler to generate better atomics code. Put the LL/SC fallback atomics in their own subsection to improve icache performance. Signed-off-by: Andrew Murray <redacted> Signed-off-by: Will Deacon <will@kernel.org>
For some reason, this causes a clang built kernel to fail to boot in QEMU. There are no logs, it just never starts. I am off for the next two days so I am going to try to look into this but you might have some immediate ideas. https://github.com/ClangBuiltLinux/linux/issues/649 There is another weird failure that might be somewhat related but I have no idea. https://github.com/ClangBuiltLinux/linux/issues/648 Cheers, Nathan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel