]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-mips/div64.h
mm: fix atomic_t overflow in vm
[linux-2.6-omap-h63xx.git] / include / asm-mips / div64.h
index 66189f5f6399ca4613ecdc5ba88722925a5dbfad..d1d699105c1106b724340104786f95ce8df39188 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 #define do_div64_32(res, high, low, base) ({ \
-       unsigned long __quot, __mod; \
+       unsigned long __quot32, __mod32; \
        unsigned long __cf, __tmp, __tmp2, __i; \
        \
        __asm__(".set   push\n\t" \
                "bnez   %4, 0b\n\t" \
                " srl   %5, %1, 0x1f\n\t" \
                ".set   pop" \
-               : "=&r" (__mod), "=&r" (__tmp), "=&r" (__quot), "=&r" (__cf), \
+               : "=&r" (__mod32), "=&r" (__tmp), \
+                 "=&r" (__quot32), "=&r" (__cf), \
                  "=&r" (__i), "=&r" (__tmp2) \
                : "Jr" (base), "0" (high), "1" (low)); \
        \
-       (res) = __quot; \
-       __mod; })
+       (res) = __quot32; \
+       __mod32; })
 
 #define do_div(n, base) ({ \
        unsigned long long __quot; \
@@ -81,7 +82,6 @@
        (n) = __quot; \
        __mod; })
 
-extern uint64_t div64_64(uint64_t dividend, uint64_t divisor);
 #endif /* (_MIPS_SZLONG == 32) */
 
 #if (_MIPS_SZLONG == 64)
@@ -105,11 +105,6 @@ extern uint64_t div64_64(uint64_t dividend, uint64_t divisor);
        (n) = __quot; \
        __mod; })
 
-static inline uint64_t div64_64(uint64_t dividend, uint64_t divisor)
-{
-       return dividend / divisor;
-}
-
 #endif /* (_MIPS_SZLONG == 64) */
 
 #endif /* _ASM_DIV64_H */