Re: New ARM asm/syscall.h incompatible? (commit bf2c9f9866928df60157bc4f1ab39f93a32c754e)

From: Roland McGrath
Date: Thu May 24 2012 - 14:58:34 EST


When I first added the asm/syscall.h interface, I took six arguments
to be a universal limit
in the kernel. I had the impression that the limit was encoded in
many places, but I really
don't recall any details now. For x86-32, it is a hard limit of the
register argument passing
convention, as six arguments plus syscall number and stack pointer is
all the registers there are.
So no generic syscall will ever have more than six arguments, since
x86-32 couldn't support it.

If there are machine-specific syscalls that allow more arguments, then
I think it would be reasonable
to make a machine-specfiic argument limit part of the asm/syscall.h
interface. That is, define some
macro like MAX_SYSCALL_ARGS in asm/syscall.h. If you do that, please
put a definition for it in
asm-generic/syscall.h and update the kerneldoc comments there to
mention that macro instead of
the explicit "6" and "0..5" there now.


Thanks,
Roland
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/