提交 f4bce2f7 编写于 作者: C Cédric Le Goater 提交者: Benjamin Herrenschmidt

powerpc/boot: Fix do_div for 64bit wrapper

When the boot wrapper is compiled in 64bit, there is no need to
use __div64_32.
Signed-off-by: NCédric Le Goater <clg@fr.ibm.com>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 a7d04317
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册