Merge branch 'x86-entry-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / arch / x86 / entry / entry_32.S
index d309f30cf7af84e67ac38910eff4256da9c25a11..7b23431be5cb6a535f657c27868dbb0600d65423 100644 (file)
@@ -650,6 +650,7 @@ ENTRY(__switch_to_asm)
        pushl   %ebx
        pushl   %edi
        pushl   %esi
+       pushfl
 
        /* switch stack */
        movl    %esp, TASK_threadsp(%eax)
@@ -672,6 +673,7 @@ ENTRY(__switch_to_asm)
 #endif
 
        /* restore callee-saved registers */
+       popfl
        popl    %esi
        popl    %edi
        popl    %ebx
@@ -766,13 +768,12 @@ END(ret_from_exception)
 #ifdef CONFIG_PREEMPT
 ENTRY(resume_kernel)
        DISABLE_INTERRUPTS(CLBR_ANY)
-.Lneed_resched:
        cmpl    $0, PER_CPU_VAR(__preempt_count)
        jnz     restore_all_kernel
        testl   $X86_EFLAGS_IF, PT_EFLAGS(%esp) # interrupts off (exception path) ?
        jz      restore_all_kernel
        call    preempt_schedule_irq
-       jmp     .Lneed_resched
+       jmp     restore_all_kernel
 END(resume_kernel)
 #endif