Re: -mm merge plans for 2.6.21

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

 



On Fri, Feb 09, 2007 at 09:53:19PM +0000, David Woodhouse wrote:
> On Fri, 2007-02-09 at 21:49 +0000, Russell King wrote:
> > urgh, new system calls... wonder if they fit in the ARM ABI...  Looks
> > fine.
> 
> Can you elucidate on _what_ you just checked for?
> 
> There was something about alignment of 64-bit arguments to syscalls
> which affects MIPS and/or ARM which I can't quite remember--

It's something like that.

> something
> about putting it them arguments in either an even-numbered or
> odd-numbered position to make it work nicely.

We have a maximum of 7 32-bit registers to pass system call arguments.
In EABI, 64-bit arguments must be aligned to an even-numbered register
(starting at zero).  In OABI, 64-bit arguments do not have this
restriction.

So, for EABI:

sys_foo(int a, unsigned long long b, int c, unsigned long long d)

would allocate 'a' into r0, 'b' into r2,r3, 'c' into r4, and 'd' into
r6, and oops we're out of registers - so the above syscall prototype
can't be supported on ARM.

However:

sys_foo(int a, int c, unsigned long long b, unsigned long long d)

is entirely reasonable and leaves us with spare room for one additional
32-bit arg to be passed.

> Is that actually written anywhere, and does anyone bother to check?

Mostly mailing list archives I'd guess.  As far as anyone bothering
to check, that's me when I'm aware of new syscalls... which typically
happens a long time after the syscalls have been introduced on x86
etc.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux