summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2024-11-28 12:38:58 +0300
committerPeter Zijlstra <peterz@infradead.org>2024-12-02 14:01:42 +0300
commit112765ca1cb9353e71b4f5af4e6e6c4a69c28d99 (patch)
treed9a701d28daaecbd9118b420623cd148704c0828 /include/linux
parentf0cd57c35a75f152d3b31b9be3f7f413b96a6d3f (diff)
downloadlinux-112765ca1cb9353e71b4f5af4e6e6c4a69c28d99.tar.xz
objtool: Convert ANNOTATE_INTRA_FUNCTION_CALL to ANNOTATE
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://lore.kernel.org/r/20241128094311.584892071@infradead.org
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/objtool.h16
-rw-r--r--include/linux/objtool_types.h1
2 files changed, 7 insertions, 10 deletions
diff --git a/include/linux/objtool.h b/include/linux/objtool.h
index 5f0bf8052dc7..42287c1e32ce 100644
--- a/include/linux/objtool.h
+++ b/include/linux/objtool.h
@@ -68,16 +68,6 @@
#else /* __ASSEMBLY__ */
/*
- * This macro indicates that the following intra-function call is valid.
- * Any non-annotated intra-function call will cause objtool to issue a warning.
- */
-#define ANNOTATE_INTRA_FUNCTION_CALL \
- 999: \
- .pushsection .discard.intra_function_calls; \
- .long 999b; \
- .popsection;
-
-/*
* In asm, there are two kinds of code: normal C-type callable functions and
* the rest. The normal callable functions can be called by other code, and
* don't do anything unusual with the stack. Such normal callable functions
@@ -154,6 +144,12 @@
#define ANNOTATE_NOENDBR ANNOTATE type=ANNOTYPE_NOENDBR
+/*
+ * This macro indicates that the following intra-function call is valid.
+ * Any non-annotated intra-function call will cause objtool to issue a warning.
+ */
+#define ANNOTATE_INTRA_FUNCTION_CALL ANNOTATE type=ANNOTYPE_INTRA_FUNCTION_CALL
+
#endif /* __ASSEMBLY__ */
#else /* !CONFIG_OBJTOOL */
diff --git a/include/linux/objtool_types.h b/include/linux/objtool_types.h
index eab15dbe1cb7..23d6fb6d04c7 100644
--- a/include/linux/objtool_types.h
+++ b/include/linux/objtool_types.h
@@ -63,5 +63,6 @@ struct unwind_hint {
#define ANNOTYPE_INSTR_END 4
#define ANNOTYPE_UNRET_BEGIN 5
#define ANNOTYPE_IGNORE_ALTS 6
+#define ANNOTYPE_INTRA_FUNCTION_CALL 7
#endif /* _LINUX_OBJTOOL_TYPES_H */