aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/alternative.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2024-11-28 10:38:57 +0100
committerPeter Zijlstra <peterz@infradead.org>2024-12-02 12:01:42 +0100
commitf0cd57c35a75f152d3b31b9be3f7f413b96a6d3f (patch)
tree2f4c38b1772d6535bf11ad87ca6215798f201856 /arch/x86/include/asm/alternative.h
parentobjtool: Convert VALIDATE_UNRET_BEGIN to ANNOTATE (diff)
downloadlinux-f0cd57c35a75f152d3b31b9be3f7f413b96a6d3f.tar.gz
linux-f0cd57c35a75f152d3b31b9be3f7f413b96a6d3f.zip
objtool: Convert ANNOTATE_IGNORE_ALTERNATIVE 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.465691316@infradead.org
Diffstat (limited to 'arch/x86/include/asm/alternative.h')
-rw-r--r--arch/x86/include/asm/alternative.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h
index dc03a647776d..595695f85f80 100644
--- a/arch/x86/include/asm/alternative.h
+++ b/arch/x86/include/asm/alternative.h
@@ -4,6 +4,7 @@
#include <linux/types.h>
#include <linux/stringify.h>
+#include <linux/objtool.h>
#include <asm/asm.h>
#define ALT_FLAGS_SHIFT 16
@@ -58,11 +59,7 @@
* objtool annotation to ignore the alternatives and only consider the original
* instruction(s).
*/
-#define ANNOTATE_IGNORE_ALTERNATIVE \
- "999:\n\t" \
- ".pushsection .discard.ignore_alts\n\t" \
- ".long 999b\n\t" \
- ".popsection\n\t"
+#define ANNOTATE_IGNORE_ALTERNATIVE ASM_ANNOTATE(ANNOTYPE_IGNORE_ALTS)
/*
* The patching flags are part of the upper bits of the @ft_flags parameter when
@@ -314,12 +311,7 @@ void nop_func(void);
* objtool annotation to ignore the alternatives and only consider the original
* instruction(s).
*/
-.macro ANNOTATE_IGNORE_ALTERNATIVE
- .Lannotate_\@:
- .pushsection .discard.ignore_alts
- .long .Lannotate_\@
- .popsection
-.endm
+#define ANNOTATE_IGNORE_ALTERNATIVE ANNOTATE type=ANNOTYPE_IGNORE_ALTS
/*
* Issue one struct alt_instr descriptor entry (need to put it into