aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/entry.S
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2005-04-16 18:25:02 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:25:02 -0400
commit11b854b2f10f398f9a18c65e202853f929dd3185 (patch)
treee982392c93dca9dbdb8aa5bd587a8f6e07bb0ccf /arch/x86_64/kernel/entry.S
parent36c1104e309fe93375e67cdbdb2a980f23965f3b (diff)
[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: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/entry.S')
-rw-r--r--arch/x86_64/kernel/entry.S26
1 files changed, 8 insertions, 18 deletions
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S
index 053d6e80c31f..12a307100929 100644
--- a/arch/x86_64/kernel/entry.S
+++ b/arch/x86_64/kernel/entry.S
@@ -197,7 +197,7 @@ ENTRY(system_call)
197 */ 197 */
198 .globl ret_from_sys_call 198 .globl ret_from_sys_call
199ret_from_sys_call: 199ret_from_sys_call:
200 movl $_TIF_WORK_MASK,%edi 200 movl $_TIF_ALLWORK_MASK,%edi
201 /* edi: flagmask */ 201 /* edi: flagmask */
202sysret_check: 202sysret_check:
203 GET_THREAD_INFO(%rcx) 203 GET_THREAD_INFO(%rcx)
@@ -223,18 +223,13 @@ sysret_careful:
223 jmp sysret_check 223 jmp sysret_check
224 224
225 /* Handle a signal */ 225 /* Handle a signal */
226 /* edx: work flags (arg3) */
226sysret_signal: 227sysret_signal:
227 sti 228 sti
228 testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP),%edx
229 jz 1f
230
231 /* Really a signal */
232 /* edx: work flags (arg3) */
233 leaq do_notify_resume(%rip),%rax 229 leaq do_notify_resume(%rip),%rax
234 leaq -ARGOFFSET(%rsp),%rdi # &pt_regs -> arg1 230 leaq -ARGOFFSET(%rsp),%rdi # &pt_regs -> arg1
235 xorl %esi,%esi # oldset -> arg2 231 xorl %esi,%esi # oldset -> arg2
236 call ptregscall_common 232 call ptregscall_common
2371: movl $_TIF_NEED_RESCHED,%edi
238 jmp sysret_check 233 jmp sysret_check
239 234
240 /* Do syscall tracing */ 235 /* Do syscall tracing */
@@ -490,8 +485,6 @@ retint_careful:
490 jmp retint_check 485 jmp retint_check
491 486
492retint_signal: 487retint_signal:
493 testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP),%edx
494 jz retint_swapgs
495 sti 488 sti
496 SAVE_REST 489 SAVE_REST
497 movq $-1,ORIG_RAX(%rsp) 490 movq $-1,ORIG_RAX(%rsp)
@@ -500,7 +493,6 @@ retint_signal:
500 call do_notify_resume 493 call do_notify_resume
501 RESTORE_REST 494 RESTORE_REST
502 cli 495 cli
503 movl $_TIF_NEED_RESCHED,%edi
504 GET_THREAD_INFO(%rcx) 496 GET_THREAD_INFO(%rcx)
505 jmp retint_check 497 jmp retint_check
506 498
@@ -829,21 +821,19 @@ paranoid_userspace:
829 cli 821 cli
830 GET_THREAD_INFO(%rcx) 822 GET_THREAD_INFO(%rcx)
831 movl threadinfo_flags(%rcx),%edx 823 movl threadinfo_flags(%rcx),%edx
824 testl $_TIF_WORK_MASK,%edx
825 jz paranoid_swapgs
832 testl $_TIF_NEED_RESCHED,%edx 826 testl $_TIF_NEED_RESCHED,%edx
833 jnz paranoid_resched 827 jnz paranoid_resched
834 testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP),%edx
835 jnz paranoid_signal
836 jmp paranoid_swapgs
837paranoid_resched:
838 sti
839 call schedule
840 jmp paranoid_exit
841paranoid_signal:
842 sti 828 sti
843 xorl %esi,%esi /* oldset */ 829 xorl %esi,%esi /* oldset */
844 movq %rsp,%rdi /* &pt_regs */ 830 movq %rsp,%rdi /* &pt_regs */
845 call do_notify_resume 831 call do_notify_resume
846 jmp paranoid_exit 832 jmp paranoid_exit
833paranoid_resched:
834 sti
835 call schedule
836 jmp paranoid_exit
847 CFI_ENDPROC 837 CFI_ENDPROC
848 838
849ENTRY(int3) 839ENTRY(int3)