Skip to content

Commit 176fd6c

Browse files
committed
[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>
1 parent 54213ba commit 176fd6c

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

‎include/asm-xtensa/div64.h‎

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,12 @@
55
* License. See the file "COPYING" in the main directory of this archive
66
* for more details.
77
*
8-
* Copyright (C) 2001 - 2005 Tensilica Inc.
8+
* Copyright (C) 2001 - 2007 Tensilica Inc.
99
*/
1010

1111
#ifndef _XTENSA_DIV64_H
1212
#define _XTENSA_DIV64_H
1313

14-
#include <linux/types.h>
14+
#include <asm-generic/div64.h>
1515

16-
#define do_div(n,base) ({ \
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
16+
#endif /* _XTENSA_DIV64_H */

0 commit comments

Comments
 (0)