aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-xtensa/div64.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-xtensa/div64.h')
-rw-r--r--include/asm-xtensa/div64.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asm-xtensa/div64.h b/include/asm-xtensa/div64.h
index c4a105776383..20965e3af1dd 100644
--- a/include/asm-xtensa/div64.h
+++ b/include/asm-xtensa/div64.h
@@ -11,9 +11,15 @@
11#ifndef _XTENSA_DIV64_H 11#ifndef _XTENSA_DIV64_H
12#define _XTENSA_DIV64_H 12#define _XTENSA_DIV64_H
13 13
14#include <linux/types.h>
15
14#define do_div(n,base) ({ \ 16#define do_div(n,base) ({ \
15 int __res = n % ((unsigned int) base); \ 17 int __res = n % ((unsigned int) base); \
16 n /= (unsigned int) base; \ 18 n /= (unsigned int) base; \
17 __res; }) 19 __res; })
18 20
21static inline uint64_t div64_64(uint64_t dividend, uint64_t divisor)
22{
23 return dividend / divisor;
24}
19#endif 25#endif