diff options
author | Juergen Gross <jgross@suse.com> | 2021-03-11 17:23:07 +0300 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-03-11 18:04:39 +0300 |
commit | b046664872dd78a8bebe3d5f3bb9da9baa93f5ca (patch) | |
tree | 6416e614e68e320563a1e706409d0a8cd71f9f65 /tools/include/linux/static_call_types.h | |
parent | 5e21a3ecad1500e35b46701e7f3f232e15d78e69 (diff) | |
download | linux-b046664872dd78a8bebe3d5f3bb9da9baa93f5ca.tar.xz |
static_call: Move struct static_call_key definition to static_call_types.h
Having the definition of static_call() in static_call_types.h makes
no sense as long struct static_call_key isn't defined there, as the
generic implementation of static_call() is referencing this structure.
So move the definition of struct static_call_key to static_call_types.h.
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210311142319.4723-3-jgross@suse.com
Diffstat (limited to 'tools/include/linux/static_call_types.h')
-rw-r--r-- | tools/include/linux/static_call_types.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/include/linux/static_call_types.h b/tools/include/linux/static_call_types.h index ae5662d368b9..5a00b8b2cf9f 100644 --- a/tools/include/linux/static_call_types.h +++ b/tools/include/linux/static_call_types.h @@ -58,11 +58,25 @@ struct static_call_site { __raw_static_call(name); \ }) +struct static_call_key { + void *func; + union { + /* bit 0: 0 = mods, 1 = sites */ + unsigned long type; + struct static_call_mod *mods; + struct static_call_site *sites; + }; +}; + #else /* !CONFIG_HAVE_STATIC_CALL_INLINE */ #define __STATIC_CALL_ADDRESSABLE(name) #define __static_call(name) __raw_static_call(name) +struct static_call_key { + void *func; +}; + #endif /* CONFIG_HAVE_STATIC_CALL_INLINE */ #ifdef MODULE @@ -77,6 +91,10 @@ struct static_call_site { #else +struct static_call_key { + void *func; +}; + #define static_call(name) \ ((typeof(STATIC_CALL_TRAMP(name))*)(STATIC_CALL_KEY(name).func)) |