--- zzzz-none-000/linux-3.10.107/arch/powerpc/boot/stdio.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/arch/powerpc/boot/stdio.c 2021-02-04 17:41:59.000000000 +0000 @@ -21,6 +21,18 @@ 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 @@ __rem; \ }) +#endif /* __powerpc64__ */ + static int skip_atoi(const char **s) { int i, c;