Merge branch 'x86-smap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-3.10.git] / arch / x86 / include / asm / alternative.h
index 444704c..58ed6d9 100644 (file)
 
 #ifdef CONFIG_SMP
 #define LOCK_PREFIX_HERE \
-               ".section .smp_locks,\"a\"\n"   \
-               ".balign 4\n"                   \
-               ".long 671f - .\n" /* offset */ \
-               ".previous\n"                   \
+               ".pushsection .smp_locks,\"a\"\n"       \
+               ".balign 4\n"                           \
+               ".long 671f - .\n" /* offset */         \
+               ".popsection\n"                         \
                "671:"
 
 #define LOCK_PREFIX LOCK_PREFIX_HERE "\n\tlock; "
@@ -99,30 +99,30 @@ static inline int alternatives_text_reserved(void *start, void *end)
 /* alternative assembly primitive: */
 #define ALTERNATIVE(oldinstr, newinstr, feature)                       \
        OLDINSTR(oldinstr)                                              \
-       ".section .altinstructions,\"a\"\n"                             \
+       ".pushsection .altinstructions,\"a\"\n"                         \
        ALTINSTR_ENTRY(feature, 1)                                      \
-       ".previous\n"                                                   \
-       ".section .discard,\"aw\",@progbits\n"                          \
+       ".popsection\n"                                                 \
+       ".pushsection .discard,\"aw\",@progbits\n"                      \
        DISCARD_ENTRY(1)                                                \
-       ".previous\n"                                                   \
-       ".section .altinstr_replacement, \"ax\"\n"                      \
+       ".popsection\n"                                                 \
+       ".pushsection .altinstr_replacement, \"ax\"\n"                  \
        ALTINSTR_REPLACEMENT(newinstr, feature, 1)                      \
-       ".previous"
+       ".popsection"
 
 #define ALTERNATIVE_2(oldinstr, newinstr1, feature1, newinstr2, feature2)\
        OLDINSTR(oldinstr)                                              \
-       ".section .altinstructions,\"a\"\n"                             \
+       ".pushsection .altinstructions,\"a\"\n"                         \
        ALTINSTR_ENTRY(feature1, 1)                                     \
        ALTINSTR_ENTRY(feature2, 2)                                     \
-       ".previous\n"                                                   \
-       ".section .discard,\"aw\",@progbits\n"                          \
+       ".popsection\n"                                                 \
+       ".pushsection .discard,\"aw\",@progbits\n"                      \
        DISCARD_ENTRY(1)                                                \
        DISCARD_ENTRY(2)                                                \
-       ".previous\n"                                                   \
-       ".section .altinstr_replacement, \"ax\"\n"                      \
+       ".popsection\n"                                                 \
+       ".pushsection .altinstr_replacement, \"ax\"\n"                  \
        ALTINSTR_REPLACEMENT(newinstr1, feature1, 1)                    \
        ALTINSTR_REPLACEMENT(newinstr2, feature2, 2)                    \
-       ".previous"
+       ".popsection"
 
 /*
  * This must be included *after* the definition of ALTERNATIVE due to