]> www.infradead.org Git - users/dwmw2/linux.git/commit
selftests/x86: build sysret_rip.c with clang
authorJohn Hubbard <jhubbard@nvidia.com>
Thu, 4 Jul 2024 07:24:28 +0000 (00:24 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 11 Jul 2024 17:23:55 +0000 (11:23 -0600)
commit2ab9c93d6104e36110754d0778103f7f8719d969
tree702ddcb94810725fcf3e2ae48391b037995b2f3e
parent1158655317b6b6e71980533939dce9ab91d9716b
selftests/x86: build sysret_rip.c with clang

When building with clang, via:

    make LLVM=1 -C tools/testing/selftests

...the build fails because clang's inline asm doesn't support all of the
features that are used in the asm() snippet in sysret_rip.c.

Fix this by moving the asm code into the clang_helpers_64.S file, where
it can be built with the assembler's full set of features.

Acked-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/x86/Makefile
tools/testing/selftests/x86/clang_helpers_64.S
tools/testing/selftests/x86/sysret_rip.c