powerpc currently declares some of its own system calls
in <asm/unistd.h>, but not all of them. That place also
contains remainders of the now almost unused kernel syscall
hack.
- Add a new <asm/syscalls.h> with clean declarations
- Include that file from every source that implements one
of these
- Get rid of old declarations in <asm/unistd.h>
This patch is required as a base for implementing system
calls from an SPU, but also makes sense as a general
cleanup.
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
ppc64 has its own version of sys_time. It looks pretty scary, touching
a whole bunch of variables without any locking or memory ordering.
In fact, a recent bugreport has shown it can actually go backwards. Time
to remove it and just use the generic sys_time, which is implemented on
top of do_gettimeofday.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
The merge of syscalls.c & sys_ppc32.c (30286ef6e0)
broke mmap, if the mmap returned a 64 bit address.
do_mmap2 was taking the return value from do_mmap_pgoff (an unsigned long), and
storing it in an int, before returning it to sys_mmap as an unsigned long. So
we were losing the high bits of the address.
You would have thought the compiler could catch this for us ...
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This makes ppc use the syscalls.c from arch/powerpc/kernel, exports
copy_and_flush from head_32.S for use by prom_init.c (ARCH=powerpc),
and consolidates the sys_fadvise64_64 implementations for 32-bit.
Signed-off-by: Paul Mackerras <paulus@samba.org>