1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _STATIC_CALL_TYPES_H
3 #define _STATIC_CALL_TYPES_H
5 #include <linux/types.h>
6 #include <linux/stringify.h>
8 #define STATIC_CALL_KEY_PREFIX __SCK__
9 #define STATIC_CALL_KEY_PREFIX_STR __stringify(STATIC_CALL_KEY_PREFIX)
10 #define STATIC_CALL_KEY_PREFIX_LEN (sizeof(STATIC_CALL_KEY_PREFIX_STR) - 1)
11 #define STATIC_CALL_KEY(name) __PASTE(STATIC_CALL_KEY_PREFIX, name)
13 #define STATIC_CALL_TRAMP_PREFIX __SCT__
14 #define STATIC_CALL_TRAMP_PREFIX_STR __stringify(STATIC_CALL_TRAMP_PREFIX)
15 #define STATIC_CALL_TRAMP_PREFIX_LEN (sizeof(STATIC_CALL_TRAMP_PREFIX_STR) - 1)
16 #define STATIC_CALL_TRAMP(name) __PASTE(STATIC_CALL_TRAMP_PREFIX, name)
17 #define STATIC_CALL_TRAMP_STR(name) __stringify(STATIC_CALL_TRAMP(name))
20 * Flags in the low bits of static_call_site::key.
22 #define STATIC_CALL_SITE_TAIL 1UL /* tail call */
23 #define STATIC_CALL_SITE_INIT 2UL /* init section */
24 #define STATIC_CALL_SITE_FLAGS 3UL
27 * The static call site table needs to be created by external tooling (objtool
28 * or a compiler plugin).
30 struct static_call_site {
35 #endif /* _STATIC_CALL_TYPES_H */