[PATCH] mips: do not use unexported kernel headers
Atsushi Nemoto
anemo at mba.ocn.ne.jp
Wed Sep 6 09:37:09 PDT 2006
The "make headers_install" in kernel 2.6.18 does not export
asm-mips/asm.h, asm-mips/regdef.h and asm-mips/sysmips.h. Do not use
them. We can use sys/asm.h and sys/regdef.h instead. The sysmips.h
part of this patch is came from glibc 2.4 code.
-------------- next part --------------
Index: libc/sysdeps/linux/mips/pipe.S
===================================================================
--- libc/sysdeps/linux/mips/pipe.S (revision 16056)
+++ libc/sysdeps/linux/mips/pipe.S (working copy)
@@ -8,9 +8,9 @@
/*see uClibc's sh/pipe.c and glibc-2.2.4's mips/pipe.S */
#include <features.h>
-#include <asm/asm.h>
+#include <sys/asm.h>
#include <asm/unistd.h>
-#include <asm/regdef.h>
+#include <sys/regdef.h>
.globl pipe
.ent pipe, 0
Index: libc/sysdeps/linux/mips/clone.S
===================================================================
--- libc/sysdeps/linux/mips/clone.S (revision 16056)
+++ libc/sysdeps/linux/mips/clone.S (working copy)
@@ -25,7 +25,7 @@
#include <sys/regdef.h>
#define _ERRNO_H 1
#include <bits/errno.h>
-#include <asm/asm.h>
+#include <sys/asm.h>
/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */
Index: libc/sysdeps/linux/mips/syscall.S
===================================================================
--- libc/sysdeps/linux/mips/syscall.S (revision 16056)
+++ libc/sysdeps/linux/mips/syscall.S (working copy)
@@ -17,8 +17,8 @@
02111-1307 USA. */
#include <features.h>
-#include <asm/asm.h>
-#include <asm/regdef.h>
+#include <sys/asm.h>
+#include <sys/regdef.h>
#ifdef __PIC__
.option pic2
Index: libc/sysdeps/linux/mips/sys/sysmips.h
===================================================================
--- libc/sysdeps/linux/mips/sys/sysmips.h (revision 16056)
+++ libc/sysdeps/linux/mips/sys/sysmips.h (working copy)
@@ -22,9 +22,17 @@
#include <features.h>
/*
- * Get the kernel definition for sysmips(2)
+ * Commands for the sysmips(2) call
+ *
+ * sysmips(2) is deprecated - though some existing software uses it.
+ * We only support the following commands. Sysmips exists for compatibility
+ * purposes only so new software should avoid it.
*/
-#include <asm/sysmips.h>
+#define SETNAME 1 /* set hostname */
+#define FLUSH_CACHE 3 /* writeback and invalidate caches */
+#define MIPS_FIXADE 7 /* control address error fixing */
+#define MIPS_RDNVRAM 10 /* read NVRAM */
+#define MIPS_ATOMIC_SET 2001 /* atomically set variable */
__BEGIN_DECLS
More information about the uClibc
mailing list