From: Linus Torvalds <torvalds@linux-foundation.org>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [GIT PULL] x86/paravirt for v2.6.33
Date: Wed, 9 Dec 2009 10:47:12 -0800 (PST) [thread overview]
Message-ID: <alpine.LFD.2.00.0912091039050.3560@localhost.localdomain> (raw)
In-Reply-To: <4B1FED0D.7060003@goop.org>
On Wed, 9 Dec 2009, Jeremy Fitzhardinge wrote:
>
> How does this look?
I would actually prefer it if the calling convention was just made to
match on both x86 and x86-64. Wouldn't it be nice if they both just had
> +/* kernel/ioport.c */
> +asmlinkage long sys_iopl(unsigned int, struct pt_regs *);
as the prototype, and looked the same?
I realize that right now the 32-bit PTREGSCALL() thing doesn't support
that (very different macros for entry.S x86-32 and -64), but isn't that
just another thing we should try to fix too?
IOW, maybe something like this would be good, and would change the x86-32
calling convention to match the x86-64 one?
NOTE NOTE NOTE! Totally untested. Is the second argument even in %edx? I
don't remember, I didn't check, I'm just throwing this out as a "hey,
maybe something _like_ this can work" patch, and will be immediately
removing it from my machine after sending this email.
Linus
---
arch/x86/kernel/entry_32.S | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 50b9c22..22b4431 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -725,22 +725,22 @@ END(syscall_badsys)
/*
* System calls that need a pt_regs pointer.
*/
-#define PTREGSCALL(name) \
+#define PTREGSCALL(name, reg) \
ALIGN; \
ptregs_##name: \
- leal 4(%esp),%eax; \
+ leal 4(%esp),reg; \
jmp sys_##name;
-PTREGSCALL(iopl)
-PTREGSCALL(fork)
-PTREGSCALL(clone)
-PTREGSCALL(vfork)
-PTREGSCALL(execve)
-PTREGSCALL(sigaltstack)
-PTREGSCALL(sigreturn)
-PTREGSCALL(rt_sigreturn)
-PTREGSCALL(vm86)
-PTREGSCALL(vm86old)
+PTREGSCALL(iopl,%edx)
+PTREGSCALL(fork,%eax)
+PTREGSCALL(clone,%eax)
+PTREGSCALL(vfork,%eax)
+PTREGSCALL(execve,%eax)
+PTREGSCALL(sigaltstack,%eax)
+PTREGSCALL(sigreturn,%eax)
+PTREGSCALL(rt_sigreturn,%eax)
+PTREGSCALL(vm86,%eax)
+PTREGSCALL(vm86old,%eax)
.macro FIXUP_ESPFIX_STACK
/*
next prev parent reply other threads:[~2009-12-09 18:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-03 21:09 Ingo Molnar
2009-12-08 21:34 ` Linus Torvalds
2009-12-09 7:36 ` Ingo Molnar
2009-12-09 18:19 ` Jeremy Fitzhardinge
2009-12-09 18:31 ` Jeremy Fitzhardinge
2009-12-09 18:47 ` Linus Torvalds [this message]
2009-12-09 18:54 ` H. Peter Anvin
2009-12-09 19:08 ` Linus Torvalds
2009-12-09 19:25 ` Brian Gerst
2009-12-09 19:35 ` H. Peter Anvin
2009-12-09 19:32 ` Jeremy Fitzhardinge
2009-12-09 20:05 ` H. Peter Anvin
2009-12-09 18:49 ` H. Peter Anvin
2009-12-09 18:18 ` Jeremy Fitzhardinge
2009-12-09 21:58 ` Linus Torvalds
2009-12-09 18:29 H. Peter Anvin
2009-12-09 18:38 ` Linus Torvalds
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=alpine.LFD.2.00.0912091039050.3560@localhost.localdomain \
--to=torvalds@linux-foundation.org \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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®