[tip:x86/asm] x86-32: Avoid pipeline serialization in PTREGSCALL1 and 2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  ce9119ad90b1caba550447bfcc0a21850558ca49
Gitweb:     http://git.kernel.org/tip/ce9119ad90b1caba550447bfcc0a21850558ca49
Author:     H. Peter Anvin <hpa@xxxxxxxxx>
AuthorDate: Wed, 9 Dec 2009 16:33:44 -0800
Committer:  H. Peter Anvin <hpa@xxxxxxxxx>
CommitDate: Wed, 9 Dec 2009 16:33:44 -0800

x86-32: Avoid pipeline serialization in PTREGSCALL1 and 2

In the PTREGSCALL1 and 2 macros, we can trivially avoid an unnecessary
pipeline serialization, so do so.

In PTREGSCALLS3 this is much less clear-cut since we have to push a
new value to the stack.  Leave it alone for now assuming it is as good
as it is going to be; may want to check on Atom or another in-order
x86 to see if we can do better.

Signed-off-by: H. Peter Anvin <hpa@xxxxxxxxx>
Cc: Brian Gerst <brgerst@xxxxxxxxx>
LKML-Reference: <1260403316-5679-2-git-send-email-brgerst@xxxxxxxxx>
---
 arch/x86/kernel/entry_32.S |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 6492555..cb12b9b 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -735,15 +735,15 @@ ptregs_##name: \
 	ALIGN; \
 ptregs_##name: \
 	leal 4(%esp),%edx; \
-	movl PT_EBX(%edx),%eax; \
+	movl (PT_EBX+4)(%esp),%eax; \
 	jmp sys_##name;
 
 #define PTREGSCALL2(name) \
 	ALIGN; \
 ptregs_##name: \
 	leal 4(%esp),%ecx; \
-	movl PT_ECX(%ecx),%edx; \
-	movl PT_EBX(%ecx),%eax; \
+	movl (PT_ECX+4)(%esp),%edx; \
+	movl (PT_EBX+4)(%esp),%eax; \
 	jmp sys_##name;
 
 #define PTREGSCALL3(name) \
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux