summaryrefslogtreecommitdiff
path: root/libc/sysdeps
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-04-26 22:34:59 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:43 +0200
commit5fc54227982c5e5edd060396f9fe2639795622d0 (patch)
tree840ff5274a79c3c8b452417fdb367f49bc1cccad /libc/sysdeps
parent4c5395c9438a98479f17e6bdc88b1ffbe14cae10 (diff)
make arch specific cacheflush, readahead and sysmips LINUX_SPECIFIC dependent
Remove the related headers. Adapt sh's type to the one used everywhere and add prototype for it. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps')
-rw-r--r--libc/sysdeps/linux/bfin/Makefile.arch6
-rw-r--r--libc/sysdeps/linux/bfin/cacheflush.c2
-rw-r--r--libc/sysdeps/linux/mips/Makefile.arch7
-rw-r--r--libc/sysdeps/linux/sh/Makefile.arch6
-rw-r--r--libc/sysdeps/linux/sh/cacheflush.c5
5 files changed, 18 insertions, 8 deletions
diff --git a/libc/sysdeps/linux/bfin/Makefile.arch b/libc/sysdeps/linux/bfin/Makefile.arch
index 425a68898..15ecfd81e 100644
--- a/libc/sysdeps/linux/bfin/Makefile.arch
+++ b/libc/sysdeps/linux/bfin/Makefile.arch
@@ -6,7 +6,11 @@
#
CSRC := bsdsetjmp.c clone.c \
- sram-alloc.c sram-free.c dma-memcpy.c cacheflush.c
+ sram-alloc.c sram-free.c dma-memcpy.c
+
+ifeq ($(UCLIBC_LINUX_SPECIFIC),y)
+CSRC += cacheflush.c
+endif
SSRC := __longjmp.S setjmp.S bsd-_setjmp.S
diff --git a/libc/sysdeps/linux/bfin/cacheflush.c b/libc/sysdeps/linux/bfin/cacheflush.c
index 6ff3ad560..a4b9f4ae9 100644
--- a/libc/sysdeps/linux/bfin/cacheflush.c
+++ b/libc/sysdeps/linux/bfin/cacheflush.c
@@ -11,5 +11,5 @@
#ifdef __NR_cacheflush
# include <sys/cachectl.h>
-_syscall3 (int, cacheflush, void *, start, const int, nbytes, const int, flags)
+_syscall3 (int, cacheflush, void *, addr, const int, nbytes, const int, flags)
#endif
diff --git a/libc/sysdeps/linux/mips/Makefile.arch b/libc/sysdeps/linux/mips/Makefile.arch
index 6db0b2a84..fce99f813 100644
--- a/libc/sysdeps/linux/mips/Makefile.arch
+++ b/libc/sysdeps/linux/mips/Makefile.arch
@@ -7,8 +7,11 @@
CSRC := \
__longjmp.c brk.c setjmp_aux.c \
- cacheflush.c pread_write.c sigaction.c sysmips.c _test_and_set.c \
- readahead.c
+ pread_write.c sigaction.c _test_and_set.c
+
+ifeq ($(UCLIBC_LINUX_SPECIFIC),y)
+CSRC += cacheflush.c readahead.c sysmips.c
+endif
SSRC := bsd-_setjmp.S bsd-setjmp.S setjmp.S syscall.S pipe.S syscall_error.S
diff --git a/libc/sysdeps/linux/sh/Makefile.arch b/libc/sysdeps/linux/sh/Makefile.arch
index 5ebf42bf1..3ec8cbd3f 100644
--- a/libc/sysdeps/linux/sh/Makefile.arch
+++ b/libc/sysdeps/linux/sh/Makefile.arch
@@ -7,7 +7,11 @@
#
CSRC := \
- pipe.c __init_brk.c brk.c sbrk.c pread_write.c cacheflush.c
+ pipe.c __init_brk.c brk.c sbrk.c pread_write.c
+
+ifeq ($(UCLIBC_LINUX_SPECIFIC),y)
+CSRC += cacheflush.c
+endif
SSRC := setjmp.S __longjmp.S ___fpscr_values.S
diff --git a/libc/sysdeps/linux/sh/cacheflush.c b/libc/sysdeps/linux/sh/cacheflush.c
index 58229186d..619b96b5a 100644
--- a/libc/sysdeps/linux/sh/cacheflush.c
+++ b/libc/sysdeps/linux/sh/cacheflush.c
@@ -6,10 +6,9 @@
*
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
-#include <errno.h>
-#include <unistd.h>
#include <sys/syscall.h>
#ifdef __NR_cacheflush
-_syscall3(int, cacheflush, char *, addr, int, nbytes, int, op)
+int cacheflush(void *addr, const int nbytes, int op);
+_syscall3(int, cacheflush, void *, addr, const int, nbytes, const int, op)
#endif