Commit 11b854b2 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] x86_64: Call do_notify_resume unconditionally in entry.S

This removes some unnecessary code in the assembly files.

Matches i386 behaviour.

In addition don't clear the work check mask after work has been done.
This fixes some theoretical signal/other event losses.
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 36c1104e
...@@ -197,7 +197,7 @@ ENTRY(system_call) ...@@ -197,7 +197,7 @@ ENTRY(system_call)
*/ */
.globl ret_from_sys_call .globl ret_from_sys_call
ret_from_sys_call: ret_from_sys_call:
movl $_TIF_WORK_MASK,%edi movl $_TIF_ALLWORK_MASK,%edi
/* edi: flagmask */ /* edi: flagmask */
sysret_check: sysret_check:
GET_THREAD_INFO(%rcx) GET_THREAD_INFO(%rcx)
...@@ -223,18 +223,13 @@ sysret_careful: ...@@ -223,18 +223,13 @@ sysret_careful:
jmp sysret_check jmp sysret_check
/* Handle a signal */ /* Handle a signal */
/* edx: work flags (arg3) */
sysret_signal: sysret_signal:
sti sti
testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP),%edx
jz 1f
/* Really a signal */
/* edx: work flags (arg3) */
leaq do_notify_resume(%rip),%rax leaq do_notify_resume(%rip),%rax
leaq -ARGOFFSET(%rsp),%rdi # &pt_regs -> arg1 leaq -ARGOFFSET(%rsp),%rdi # &pt_regs -> arg1
xorl %esi,%esi # oldset -> arg2 xorl %esi,%esi # oldset -> arg2
call ptregscall_common call ptregscall_common
1: movl $_TIF_NEED_RESCHED,%edi
jmp sysret_check jmp sysret_check
/* Do syscall tracing */ /* Do syscall tracing */
...@@ -490,8 +485,6 @@ retint_careful: ...@@ -490,8 +485,6 @@ retint_careful:
jmp retint_check jmp retint_check
retint_signal: retint_signal:
testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP),%edx
jz retint_swapgs
sti sti
SAVE_REST SAVE_REST
movq $-1,ORIG_RAX(%rsp) movq $-1,ORIG_RAX(%rsp)
...@@ -500,7 +493,6 @@ retint_signal: ...@@ -500,7 +493,6 @@ retint_signal:
call do_notify_resume call do_notify_resume
RESTORE_REST RESTORE_REST
cli cli
movl $_TIF_NEED_RESCHED,%edi
GET_THREAD_INFO(%rcx) GET_THREAD_INFO(%rcx)
jmp retint_check jmp retint_check
...@@ -829,21 +821,19 @@ paranoid_userspace: ...@@ -829,21 +821,19 @@ paranoid_userspace:
cli cli
GET_THREAD_INFO(%rcx) GET_THREAD_INFO(%rcx)
movl threadinfo_flags(%rcx),%edx movl threadinfo_flags(%rcx),%edx
testl $_TIF_WORK_MASK,%edx
jz paranoid_swapgs
testl $_TIF_NEED_RESCHED,%edx testl $_TIF_NEED_RESCHED,%edx
jnz paranoid_resched jnz paranoid_resched
testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP),%edx
jnz paranoid_signal
jmp paranoid_swapgs
paranoid_resched:
sti
call schedule
jmp paranoid_exit
paranoid_signal:
sti sti
xorl %esi,%esi /* oldset */ xorl %esi,%esi /* oldset */
movq %rsp,%rdi /* &pt_regs */ movq %rsp,%rdi /* &pt_regs */
call do_notify_resume call do_notify_resume
jmp paranoid_exit jmp paranoid_exit
paranoid_resched:
sti
call schedule
jmp paranoid_exit
CFI_ENDPROC CFI_ENDPROC
ENTRY(int3) ENTRY(int3)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment