[PATCH] [POWERPC] Wire up sys_sync_file_range

David Woodhouse dwmw2 at infradead.org
Fri Mar 9 17:55:41 EST 2007


On Fri, 2007-03-09 at 15:22 +1100, Stephen Rothwell wrote:
> 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 <sfr at canb.auug.org.au>

Doesn't that apply to ARM and to 32-bit MIPS too? And perhaps others?

> --- a/arch/powerpc/kernel/sys_ppc32.c
> +++ b/arch/powerpc/kernel/sys_ppc32.c
> @@ -814,3 +814,12 @@ asmlinkage long compat_sys_request_key(const char __user *_type,
>  	return sys_request_key(_type, _description, _callout_info, destringid);
>  }
>  
> +asmlinkage long compat_sys_sync_file_range(int fd, u32 unused,
> +		u32 offset_high, u32 offset_low,
> +		u32 nbytes_high, u32 nbytes_low,
> +		compat_uint_t flags)
> +{
> +	return sys_sync_file_range(fd, (loff_t)offset_high << 32 | offset_low,
> +			(loff_t)nbytes_high << 32 | nbytes_low,
> +			(unsigned int)flags);
> +}

-- 
dwmw2




More information about the Linuxppc-dev mailing list