Skip to content

Commit e1df272

Browse files
committed
Merge branch 'for-next/selftests' into for-next/core
* for-next/selftests: (22 commits) kselftest/arm64: Fix hwcaps selftest build kselftest/arm64: add jscvt feature to hwcap test kselftest/arm64: add pmull feature to hwcap test kselftest/arm64: add AES feature check to hwcap test kselftest/arm64: add SHA1 and related features to hwcap test kselftest/arm64: build BTI tests in output directory kselftest/arm64: fix a memleak in zt_regs_run() kselftest/arm64: Size sycall-abi buffers for the actual maximum VL kselftest/arm64: add lse and lse2 features to hwcap test kselftest/arm64: add test item that support to capturing the SIGBUS signal kselftest/arm64: add DEF_SIGHANDLER_FUNC() and DEF_INST_RAISE_SIG() helpers kselftest/arm64: add crc32 feature to hwcap test kselftest/arm64: add float-point feature to hwcap test kselftest/arm64: Use the tools/include compiler.h rather than our own kselftest/arm64: Use shared OPTIMZER_HIDE_VAR() definiton kselftest/arm64: Make the tools/include headers available tools include: Add some common function attributes tools compiler.h: Add OPTIMIZER_HIDE_VAR() kselftest/arm64: Exit streaming mode after collecting signal context kselftest/arm64: add RCpc load-acquire to hwcap test ...
2 parents f8f6211 + 94f23ac commit e1df272

File tree

13 files changed

+470
-124
lines changed

13 files changed

+470
-124
lines changed

tools/include/linux/compiler.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@
4242
# define __always_inline inline __attribute__((always_inline))
4343
#endif
4444

45+
#ifndef __always_unused
46+
#define __always_unused __attribute__((__unused__))
47+
#endif
48+
49+
#ifndef __noreturn
50+
#define __noreturn __attribute__((__noreturn__))
51+
#endif
52+
53+
#ifndef unreachable
54+
#define unreachable() __builtin_unreachable()
55+
#endif
56+
4557
#ifndef noinline
4658
#define noinline
4759
#endif
@@ -190,4 +202,10 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
190202
#define ___PASTE(a, b) a##b
191203
#define __PASTE(a, b) ___PASTE(a, b)
192204

205+
#ifndef OPTIMIZER_HIDE_VAR
206+
/* Make the optimizer believe the variable can be manipulated arbitrarily. */
207+
#define OPTIMIZER_HIDE_VAR(var) \
208+
__asm__ ("" : "=r" (var) : "0" (var))
209+
#endif
210+
193211
#endif /* _TOOLS_LINUX_COMPILER_H */

tools/testing/selftests/arm64/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ CFLAGS += -I$(top_srcdir)/tools/testing/selftests/
1919

2020
CFLAGS += $(KHDR_INCLUDES)
2121

22+
CFLAGS += -I$(top_srcdir)/tools/include
23+
2224
export CFLAGS
2325
export top_srcdir
2426

0 commit comments

Comments
 (0)