summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/static_call.h4
-rw-r--r--include/linux/static_call_types.h7
2 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/static_call.h b/include/linux/static_call.h
index 0f74581e0e2f..519bd666e096 100644
--- a/include/linux/static_call.h
+++ b/include/linux/static_call.h
@@ -103,7 +103,7 @@
/*
* Either @site or @tramp can be NULL.
*/
-extern void arch_static_call_transform(void *site, void *tramp, void *func);
+extern void arch_static_call_transform(void *site, void *tramp, void *func, bool tail);
#define STATIC_CALL_TRAMP_ADDR(name) &STATIC_CALL_TRAMP(name)
@@ -206,7 +206,7 @@ void __static_call_update(struct static_call_key *key, void *tramp, void *func)
{
cpus_read_lock();
WRITE_ONCE(key->func, func);
- arch_static_call_transform(NULL, tramp, func);
+ arch_static_call_transform(NULL, tramp, func, false);
cpus_read_unlock();
}
diff --git a/include/linux/static_call_types.h b/include/linux/static_call_types.h
index 408d345d83e1..89135bb35bf7 100644
--- a/include/linux/static_call_types.h
+++ b/include/linux/static_call_types.h
@@ -17,6 +17,13 @@
#define STATIC_CALL_TRAMP_STR(name) __stringify(STATIC_CALL_TRAMP(name))
/*
+ * Flags in the low bits of static_call_site::key.
+ */
+#define STATIC_CALL_SITE_TAIL 1UL /* tail call */
+#define STATIC_CALL_SITE_INIT 2UL /* init section */
+#define STATIC_CALL_SITE_FLAGS 3UL
+
+/*
* The static call site table needs to be created by external tooling (objtool
* or a compiler plugin).
*/