Re: [PATCH] [POWERPC] Wire up sys_sync_file_range
From: Ralf Baechle <hidden>
Date: 2007-03-09 12:09:17
Also in:
linux-arch
On Thu, Mar 08, 2007 at 11:13:41PM -0800, David Miller wrote:
quoted
On Fri, 2007-03-09 at 15:22 +1100, Stephen Rothwell wrote:quoted
This requires an architecture specific compat routine as u64s are passed in odd/even (high/low) register pairs on ppc32. Signed-off-by: Stephen Rothwell <redacted>Doesn't that apply to ARM and to 32-bit MIPS too? And perhaps others?Unfortunately in the MIPS case you'll have to do some ifdef'ing because the order of the "high" and "low" sub-part arguments is dependant upon endianness and MIPS can be both big and little endian.
I'd rather let the C compiler sort it out:
asmlinkage long compat_sys_sync_file_range(int fd, int dummy,
loff_t offset, loff_t nbytes, unsigned int flags)
{
sys_sync_file_range(fd, offset, nbytes, flags);
}
Which looks like it could be portable to PPC even, so maybe a little cpp
magic like:
#ifdef CONFIG_ABI_NEEDS_PADDING_
#define PAD_64BIT_ARG(x) unsigned int x,
#else
#define PAD_64BIT_ARG(x)
#endif
[...]
asmlinkage long sys_sync_file_range(int fd, PAD_64BIT_ARG(pad1)
loff_t offset, loff_t nbytes, unsigned int flags)
Ralf