summaryrefslogtreecommitdiffstats
path: root/tools/include
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2021-03-31 18:04:19 +0200
committerBorislav Petkov <bp@suse.de>2021-03-31 18:04:19 +0200
commitf2ac256b9a8b7e79847efcd82bd10fd876369b9f (patch)
tree8769fa5130754ecc605df8803650293f88357879 /tools/include
parent52fa82c21f64e900a72437269a5cc9e0034b424e (diff)
parent054ac8ad5ebe4a69e1f0e842483821ddbe560121 (diff)
downloadlinux-f2ac256b9a8b7e79847efcd82bd10fd876369b9f.tar.bz2
Merge 'x86/alternatives'
Pick up dependent changes. Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'tools/include')
-rw-r--r--tools/include/linux/static_call_types.h18
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))