public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Christoph Hellwig <hch@infradead.org>,
	Kyle McMartin <kyle@parisc-linux.org>,
	akpm@osdl.org, linux-kernel@vger.kernel.org,
	linux-arch@vger.kernel.org, parisc-linux@lists.parisc-linux.org
Subject: Re: [PATCH] Common compat_sys_sysinfo
Date: Sun, 7 Jan 2007 08:18:17 -0700	[thread overview]
Message-ID: <20070107151817.GN24620@parisc-linux.org> (raw)
In-Reply-To: <20070107151319.GA23478@infradead.org>

On Sun, Jan 07, 2007 at 03:13:19PM +0000, Christoph Hellwig wrote:
> and last but not least we probably want a unified mechanisms to deal
> with the 64bit arguments that are broken up into two 32bit ones (not just
> for emulation but also for 32it BE architectures)

It's not BE that is the problem -- drepper thought of that.

What he fundamentally missed was the calling convention where 64-bit
arguments have to be 64-bit aligned, even when they're passed through
registers.  So:

int foo(int, long long);

takes its arguments in arg0, arg2 and arg3, but glibc passes the syscall
arguments in arg0, arg1 and arg2.

I think the Right Way to fix this is for some gcc hacker to implement an
__attribute__((packed_args)) that changes the calling convention for
that function, then we can define asmlinkage to use that on mips and
parisc.

Any budding gcc hackers out there?  ;-)

  reply	other threads:[~2007-01-07 15:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-07 14:48 [PATCH] Common compat_sys_sysinfo Kyle McMartin
2007-01-07 15:13 ` Christoph Hellwig
2007-01-07 15:18   ` Matthew Wilcox [this message]
2007-01-07 15:22   ` Kyle McMartin
2007-01-07 15:40     ` [PATCH] Common compat_sys_sysinfo (v2) Kyle McMartin
2007-01-07 23:43       ` Stephen Rothwell
2007-01-08  5:54         ` Arnd Bergmann
2007-01-08  7:29           ` Stephen Rothwell

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=20070107151817.GN24620@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=akpm@osdl.org \
    --cc=hch@infradead.org \
    --cc=kyle@parisc-linux.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=parisc-linux@lists.parisc-linux.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