1 --- a/arch/mips/kernel/mips_ksyms.c
2 +++ b/arch/mips/kernel/mips_ksyms.c
4 #include <asm/floppy.h>
7 +asmlinkage long long __ashldi3 (long long, int);
8 +asmlinkage long long __ashrdi3 (long long, int);
9 +asmlinkage long long __lshrdi3 (long long, int);
10 +asmlinkage long long __muldi3 (long long, long long);
11 extern void *__bzero(void *__s, size_t __count);
12 extern long __strncpy_from_user_nocheck_asm(char *__to,
13 const char *__from, long __len);
14 @@ -78,6 +82,13 @@ EXPORT_SYMBOL_NOVERS(__strnlen_user_noch
15 EXPORT_SYMBOL_NOVERS(__strnlen_user_asm);
19 +EXPORT_SYMBOL_NOVERS(__ashldi3);
20 +EXPORT_SYMBOL_NOVERS(__ashrdi3);
21 +EXPORT_SYMBOL_NOVERS(__lshrdi3);
22 +EXPORT_SYMBOL_NOVERS(__muldi3);
25 /* Networking helper routines. */
26 EXPORT_SYMBOL(csum_partial_copy);
28 --- a/arch/mips/lib/Makefile
29 +++ b/arch/mips/lib/Makefile
30 @@ -9,7 +9,8 @@ L_TARGET = lib.a
31 obj-y += csum_partial.o csum_partial_copy.o \
32 promlib.o rtc-std.o rtc-no.o memcpy.o \
33 memset.o watch.o strlen_user.o \
34 - strncpy_user.o strnlen_user.o
35 + strncpy_user.o strnlen_user.o \
36 + ashldi3.o ashrdi3.o lshrdi3.o muldi3.o
38 export-objs := rtc-std.o rtc-no.o
41 +++ b/arch/mips/lib/ashldi3.c
43 +/* ashrdi3.c extracted from gcc-2.95.2/libgcc2.c which is: */
44 +/* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc.
46 +This file is part of GNU CC.
48 +GNU CC is free software; you can redistribute it and/or modify
49 +it under the terms of the GNU General Public License as published by
50 +the Free Software Foundation; either version 2, or (at your option)
53 +GNU CC is distributed in the hope that it will be useful,
54 +but WITHOUT ANY WARRANTY; without even the implied warranty of
55 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56 +GNU General Public License for more details.
58 +You should have received a copy of the GNU General Public License
59 +along with GNU CC; see the file COPYING. If not, write to
60 +the Free Software Foundation, 59 Temple Place - Suite 330,
61 +Boston, MA 02111-1307, USA. */
63 +#define BITS_PER_UNIT 8
65 +typedef int SItype __attribute__ ((mode (SI)));
66 +typedef unsigned int USItype __attribute__ ((mode (SI)));
67 +typedef int DItype __attribute__ ((mode (DI)));
68 +typedef int word_type __attribute__ ((mode (__word__)));
70 +struct DIstruct {SItype high, low;};
79 +__ashldi3 (DItype u, word_type b)
90 + bm = (sizeof (SItype) * BITS_PER_UNIT) - b;
94 + w.s.high = (USItype)uu.s.low << -bm;
98 + USItype carries = (USItype)uu.s.low >> bm;
99 + w.s.low = (USItype)uu.s.low << b;
100 + w.s.high = ((USItype)uu.s.high << b) | carries;
106 +++ b/arch/mips/lib/ashrdi3.c
108 +/* ashrdi3.c extracted from gcc-2.7.2/libgcc2.c which is: */
109 +/* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
111 +This file is part of GNU CC.
113 +GNU CC is free software; you can redistribute it and/or modify
114 +it under the terms of the GNU General Public License as published by
115 +the Free Software Foundation; either version 2, or (at your option)
118 +GNU CC is distributed in the hope that it will be useful,
119 +but WITHOUT ANY WARRANTY; without even the implied warranty of
120 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
121 +GNU General Public License for more details.
123 +You should have received a copy of the GNU General Public License
124 +along with GNU CC; see the file COPYING. If not, write to
125 +the Free Software Foundation, 59 Temple Place - Suite 330,
126 +Boston, MA 02111-1307, USA. */
128 +#define BITS_PER_UNIT 8
130 +typedef int SItype __attribute__ ((mode (SI)));
131 +typedef unsigned int USItype __attribute__ ((mode (SI)));
132 +typedef int DItype __attribute__ ((mode (DI)));
133 +typedef int word_type __attribute__ ((mode (__word__)));
135 +struct DIstruct {SItype high, low;};
144 +__ashrdi3 (DItype u, word_type b)
155 + bm = (sizeof (SItype) * BITS_PER_UNIT) - b;
158 + /* w.s.high = 1..1 or 0..0 */
159 + w.s.high = uu.s.high >> (sizeof (SItype) * BITS_PER_UNIT - 1);
160 + w.s.low = uu.s.high >> -bm;
164 + USItype carries = (USItype)uu.s.high << bm;
165 + w.s.high = uu.s.high >> b;
166 + w.s.low = ((USItype)uu.s.low >> b) | carries;
172 +++ b/arch/mips/lib/lshrdi3.c
174 +/* lshrdi3.c extracted from gcc-2.7.2/libgcc2.c which is: */
175 +/* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
177 +This file is part of GNU CC.
179 +GNU CC is free software; you can redistribute it and/or modify
180 +it under the terms of the GNU General Public License as published by
181 +the Free Software Foundation; either version 2, or (at your option)
184 +GNU CC is distributed in the hope that it will be useful,
185 +but WITHOUT ANY WARRANTY; without even the implied warranty of
186 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
187 +GNU General Public License for more details.
189 +You should have received a copy of the GNU General Public License
190 +along with GNU CC; see the file COPYING. If not, write to
191 +the Free Software Foundation, 59 Temple Place - Suite 330,
192 +Boston, MA 02111-1307, USA. */
194 +#define BITS_PER_UNIT 8
196 +typedef int SItype __attribute__ ((mode (SI)));
197 +typedef unsigned int USItype __attribute__ ((mode (SI)));
198 +typedef int DItype __attribute__ ((mode (DI)));
199 +typedef int word_type __attribute__ ((mode (__word__)));
201 +struct DIstruct {SItype high, low;};
210 +__lshrdi3 (DItype u, word_type b)
221 + bm = (sizeof (SItype) * BITS_PER_UNIT) - b;
225 + w.s.low = (USItype)uu.s.high >> -bm;
229 + USItype carries = (USItype)uu.s.high << bm;
230 + w.s.high = (USItype)uu.s.high >> b;
231 + w.s.low = ((USItype)uu.s.low >> b) | carries;
237 +++ b/arch/mips/lib/muldi3.c
239 +/* muldi3.c extracted from gcc-2.7.2.3/libgcc2.c and
240 + gcc-2.7.2.3/longlong.h which is: */
241 +/* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
243 +This file is part of GNU CC.
245 +GNU CC is free software; you can redistribute it and/or modify
246 +it under the terms of the GNU General Public License as published by
247 +the Free Software Foundation; either version 2, or (at your option)
250 +GNU CC is distributed in the hope that it will be useful,
251 +but WITHOUT ANY WARRANTY; without even the implied warranty of
252 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
253 +GNU General Public License for more details.
255 +You should have received a copy of the GNU General Public License
256 +along with GNU CC; see the file COPYING. If not, write to
257 +the Free Software Foundation, 59 Temple Place - Suite 330,
258 +Boston, MA 02111-1307, USA. */
260 +#define BITS_PER_UNIT 8
262 +#define umul_ppmm(w1, w0, u, v) \
263 + __asm__ ("multu %2,%3" \
264 + : "=l" ((USItype)(w0)), \
265 + "=h" ((USItype)(w1)) \
266 + : "d" ((USItype)(u)), \
267 + "d" ((USItype)(v)))
269 +#define __umulsidi3(u, v) \
271 + umul_ppmm (__w.s.high, __w.s.low, u, v); \
274 +typedef int SItype __attribute__ ((mode (SI)));
275 +typedef unsigned int USItype __attribute__ ((mode (SI)));
276 +typedef int DItype __attribute__ ((mode (DI)));
277 +typedef int word_type __attribute__ ((mode (__word__)));
279 +struct DIstruct {SItype high, low;};
288 +__muldi3 (DItype u, DItype v)
296 + w.ll = __umulsidi3 (uu.s.low, vv.s.low);
297 + w.s.high += ((USItype) uu.s.low * (USItype) vv.s.high
298 + + (USItype) uu.s.high * (USItype) vv.s.low);
302 --- a/fs/cifs/cifsfs.c
303 +++ b/fs/cifs/cifsfs.c
305 static struct quotactl_ops cifs_quotactl_ops;
308 -extern struct file_system_type cifs_fs_type;
313 --- a/include/asm-mips/uaccess.h
314 +++ b/include/asm-mips/uaccess.h
315 @@ -149,7 +149,7 @@ static inline int verify_area(int type,
316 * Returns zero on success, or -EFAULT on error.
318 #define put_user(x,ptr) \
319 - __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
320 + __put_user_check((x),(ptr),sizeof(*(ptr)))
323 * get_user: - Get a simple variable from user space.
324 @@ -169,7 +169,7 @@ static inline int verify_area(int type,
325 * On error, the variable @x is set to zero.
327 #define get_user(x,ptr) \
328 - __get_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
329 + __get_user_check((x),(ptr),sizeof(*(ptr)))
332 * __put_user: - Write a simple value into user space, with less checking.
333 @@ -191,7 +191,7 @@ static inline int verify_area(int type,
334 * Returns zero on success, or -EFAULT on error.
336 #define __put_user(x,ptr) \
337 - __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
338 + __put_user_nocheck((x),(ptr),sizeof(*(ptr)))
341 * __get_user: - Get a simple variable from user space, with less checking.
342 @@ -214,7 +214,7 @@ static inline int verify_area(int type,
343 * On error, the variable @x is set to zero.
345 #define __get_user(x,ptr) \
346 - __get_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
347 + __get_user_nocheck((x),(ptr),sizeof(*(ptr)))
349 struct __large_struct { unsigned long buf[100]; };
350 #define __m(x) (*(struct __large_struct *)(x))
351 @@ -232,7 +232,7 @@ struct __large_struct { unsigned long bu
352 #define __get_user_nocheck(x,ptr,size) \
355 - __typeof(*(ptr)) __gu_val = 0; \
356 + __typeof(*(ptr)) __gu_val = (__typeof(*(ptr))) 0; \
358 __gu_addr = (long) (ptr); \