aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/div64.h2
-rw-r--r--include/asm-generic/div64.h7
-rw-r--r--include/asm-m68k/div64.h1
-rw-r--r--include/asm-mips/div64.h6
-rw-r--r--include/asm-mn10300/div64.h3
-rw-r--r--include/asm-um/div64.h1
-rw-r--r--include/asm-x86/div64.h2
-rw-r--r--include/linux/math64.h12
8 files changed, 12 insertions, 22 deletions
diff --git a/include/asm-arm/div64.h b/include/asm-arm/div64.h
index 0b5f881c3d85..5001390be958 100644
--- a/include/asm-arm/div64.h
+++ b/include/asm-arm/div64.h
@@ -224,6 +224,4 @@
224 224
225#endif 225#endif
226 226
227extern uint64_t div64_64(uint64_t dividend, uint64_t divisor);
228
229#endif 227#endif
diff --git a/include/asm-generic/div64.h b/include/asm-generic/div64.h
index a4a49370793c..8f4e3193342e 100644
--- a/include/asm-generic/div64.h
+++ b/include/asm-generic/div64.h
@@ -30,11 +30,6 @@
30 __rem; \ 30 __rem; \
31 }) 31 })
32 32
33static inline uint64_t div64_64(uint64_t dividend, uint64_t divisor)
34{
35 return dividend / divisor;
36}
37
38#elif BITS_PER_LONG == 32 33#elif BITS_PER_LONG == 32
39 34
40extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor); 35extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
@@ -54,8 +49,6 @@ extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
54 __rem; \ 49 __rem; \
55 }) 50 })
56 51
57extern uint64_t div64_64(uint64_t dividend, uint64_t divisor);
58
59#else /* BITS_PER_LONG == ?? */ 52#else /* BITS_PER_LONG == ?? */
60 53
61# error do_div() does not yet support the C64 54# error do_div() does not yet support the C64
diff --git a/include/asm-m68k/div64.h b/include/asm-m68k/div64.h
index 33caad1628d4..8243c931b5c0 100644
--- a/include/asm-m68k/div64.h
+++ b/include/asm-m68k/div64.h
@@ -25,5 +25,4 @@
25 __rem; \ 25 __rem; \
26}) 26})
27 27
28extern uint64_t div64_64(uint64_t dividend, uint64_t divisor);
29#endif /* _M68K_DIV64_H */ 28#endif /* _M68K_DIV64_H */
diff --git a/include/asm-mips/div64.h b/include/asm-mips/div64.h
index 716371bd0980..d1d699105c11 100644
--- a/include/asm-mips/div64.h
+++ b/include/asm-mips/div64.h
@@ -82,7 +82,6 @@
82 (n) = __quot; \ 82 (n) = __quot; \
83 __mod; }) 83 __mod; })
84 84
85extern uint64_t div64_64(uint64_t dividend, uint64_t divisor);
86#endif /* (_MIPS_SZLONG == 32) */ 85#endif /* (_MIPS_SZLONG == 32) */
87 86
88#if (_MIPS_SZLONG == 64) 87#if (_MIPS_SZLONG == 64)
@@ -106,11 +105,6 @@ extern uint64_t div64_64(uint64_t dividend, uint64_t divisor);
106 (n) = __quot; \ 105 (n) = __quot; \
107 __mod; }) 106 __mod; })
108 107
109static inline uint64_t div64_64(uint64_t dividend, uint64_t divisor)
110{
111 return dividend / divisor;
112}
113
114#endif /* (_MIPS_SZLONG == 64) */ 108#endif /* (_MIPS_SZLONG == 64) */
115 109
116#endif /* _ASM_DIV64_H */ 110#endif /* _ASM_DIV64_H */
diff --git a/include/asm-mn10300/div64.h b/include/asm-mn10300/div64.h
index bf9c515a998c..3a8329b3e869 100644
--- a/include/asm-mn10300/div64.h
+++ b/include/asm-mn10300/div64.h
@@ -97,7 +97,4 @@ signed __muldiv64s(signed val, signed mult, signed div)
97 return result; 97 return result;
98} 98}
99 99
100extern __attribute__((const))
101uint64_t div64_64(uint64_t dividend, uint64_t divisor);
102
103#endif /* _ASM_DIV64 */ 100#endif /* _ASM_DIV64 */
diff --git a/include/asm-um/div64.h b/include/asm-um/div64.h
index 7b73b2cd5b34..1e17f7409cab 100644
--- a/include/asm-um/div64.h
+++ b/include/asm-um/div64.h
@@ -3,5 +3,4 @@
3 3
4#include "asm/arch/div64.h" 4#include "asm/arch/div64.h"
5 5
6extern uint64_t div64_64(uint64_t dividend, uint64_t divisor);
7#endif 6#endif
diff --git a/include/asm-x86/div64.h b/include/asm-x86/div64.h
index c7892cfe9ce6..32fdbddaae55 100644
--- a/include/asm-x86/div64.h
+++ b/include/asm-x86/div64.h
@@ -71,8 +71,6 @@ static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder)
71} 71}
72#define div_u64_rem div_u64_rem 72#define div_u64_rem div_u64_rem
73 73
74extern uint64_t div64_64(uint64_t dividend, uint64_t divisor);
75
76#else 74#else
77# include <asm-generic/div64.h> 75# include <asm-generic/div64.h>
78#endif /* CONFIG_X86_32 */ 76#endif /* CONFIG_X86_32 */
diff --git a/include/linux/math64.h b/include/linux/math64.h
index 6d1716641008..c1a5f81501ff 100644
--- a/include/linux/math64.h
+++ b/include/linux/math64.h
@@ -27,6 +27,14 @@ static inline s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder)
27 return dividend / divisor; 27 return dividend / divisor;
28} 28}
29 29
30/**
31 * div64_u64 - unsigned 64bit divide with 64bit divisor
32 */
33static inline u64 div64_u64(u64 dividend, u64 divisor)
34{
35 return dividend / divisor;
36}
37
30#elif BITS_PER_LONG == 32 38#elif BITS_PER_LONG == 32
31 39
32#ifndef div_u64_rem 40#ifndef div_u64_rem
@@ -41,6 +49,10 @@ static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder)
41extern s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder); 49extern s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder);
42#endif 50#endif
43 51
52#ifndef div64_u64
53extern u64 div64_u64(u64 dividend, u64 divisor);
54#endif
55
44#endif /* BITS_PER_LONG */ 56#endif /* BITS_PER_LONG */
45 57
46/** 58/**