x86-64: remove locked instruction from switch_to()
[deliverable/linux.git] / arch / x86 / include / asm / system.h
index 8e626ea33a1a64d1565c10a0784200ef92ec9a31..fa47b1e6a86651872c98ce2e2c144f05ecda92d3 100644 (file)
@@ -96,15 +96,15 @@ do {                                                                        \
             "thread_return:\n\t"                                         \
             "movq %%gs:%P[pda_pcurrent],%%rsi\n\t"                       \
             "movq %P[thread_info](%%rsi),%%r8\n\t"                       \
-            LOCK_PREFIX "btr  %[tif_fork],%P[ti_flags](%%r8)\n\t"        \
             "movq %%rax,%%rdi\n\t"                                       \
-            "jc   ret_from_fork\n\t"                                     \
+            "testl  %[_tif_fork],%P[ti_flags](%%r8)\n\t"         \
+            "jnz   ret_from_fork\n\t"                                    \
             RESTORE_CONTEXT                                              \
             : "=a" (last)                                                \
             : [next] "S" (next), [prev] "D" (prev),                      \
               [threadrsp] "i" (offsetof(struct task_struct, thread.sp)), \
               [ti_flags] "i" (offsetof(struct thread_info, flags)),      \
-              [tif_fork] "i" (TIF_FORK),                                 \
+              [_tif_fork] "i" (_TIF_FORK),                               \
               [thread_info] "i" (offsetof(struct task_struct, stack)),   \
               [pda_pcurrent] "i" (offsetof(struct x8664_pda, pcurrent))  \
             : "memory", "cc" __EXTRA_CLOBBER)
This page took 0.025967 seconds and 5 git commands to generate.