1 --- linux-2.6.12.6.org/arch/mips/Makefile 2010-08-03 13:53:13.786025121 +0200
2 +++ linux-2.6.12.6/arch/mips/Makefile 2010-08-03 13:46:01.066025294 +0200
4 # Select the object file format to substitute into the linker script.
6 ifdef CONFIG_CPU_LITTLE_ENDIAN
7 -32bit-tool-prefix = mipsel-linux-
8 +32bit-tool-prefix = mipsel-oe-linux-
9 64bit-tool-prefix = mips64el-linux-
10 32bit-bfd = elf32-tradlittlemips
11 64bit-bfd = elf64-tradlittlemips
12 --- linux-2.6.12.6.org/arch/mips/kernel/time.c 2005-08-29 18:55:27.000000000 +0200
13 +++ linux-2.6.12.6/arch/mips/kernel/time.c 2010-08-03 13:42:31.590021528 +0200
15 /* .. relative to previous jiffy (32 bits is enough) */
18 +#ifndef GCC_NO_H_CONSTRAINT
21 : "r" (count), "r" (sll32_usecs_per_cycle)
22 : "lo", GCC_REG_ACCUM);
24 + res = ((uintx_t)count * sll32_usecs_per_cycle) >> BITS_PER_LONG;
28 * Due to possible jiffies inconsistencies, we need to check
30 /* .. relative to previous jiffy (32 bits is enough) */
33 +#ifndef GCC_NO_H_CONSTRAINT
36 : "r" (count), "r" (quotient)
37 : "lo", GCC_REG_ACCUM);
39 + res = ((uintx_t)count * quotient) >> BITS_PER_LONG;
43 * Due to possible jiffies inconsistencies, we need to check
45 /* .. relative to previous jiffy (32 bits is enough) */
48 +#ifndef GCC_NO_H_CONSTRAINT
51 : "r" (count), "r" (quotient)
52 : "lo", GCC_REG_ACCUM);
54 + res = ((uintx_t)count * quotient) >> BITS_PER_LONG;
58 * Due to possible jiffies inconsistencies, we need to check
59 --- linux-2.6.12.6.org/arch/mips/lib/Makefile 2010-08-03 13:53:14.270022698 +0200
60 +++ linux-2.6.12.6/arch/mips/lib/Makefile 2010-08-03 13:48:44.066022062 +0200
66 +obj-y += ucmpdi2.o ashrdi3.o ashldi3.o lshrdi3.o
68 EXTRA_AFLAGS := $(CFLAGS)
69 --- linux-2.6.12.6.org/arch/mips/lib/ashldi3.c 1970-01-01 01:00:00.000000000 +0100
70 +++ linux-2.6.12.6/arch/mips/lib/ashldi3.c 2006-09-20 05:42:06.000000000 +0200
72 +#include <linux/module.h>
76 +long long __ashldi3(long long u, word_type b)
89 + w.s.high = (unsigned int) uu.s.low << -bm;
91 + const unsigned int carries = (unsigned int) uu.s.low >> bm;
93 + w.s.low = (unsigned int) uu.s.low << b;
94 + w.s.high = ((unsigned int) uu.s.high << b) | carries;
100 +EXPORT_SYMBOL(__ashldi3);
101 --- linux-2.6.12.6.org/arch/mips/lib/ashrdi3.c 1970-01-01 01:00:00.000000000 +0100
102 +++ linux-2.6.12.6/arch/mips/lib/ashrdi3.c 2006-09-20 05:42:06.000000000 +0200
104 +#include <linux/module.h>
108 +long long __ashrdi3(long long u, word_type b)
120 + /* w.s.high = 1..1 or 0..0 */
123 + w.s.low = uu.s.high >> -bm;
125 + const unsigned int carries = (unsigned int) uu.s.high << bm;
127 + w.s.high = uu.s.high >> b;
128 + w.s.low = ((unsigned int) uu.s.low >> b) | carries;
134 +EXPORT_SYMBOL(__ashrdi3);
135 --- linux-2.6.12.6-org/arch/mips/lib/lshrdi3.c 1970-01-01 01:00:00.000000000 +0100
136 +++ linux-2.6.12.6/arch/mips/lib/lshrdi3.c 2006-09-20 05:42:06.000000000 +0200
138 +#include <linux/module.h>
142 +long long __lshrdi3(long long u, word_type b)
155 + w.s.low = (unsigned int) uu.s.high >> -bm;
157 + const unsigned int carries = (unsigned int) uu.s.high << bm;
159 + w.s.high = (unsigned int) uu.s.high >> b;
160 + w.s.low = ((unsigned int) uu.s.low >> b) | carries;
166 +EXPORT_SYMBOL(__lshrdi3);
167 --- linux-2.6.12.6.org/fs/squashfs/.tmp_versions/squashfs.mod 1970-01-01 01:00:00.000000000 +0100
168 +++ linux-2.6.12.6/fs/squashfs/.tmp_versions/squashfs.mod 2010-08-03 13:49:46.214025683 +0200
170 +/home/ghost/misc/dreambox/bitbake_7025_new/dm7025/build/tmp/work/dm7025-oe-linux/linux-dm7025-2.6.12.6-s7/linux-2.6.12.6/fs/squashfs/squashfs.ko
171 +/home/ghost/misc/dreambox/bitbake_7025_new/dm7025/build/tmp/work/dm7025-oe-linux/linux-dm7025-2.6.12.6-s7/linux-2.6.12.6/fs/squashfs/inode.o /home/ghost/misc/dreambox/bitbake_7025_new/dm7025/build/tmp/work/dm7025-oe-linux/linux-dm7025-2.6.12.6-s7/linux-2.6.12.6/fs/squashfs/squashfs2_0.o
172 --- linux-2.6.12.6.org/include/asm-mips/compiler.h 2005-08-29 18:55:27.000000000 +0200
173 +++ linux-2.6.12.6/include/asm-mips/compiler.h 2010-08-03 13:44:08.106021617 +0200
175 #ifndef _ASM_COMPILER_H
176 #define _ASM_COMPILER_H
178 +#include <asm/types.h>
180 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
181 #define GCC_REG_ACCUM "$0"
183 #define GCC_REG_ACCUM "accum"
186 +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
187 +#define GCC_NO_H_CONSTRAINT
189 +typedef unsigned int uintx_t __attribute__((mode(TI)));
191 +typedef u64 uintx_t;
195 #endif /* _ASM_COMPILER_H */
196 --- linux-2.6.12.6.org/include/asm-mips/delay.h 2005-08-29 18:55:27.000000000 +0200
197 +++ linux-2.6.12.6/include/asm-mips/delay.h 2010-08-03 13:44:17.914022072 +0200
203 + * convert usecs to loops
205 + * handle removal of 'h' constraint in GCC 4.4
208 +#ifndef GCC_NO_H_CONSTRAINT /* gcc <= 4.3 */
209 +static inline unsigned long __usecs_to_loops(unsigned long usecs, unsigned long lpj)
213 + if (sizeof(long) == 4)
214 + __asm__("multu\t%2, %3"
215 + : "=h" (usecs), "=l" (lo)
216 + : "r" (usecs), "r" (lpj)
218 + else if (sizeof(long) == 8)
219 + __asm__("dmultu\t%2, %3"
220 + : "=h" (usecs), "=l" (lo)
221 + : "r" (usecs), "r" (lpj)
226 +#else /* GCC_NO_H_CONSTRAINT, gcc >= 4.4 */
227 +static inline unsigned long __usecs_to_loops(unsigned long usecs,
230 + return ((uintx_t)usecs * lpj) >> BITS_PER_LONG;
235 * Division by multiplication: you don't have to worry about
238 static inline void __udelay(unsigned long usecs, unsigned long lpj)
243 * The common rates of 1000 and 128 are rounded wrongly by the
244 * catchall case for 64-bit. Excessive precission? Probably ...
246 usecs *= (unsigned long) (((0x8000000000000000ULL / (500000 / HZ)) +
247 0x80000000ULL) >> 32);
250 - if (sizeof(long) == 4)
251 - __asm__("multu\t%2, %3"
252 - : "=h" (usecs), "=l" (lo)
253 - : "r" (usecs), "r" (lpj)
255 - else if (sizeof(long) == 8)
256 - __asm__("dmultu\t%2, %3"
257 - : "=h" (usecs), "=l" (lo)
258 - : "r" (usecs), "r" (lpj)
262 + __delay(__usecs_to_loops(usecs, lpj));
266 --- linux-2.6.12.6.org/include/asm-mips/div64.h 2005-08-29 18:55:27.000000000 +0200
267 +++ linux-2.6.12.6/include/asm-mips/div64.h 2010-08-03 13:44:26.090021496 +0200
273 + * __do_divu -- unsigned interger dividing
275 + * handle removal of 'h' constraint in GCC 4.4
277 +#ifndef GCC_NO_H_CONSTRAINT /* gcc <= 4.3*/
278 +#define __do_divu() ({ \
279 + __asm__("divu $0, %z2, %z3" \
280 + : "=h" (__upper), "=l" (__high) \
281 + : "Jr" (__high), "Jr" (__base) \
282 + : GCC_REG_ACCUM); })
283 +#else /* gcc >= 4.4 */
284 +#define __do_divu() ({ \
285 + __upper = (uintx_t)__high % __base; \
286 + __high = (uintx_t)__high / __base; })
289 #define do_div(n, base) ({ \
290 unsigned long long __quot; \
291 unsigned long __mod; \
296 - __asm__("divu $0, %z2, %z3" \
297 - : "=h" (__upper), "=l" (__high) \
298 - : "Jr" (__high), "Jr" (__base) \
299 - : GCC_REG_ACCUM); \
302 __mod = do_div64_32(__low, __upper, __low, __base); \