From: akpm@osdl.org
To: torvalds@osdl.org
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org, ak@suse.de
Subject: [patch 081/198] x86_64: Call do_notify_resume unconditionally in entry.S
Date: Tue, 12 Apr 2005 03:31:50 -0700 [thread overview]
Message-ID: <200504121031.j3CAVuxc005451@shell0.pdx.osdl.net> (raw)
From: "Andi Kleen" <ak@suse.de>
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>
---
25-akpm/arch/x86_64/kernel/entry.S | 26 ++++++++------------------
1 files changed, 8 insertions(+), 18 deletions(-)
diff -puN arch/x86_64/kernel/entry.S~x86_64-call-do_notify_resume-unconditionally-in-entrys arch/x86_64/kernel/entry.S
--- 25/arch/x86_64/kernel/entry.S~x86_64-call-do_notify_resume-unconditionally-in-entrys 2005-04-12 03:21:22.630696512 -0700
+++ 25-akpm/arch/x86_64/kernel/entry.S 2005-04-12 03:21:22.634695904 -0700
@@ -197,7 +197,7 @@ ENTRY(system_call)
*/
.globl ret_from_sys_call
ret_from_sys_call:
- movl $_TIF_WORK_MASK,%edi
+ movl $_TIF_ALLWORK_MASK,%edi
/* edi: flagmask */
sysret_check:
GET_THREAD_INFO(%rcx)
@@ -223,18 +223,13 @@ sysret_careful:
jmp sysret_check
/* Handle a signal */
+ /* edx: work flags (arg3) */
sysret_signal:
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 -ARGOFFSET(%rsp),%rdi # &pt_regs -> arg1
xorl %esi,%esi # oldset -> arg2
call ptregscall_common
-1: movl $_TIF_NEED_RESCHED,%edi
jmp sysret_check
/* Do syscall tracing */
@@ -490,8 +485,6 @@ retint_careful:
jmp retint_check
retint_signal:
- testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP),%edx
- jz retint_swapgs
sti
SAVE_REST
movq $-1,ORIG_RAX(%rsp)
@@ -500,7 +493,6 @@ retint_signal:
call do_notify_resume
RESTORE_REST
cli
- movl $_TIF_NEED_RESCHED,%edi
GET_THREAD_INFO(%rcx)
jmp retint_check
@@ -829,21 +821,19 @@ paranoid_userspace:
cli
GET_THREAD_INFO(%rcx)
movl threadinfo_flags(%rcx),%edx
+ testl $_TIF_WORK_MASK,%edx
+ jz paranoid_swapgs
testl $_TIF_NEED_RESCHED,%edx
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
xorl %esi,%esi /* oldset */
movq %rsp,%rdi /* &pt_regs */
call do_notify_resume
jmp paranoid_exit
+paranoid_resched:
+ sti
+ call schedule
+ jmp paranoid_exit
CFI_ENDPROC
ENTRY(int3)
_
reply other threads:[~2005-04-12 19:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200504121031.j3CAVuxc005451@shell0.pdx.osdl.net \
--to=akpm@osdl.org \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®