public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
	Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [GIT PULL] x86/paravirt for v2.6.33
Date: Wed, 09 Dec 2009 10:54:54 -0800	[thread overview]
Message-ID: <4B1FF27E.8030701@zytor.com> (raw)
In-Reply-To: <alpine.LFD.2.00.0912091039050.3560@localhost.localdomain>

On 12/09/2009 10:47 AM, Linus Torvalds wrote:
> 
> 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.
> 

The second argument is in %edx, but unlike 64 bits, it is not loaded
into that register a priory ("asmlinkage" means arguments are on the stack.)

As such, we need something looking like:

#define PTREGSCALL0(name)	\
ptregs_##name:			\
	leal	4(%esp),%eax;	\
	jmp sys_##name

#define PTREGSCALL1(name)	\
ptregs_##name:			\
	movl	4(%esp),%eax;	\
	leal	4(%esp),%edx;	\
	jmp sys_##name

#define PTREGSCALL2(name)	\
ptregs_##name:			\
	movl	4(%esp),%eax;	\
	movl	8(%esp),%edx;	\
	leal	4(%esp),%ecx;	\
	jmp sys_##name

If we need more than two arguments + pt_regs, then we have to set up a
temporary stack frame.

[Sorry, I'm sitting in a meeting so I can't actually write up a real patch]

	-hpa

  reply	other threads:[~2009-12-09 18:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-03 21:09 [GIT PULL] x86/paravirt for v2.6.33 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
2009-12-09 18:54         ` H. Peter Anvin [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
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=4B1FF27E.8030701@zytor.com \
    --to=hpa@zytor.com \
    --cc=akpm@linux-foundation.org \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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