]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/boot/stdio.c
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
[karo-tx-linux.git] / arch / powerpc / boot / stdio.c
index 5b57800bbc675e11efabec8601a8b9000ce4c196..a701261b17818118f824221e81a7177d09f004b4 100644 (file)
@@ -21,6 +21,18 @@ size_t strnlen(const char * s, size_t count)
        return sc - s;
 }
 
+#ifdef __powerpc64__
+
+# define do_div(n, base) ({                                            \
+       unsigned int __base = (base);                                   \
+       unsigned int __rem;                                             \
+       __rem = ((unsigned long long)(n)) % __base;                     \
+       (n) = ((unsigned long long)(n)) / __base;                       \
+       __rem;                                                          \
+})
+
+#else
+
 extern unsigned int __div64_32(unsigned long long *dividend,
                               unsigned int divisor);
 
@@ -39,6 +51,8 @@ extern unsigned int __div64_32(unsigned long long *dividend,
        __rem;                                                          \
  })
 
+#endif /* __powerpc64__ */
+
 static int skip_atoi(const char **s)
 {
        int i, c;