objtool: Prevent GCC from merging annotate_unreachable(), take 2
[sfrench/cifs-2.6.git] / include / linux / compiler.h
index fd8697aa4f7362a63d2f75f958e89a383977a906..202710420d6deba1bba8107616359ae069ffd5e7 100644 (file)
@@ -191,13 +191,13 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
        asm("%c0:\n\t"                                                  \
            ".pushsection .discard.reachable\n\t"                       \
            ".long %c0b - .\n\t"                                        \
-           ".popsection\n\t" : : "i" (__LINE__));                      \
+           ".popsection\n\t" : : "i" (__COUNTER__));                   \
 })
 #define annotate_unreachable() ({                                      \
        asm("%c0:\n\t"                                                  \
            ".pushsection .discard.unreachable\n\t"                     \
            ".long %c0b - .\n\t"                                        \
-           ".popsection\n\t" : : "i" (__LINE__));                      \
+           ".popsection\n\t" : : "i" (__COUNTER__));                   \
 })
 #define ASM_UNREACHABLE                                                        \
        "999:\n\t"                                                      \