mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-09-12 10:08:06 +03:00
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11213 3c298f89-4303-0410-b956-a3cf2f4a3e73
376 lines
11 KiB
Diff
376 lines
11 KiB
Diff
Index: linux-2.4.35.4/arch/mips/kernel/mips_ksyms.c
|
|
===================================================================
|
|
--- linux-2.4.35.4.orig/arch/mips/kernel/mips_ksyms.c
|
|
+++ linux-2.4.35.4/arch/mips/kernel/mips_ksyms.c
|
|
@@ -30,6 +30,10 @@
|
|
#include <asm/floppy.h>
|
|
#endif
|
|
|
|
+asmlinkage long long __ashldi3 (long long, int);
|
|
+asmlinkage long long __ashrdi3 (long long, int);
|
|
+asmlinkage long long __lshrdi3 (long long, int);
|
|
+asmlinkage long long __muldi3 (long long, long long);
|
|
extern void *__bzero(void *__s, size_t __count);
|
|
extern long __strncpy_from_user_nocheck_asm(char *__to,
|
|
const char *__from, long __len);
|
|
@@ -78,6 +82,13 @@ EXPORT_SYMBOL_NOVERS(__strnlen_user_noch
|
|
EXPORT_SYMBOL_NOVERS(__strnlen_user_asm);
|
|
|
|
|
|
+/* Compiler stuff */
|
|
+EXPORT_SYMBOL_NOVERS(__ashldi3);
|
|
+EXPORT_SYMBOL_NOVERS(__ashrdi3);
|
|
+EXPORT_SYMBOL_NOVERS(__lshrdi3);
|
|
+EXPORT_SYMBOL_NOVERS(__muldi3);
|
|
+
|
|
+
|
|
/* Networking helper routines. */
|
|
EXPORT_SYMBOL(csum_partial_copy);
|
|
|
|
Index: linux-2.4.35.4/arch/mips/lib/Makefile
|
|
===================================================================
|
|
--- linux-2.4.35.4.orig/arch/mips/lib/Makefile
|
|
+++ linux-2.4.35.4/arch/mips/lib/Makefile
|
|
@@ -9,7 +9,8 @@ L_TARGET = lib.a
|
|
obj-y += csum_partial.o csum_partial_copy.o \
|
|
promlib.o rtc-std.o rtc-no.o memcpy.o \
|
|
memset.o watch.o strlen_user.o \
|
|
- strncpy_user.o strnlen_user.o
|
|
+ strncpy_user.o strnlen_user.o \
|
|
+ ashldi3.o ashrdi3.o lshrdi3.o muldi3.o
|
|
|
|
export-objs := rtc-std.o rtc-no.o
|
|
|
|
Index: linux-2.4.35.4/arch/mips/lib/ashldi3.c
|
|
===================================================================
|
|
--- /dev/null
|
|
+++ linux-2.4.35.4/arch/mips/lib/ashldi3.c
|
|
@@ -0,0 +1,62 @@
|
|
+/* ashrdi3.c extracted from gcc-2.95.2/libgcc2.c which is: */
|
|
+/* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc.
|
|
+
|
|
+This file is part of GNU CC.
|
|
+
|
|
+GNU CC is free software; you can redistribute it and/or modify
|
|
+it under the terms of the GNU General Public License as published by
|
|
+the Free Software Foundation; either version 2, or (at your option)
|
|
+any later version.
|
|
+
|
|
+GNU CC is distributed in the hope that it will be useful,
|
|
+but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
+GNU General Public License for more details.
|
|
+
|
|
+You should have received a copy of the GNU General Public License
|
|
+along with GNU CC; see the file COPYING. If not, write to
|
|
+the Free Software Foundation, 59 Temple Place - Suite 330,
|
|
+Boston, MA 02111-1307, USA. */
|
|
+
|
|
+#define BITS_PER_UNIT 8
|
|
+
|
|
+typedef int SItype __attribute__ ((mode (SI)));
|
|
+typedef unsigned int USItype __attribute__ ((mode (SI)));
|
|
+typedef int DItype __attribute__ ((mode (DI)));
|
|
+typedef int word_type __attribute__ ((mode (__word__)));
|
|
+
|
|
+struct DIstruct {SItype high, low;};
|
|
+
|
|
+typedef union
|
|
+{
|
|
+ struct DIstruct s;
|
|
+ DItype ll;
|
|
+} DIunion;
|
|
+
|
|
+DItype
|
|
+__ashldi3 (DItype u, word_type b)
|
|
+{
|
|
+ DIunion w;
|
|
+ word_type bm;
|
|
+ DIunion uu;
|
|
+
|
|
+ if (b == 0)
|
|
+ return u;
|
|
+
|
|
+ uu.ll = u;
|
|
+
|
|
+ bm = (sizeof (SItype) * BITS_PER_UNIT) - b;
|
|
+ if (bm <= 0)
|
|
+ {
|
|
+ w.s.low = 0;
|
|
+ w.s.high = (USItype)uu.s.low << -bm;
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+ USItype carries = (USItype)uu.s.low >> bm;
|
|
+ w.s.low = (USItype)uu.s.low << b;
|
|
+ w.s.high = ((USItype)uu.s.high << b) | carries;
|
|
+ }
|
|
+
|
|
+ return w.ll;
|
|
+}
|
|
Index: linux-2.4.35.4/arch/mips/lib/ashrdi3.c
|
|
===================================================================
|
|
--- /dev/null
|
|
+++ linux-2.4.35.4/arch/mips/lib/ashrdi3.c
|
|
@@ -0,0 +1,63 @@
|
|
+/* ashrdi3.c extracted from gcc-2.7.2/libgcc2.c which is: */
|
|
+/* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
|
+
|
|
+This file is part of GNU CC.
|
|
+
|
|
+GNU CC is free software; you can redistribute it and/or modify
|
|
+it under the terms of the GNU General Public License as published by
|
|
+the Free Software Foundation; either version 2, or (at your option)
|
|
+any later version.
|
|
+
|
|
+GNU CC is distributed in the hope that it will be useful,
|
|
+but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
+GNU General Public License for more details.
|
|
+
|
|
+You should have received a copy of the GNU General Public License
|
|
+along with GNU CC; see the file COPYING. If not, write to
|
|
+the Free Software Foundation, 59 Temple Place - Suite 330,
|
|
+Boston, MA 02111-1307, USA. */
|
|
+
|
|
+#define BITS_PER_UNIT 8
|
|
+
|
|
+typedef int SItype __attribute__ ((mode (SI)));
|
|
+typedef unsigned int USItype __attribute__ ((mode (SI)));
|
|
+typedef int DItype __attribute__ ((mode (DI)));
|
|
+typedef int word_type __attribute__ ((mode (__word__)));
|
|
+
|
|
+struct DIstruct {SItype high, low;};
|
|
+
|
|
+typedef union
|
|
+{
|
|
+ struct DIstruct s;
|
|
+ DItype ll;
|
|
+} DIunion;
|
|
+
|
|
+DItype
|
|
+__ashrdi3 (DItype u, word_type b)
|
|
+{
|
|
+ DIunion w;
|
|
+ word_type bm;
|
|
+ DIunion uu;
|
|
+
|
|
+ if (b == 0)
|
|
+ return u;
|
|
+
|
|
+ uu.ll = u;
|
|
+
|
|
+ bm = (sizeof (SItype) * BITS_PER_UNIT) - b;
|
|
+ if (bm <= 0)
|
|
+ {
|
|
+ /* w.s.high = 1..1 or 0..0 */
|
|
+ w.s.high = uu.s.high >> (sizeof (SItype) * BITS_PER_UNIT - 1);
|
|
+ w.s.low = uu.s.high >> -bm;
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+ USItype carries = (USItype)uu.s.high << bm;
|
|
+ w.s.high = uu.s.high >> b;
|
|
+ w.s.low = ((USItype)uu.s.low >> b) | carries;
|
|
+ }
|
|
+
|
|
+ return w.ll;
|
|
+}
|
|
Index: linux-2.4.35.4/arch/mips/lib/lshrdi3.c
|
|
===================================================================
|
|
--- /dev/null
|
|
+++ linux-2.4.35.4/arch/mips/lib/lshrdi3.c
|
|
@@ -0,0 +1,62 @@
|
|
+/* lshrdi3.c extracted from gcc-2.7.2/libgcc2.c which is: */
|
|
+/* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
|
+
|
|
+This file is part of GNU CC.
|
|
+
|
|
+GNU CC is free software; you can redistribute it and/or modify
|
|
+it under the terms of the GNU General Public License as published by
|
|
+the Free Software Foundation; either version 2, or (at your option)
|
|
+any later version.
|
|
+
|
|
+GNU CC is distributed in the hope that it will be useful,
|
|
+but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
+GNU General Public License for more details.
|
|
+
|
|
+You should have received a copy of the GNU General Public License
|
|
+along with GNU CC; see the file COPYING. If not, write to
|
|
+the Free Software Foundation, 59 Temple Place - Suite 330,
|
|
+Boston, MA 02111-1307, USA. */
|
|
+
|
|
+#define BITS_PER_UNIT 8
|
|
+
|
|
+typedef int SItype __attribute__ ((mode (SI)));
|
|
+typedef unsigned int USItype __attribute__ ((mode (SI)));
|
|
+typedef int DItype __attribute__ ((mode (DI)));
|
|
+typedef int word_type __attribute__ ((mode (__word__)));
|
|
+
|
|
+struct DIstruct {SItype high, low;};
|
|
+
|
|
+typedef union
|
|
+{
|
|
+ struct DIstruct s;
|
|
+ DItype ll;
|
|
+} DIunion;
|
|
+
|
|
+DItype
|
|
+__lshrdi3 (DItype u, word_type b)
|
|
+{
|
|
+ DIunion w;
|
|
+ word_type bm;
|
|
+ DIunion uu;
|
|
+
|
|
+ if (b == 0)
|
|
+ return u;
|
|
+
|
|
+ uu.ll = u;
|
|
+
|
|
+ bm = (sizeof (SItype) * BITS_PER_UNIT) - b;
|
|
+ if (bm <= 0)
|
|
+ {
|
|
+ w.s.high = 0;
|
|
+ w.s.low = (USItype)uu.s.high >> -bm;
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+ USItype carries = (USItype)uu.s.high << bm;
|
|
+ w.s.high = (USItype)uu.s.high >> b;
|
|
+ w.s.low = ((USItype)uu.s.low >> b) | carries;
|
|
+ }
|
|
+
|
|
+ return w.ll;
|
|
+}
|
|
Index: linux-2.4.35.4/arch/mips/lib/muldi3.c
|
|
===================================================================
|
|
--- /dev/null
|
|
+++ linux-2.4.35.4/arch/mips/lib/muldi3.c
|
|
@@ -0,0 +1,63 @@
|
|
+/* muldi3.c extracted from gcc-2.7.2.3/libgcc2.c and
|
|
+ gcc-2.7.2.3/longlong.h which is: */
|
|
+/* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
|
+
|
|
+This file is part of GNU CC.
|
|
+
|
|
+GNU CC is free software; you can redistribute it and/or modify
|
|
+it under the terms of the GNU General Public License as published by
|
|
+the Free Software Foundation; either version 2, or (at your option)
|
|
+any later version.
|
|
+
|
|
+GNU CC is distributed in the hope that it will be useful,
|
|
+but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
+GNU General Public License for more details.
|
|
+
|
|
+You should have received a copy of the GNU General Public License
|
|
+along with GNU CC; see the file COPYING. If not, write to
|
|
+the Free Software Foundation, 59 Temple Place - Suite 330,
|
|
+Boston, MA 02111-1307, USA. */
|
|
+
|
|
+#define BITS_PER_UNIT 8
|
|
+
|
|
+#define umul_ppmm(w1, w0, u, v) \
|
|
+ __asm__ ("multu %2,%3" \
|
|
+ : "=l" ((USItype)(w0)), \
|
|
+ "=h" ((USItype)(w1)) \
|
|
+ : "d" ((USItype)(u)), \
|
|
+ "d" ((USItype)(v)))
|
|
+
|
|
+#define __umulsidi3(u, v) \
|
|
+ ({DIunion __w; \
|
|
+ umul_ppmm (__w.s.high, __w.s.low, u, v); \
|
|
+ __w.ll; })
|
|
+
|
|
+typedef int SItype __attribute__ ((mode (SI)));
|
|
+typedef unsigned int USItype __attribute__ ((mode (SI)));
|
|
+typedef int DItype __attribute__ ((mode (DI)));
|
|
+typedef int word_type __attribute__ ((mode (__word__)));
|
|
+
|
|
+struct DIstruct {SItype high, low;};
|
|
+
|
|
+typedef union
|
|
+{
|
|
+ struct DIstruct s;
|
|
+ DItype ll;
|
|
+} DIunion;
|
|
+
|
|
+DItype
|
|
+__muldi3 (DItype u, DItype v)
|
|
+{
|
|
+ DIunion w;
|
|
+ DIunion uu, vv;
|
|
+
|
|
+ uu.ll = u,
|
|
+ vv.ll = v;
|
|
+
|
|
+ w.ll = __umulsidi3 (uu.s.low, vv.s.low);
|
|
+ w.s.high += ((USItype) uu.s.low * (USItype) vv.s.high
|
|
+ + (USItype) uu.s.high * (USItype) vv.s.low);
|
|
+
|
|
+ return w.ll;
|
|
+}
|
|
Index: linux-2.4.35.4/fs/cifs/cifsfs.c
|
|
===================================================================
|
|
--- linux-2.4.35.4.orig/fs/cifs/cifsfs.c
|
|
+++ linux-2.4.35.4/fs/cifs/cifsfs.c
|
|
@@ -50,8 +50,6 @@
|
|
static struct quotactl_ops cifs_quotactl_ops;
|
|
#endif
|
|
|
|
-extern struct file_system_type cifs_fs_type;
|
|
-
|
|
int cifsFYI = 0;
|
|
int cifsERROR = 1;
|
|
int traceSMB = 0;
|
|
Index: linux-2.4.35.4/include/asm-mips/uaccess.h
|
|
===================================================================
|
|
--- linux-2.4.35.4.orig/include/asm-mips/uaccess.h
|
|
+++ linux-2.4.35.4/include/asm-mips/uaccess.h
|
|
@@ -149,7 +149,7 @@ static inline int verify_area(int type,
|
|
* Returns zero on success, or -EFAULT on error.
|
|
*/
|
|
#define put_user(x,ptr) \
|
|
- __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
|
|
+ __put_user_check((x),(ptr),sizeof(*(ptr)))
|
|
|
|
/*
|
|
* get_user: - Get a simple variable from user space.
|
|
@@ -169,7 +169,7 @@ static inline int verify_area(int type,
|
|
* On error, the variable @x is set to zero.
|
|
*/
|
|
#define get_user(x,ptr) \
|
|
- __get_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
|
|
+ __get_user_check((x),(ptr),sizeof(*(ptr)))
|
|
|
|
/*
|
|
* __put_user: - Write a simple value into user space, with less checking.
|
|
@@ -191,7 +191,7 @@ static inline int verify_area(int type,
|
|
* Returns zero on success, or -EFAULT on error.
|
|
*/
|
|
#define __put_user(x,ptr) \
|
|
- __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
|
|
+ __put_user_nocheck((x),(ptr),sizeof(*(ptr)))
|
|
|
|
/*
|
|
* __get_user: - Get a simple variable from user space, with less checking.
|
|
@@ -214,7 +214,7 @@ static inline int verify_area(int type,
|
|
* On error, the variable @x is set to zero.
|
|
*/
|
|
#define __get_user(x,ptr) \
|
|
- __get_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
|
|
+ __get_user_nocheck((x),(ptr),sizeof(*(ptr)))
|
|
|
|
struct __large_struct { unsigned long buf[100]; };
|
|
#define __m(x) (*(struct __large_struct *)(x))
|
|
@@ -232,7 +232,7 @@ struct __large_struct { unsigned long bu
|
|
#define __get_user_nocheck(x,ptr,size) \
|
|
({ \
|
|
long __gu_err = 0; \
|
|
- __typeof(*(ptr)) __gu_val = 0; \
|
|
+ __typeof(*(ptr)) __gu_val = (__typeof(*(ptr))) 0; \
|
|
long __gu_addr; \
|
|
__gu_addr = (long) (ptr); \
|
|
switch (size) { \
|