From: Russell King - ARM Linux
Date: Thu Feb 02 2012 - 06:10:27 EST

On Thu, Feb 02, 2012 at 12:00:30PM +0100, Indan Zupancic wrote:
> On Thu, February 2, 2012 10:21, Takuo Koguchi wrote:
> > Right. As Russel King suggested, this patch depends on those configs
> > until very large NR_syscalls is properly handled by ftrace.
> It has nothing to do with large NR_syscalls. Supporting OABI is hard,

That's rubbish if you're doing things correctly, where correctly is
defined as 'not assuming that the syscall number is in r7, but reading
it from the thread_info->syscall member.

> e.g. it doesn't put the syscall nr in r7, it's encoded as part of the
> syscall instruction. Also the ABI for some system calls is different,
> with different arg layouts (alignment of 64 bit args is different).

OABI is a lot more simple because you know how the args are layed out
without needing a table to work out where the padding is. You know
if you have a 64-bit argument that it follows immediately after a
32-bit argument without needing any alignment.


next_arg_reg(current_arg_reg, next_size, oabi)
if (oabi) {
/* OABI case */
next_arg_reg = current_arg_reg + 1;
} else {
/* EABI case */
next_arg_reg = current_arg_reg + 1;
if (next_size == 64 && next_arg_reg & 1)
return next_arg_reg;

Notice how the EABI case is a lot more complicated by the alignment
rules than the OABI - not only do you need something like the above
but also you need a table to describe the size of the arguments for
every syscall in the system.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at