linux/tools/testing/selftests/rseq
Justin Stitt 078a2ead54 selftests/rseq: fix kselftest Clang build warnings
When building with Clang, I am getting many warnings from the selftests/rseq tree.

Here's one such example from rseq tree:
|  param_test.c🔢10: error: address argument to atomic operation must be a pointer to _Atomic type ('intptr_t *' (aka 'long *') invalid)
|   1234 |         while (!atomic_load(&args->percpu_list_ptr)) {}
|        |                 ^           ~~~~~~~~~~~~~~~~~~~~~~
|  /usr/local/google/home/justinstitt/repos/tc-build/build/llvm/final/lib/clang/18/include/stdatomic.h:140:29: note: expanded from macro 'atomic_load'
|    140 | #define atomic_load(object) __c11_atomic_load(object, __ATOMIC_SEQ_CST)
|        |                             ^                 ~~~~~~

Use compiler builtins `__atomic_load_n()` and `__atomic_store_n()` with
accompanying __ATOMIC_ACQUIRE and __ATOMIC_RELEASE, respectively. This
will fix the warnings because the compiler builtins do not expect their
arguments to have _Atomic type. This should also make TSAN happier.

Link: https://github.com/ClangBuiltLinux/linux/issues/1698
Link: https://github.com/ClangBuiltLinux/continuous-integration2/issues/61
Suggested-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Justin Stitt <justinstitt@google.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2023-09-26 19:24:57 -06:00
..
.gitignore selftests/rseq: Implement parametrized mm_cid test 2022-12-27 12:52:15 +01:00
basic_percpu_ops_test.c selftests/rseq: Implement basic percpu ops mm_cid test 2022-12-27 12:52:15 +01:00
basic_test.c selftests/rseq: Implement rseq numa node id field selftest 2022-12-27 12:52:11 +01:00
compiler.h selftests/rseq: Implement rseq_unqual_scalar_typeof 2023-08-08 14:42:01 -06:00
Makefile linux-kselftest-next-6.6-rc1 2023-08-28 18:46:47 -07:00
param_test.c selftests/rseq: fix kselftest Clang build warnings 2023-09-26 19:24:57 -06:00
rseq-abi.h selftests/rseq: Implement rseq mm_cid field support 2022-12-27 12:52:12 +01:00
rseq-arm64-bits.h selftests/rseq: arm64: Template memory ordering and percpu access mode 2022-12-27 12:52:13 +01:00
rseq-arm64.h selftests/rseq: Fix arm64 buggy load-acquire/store-release macros 2023-08-08 14:42:06 -06:00
rseq-arm-bits.h selftests/rseq: arm: Template memory ordering and percpu access mode 2022-12-27 12:52:13 +01:00
rseq-arm.h selftests/rseq: Use rseq_unqual_scalar_typeof in macros 2023-08-08 14:42:12 -06:00
rseq-bits-reset.h selftests/rseq: x86: Template memory ordering and percpu access mode 2022-12-27 12:52:12 +01:00
rseq-bits-template.h selftests/rseq: x86: Template memory ordering and percpu access mode 2022-12-27 12:52:12 +01:00
rseq-generic-thread-pointer.h selftests/rseq: Introduce thread pointer getters 2022-02-02 13:11:35 +01:00
rseq-mips-bits.h selftests/rseq: mips: Template memory ordering and percpu access mode 2022-12-27 12:52:13 +01:00
rseq-mips.h selftests/rseq: Use rseq_unqual_scalar_typeof in macros 2023-08-08 14:42:12 -06:00
rseq-ppc-bits.h selftests/rseq: ppc: Template memory ordering and percpu access mode 2022-12-27 12:52:14 +01:00
rseq-ppc-thread-pointer.h selftests/rseq: Introduce thread pointer getters 2022-02-02 13:11:35 +01:00
rseq-ppc.h selftests/rseq: Use rseq_unqual_scalar_typeof in macros 2023-08-08 14:42:12 -06:00
rseq-riscv-bits.h selftests/rseq: riscv: Template memory ordering and percpu access mode 2022-12-27 12:52:14 +01:00
rseq-riscv.h selftests/rseq: Use rseq_unqual_scalar_typeof in macros 2023-08-08 14:42:12 -06:00
rseq-s390-bits.h selftests/rseq: s390: Template memory ordering and percpu access mode 2022-12-27 12:52:14 +01:00
rseq-s390.h selftests/rseq: Use rseq_unqual_scalar_typeof in macros 2023-08-08 14:42:12 -06:00
rseq-thread-pointer.h selftests/rseq: Introduce thread pointer getters 2022-02-02 13:11:35 +01:00
rseq-x86-bits.h selftests/rseq: x86: Template memory ordering and percpu access mode 2022-12-27 12:52:12 +01:00
rseq-x86-thread-pointer.h selftests/rseq: Introduce thread pointer getters 2022-02-02 13:11:35 +01:00
rseq-x86.h selftests/rseq: Use rseq_unqual_scalar_typeof in macros 2023-08-08 14:42:12 -06:00
rseq.c selftests/rseq: Fix build with undefined __weak 2023-08-04 18:10:29 -04:00
rseq.h selftests/rseq: x86: Template memory ordering and percpu access mode 2022-12-27 12:52:12 +01:00
run_param_test.sh selftests/rseq: Revert "selftests/rseq: Add mm_numa_cid to test script" 2023-01-12 11:22:22 +01:00
settings rseq/selftests: Turn off timeout setting 2019-12-23 10:52:41 -07:00