]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/x86/include/asm/alternative.h
x86/nospec, objtool: Introduce ANNOTATE_IGNORE_ALTERNATIVE
[linux.git] / arch / x86 / include / asm / alternative.h
index 4c74073a19ccd4b2aa93078c734729e54e65bdd7..094fbc9c0b1c0332a267fb501fb037d3064a85ed 100644 (file)
 #define LOCK_PREFIX ""
 #endif
 
+/*
+ * 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"
+
 struct alt_instr {
        s32 instr_offset;       /* original instruction */
        s32 repl_offset;        /* offset to replacement instruction */