[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1268820825.2335.190.camel@pasglop>
Date: Wed, 17 Mar 2010 21:13:45 +1100
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: Ulrich Drepper <drepper@...hat.com>
Cc: munroesj@...ibm.com, "H. Peter Anvin" <hpa@...or.com>,
David Miller <davem@...emloft.net>, ralf@...ux-mips.org,
linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel@...savvy.com, torvalds@...ux-foundation.org
Subject: Re: 64-syscall args on 32-bit vs syscall()
On Wed, 2010-03-17 at 02:14 -0700, Ulrich Drepper wrote:
> >> I believe that should cover it, at least for powerpc, possibly for
> other
> >> archs too though as I said, I may have missed something there.
>
> How can this possibly be the case? This will screw people who
> currently
> work around the ppc limitations of the existing syscall.
No it won't. As I said, it will work for both cases. The problem is a
register pair alignment problem. If the alignment is corrected with the
trick I proposed, 64-bit values will end up in the right pair, but
manually worked-around cases where the value is already broken up will
-also- end up in the right pair.
The problem with syscall() as it is is that it skews the arguments by 1
register, which causes the compiler to skip a register when generating
the call for a 64-bit value. By doing the trick I propose, that skew
will be gone, both 32 and 64 bit arguments will end up where expected.
Cheers,
Ben.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists