diff options
author | Chris Zankel <chris@zankel.net> | 2007-05-31 20:46:09 -0400 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2007-05-31 20:46:09 -0400 |
commit | 176fd6c96dcbc263eb1c61eae9fe2a33f23a876d (patch) | |
tree | 921eca1bbbafe280b1f91eb79535e297e9aa0f7d /include | |
parent | 54213baf643dd14d3bc06ca7575a817d79a350c2 (diff) |
[XTENSA] Use generic 64-bit division
Use generic 64-bit division algorithm from the asm-generic directory.\
Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-xtensa/div64.h | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/include/asm-xtensa/div64.h b/include/asm-xtensa/div64.h index 20965e3af1dd..f35678cb0a9b 100644 --- a/include/asm-xtensa/div64.h +++ b/include/asm-xtensa/div64.h | |||
@@ -5,21 +5,12 @@ | |||
5 | * License. See the file "COPYING" in the main directory of this archive | 5 | * License. See the file "COPYING" in the main directory of this archive |
6 | * for more details. | 6 | * for more details. |
7 | * | 7 | * |
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | 8 | * Copyright (C) 2001 - 2007 Tensilica Inc. |
9 | */ | 9 | */ |
10 | 10 | ||
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> | 14 | #include <asm-generic/div64.h> |
15 | 15 | ||
16 | #define do_div(n,base) ({ \ | 16 | #endif /* _XTENSA_DIV64_H */ |
17 | int __res = n % ((unsigned int) base); \ | ||
18 | n /= (unsigned int) base; \ | ||
19 | __res; }) | ||
20 | |||
21 | static inline uint64_t div64_64(uint64_t dividend, uint64_t divisor) | ||
22 | { | ||
23 | return dividend / divisor; | ||
24 | } | ||
25 | #endif | ||