aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/coh901327_wdt.c
diff options
context:
space:
mode:
authorBryan Ward <bcw@cs.unc.edu>2013-04-18 15:52:46 -0400
committerBryan Ward <bcw@cs.unc.edu>2013-04-18 15:52:46 -0400
commitcb71b522bb144a838b457304382d63b131695a8c (patch)
tree7f9fafb3feea4ab606944be09e6b1e83b2e251b7 /drivers/watchdog/coh901327_wdt.c
parent7ef4a793a624c6e66c16ca1051847f75161f5bec (diff)
Appears to be working.wip-nested-locking
Diffstat (limited to 'drivers/watchdog/coh901327_wdt.c')
0 files changed, 0 insertions, 0 deletions
ppc"> \ "subu %0, %0, %z6\n\t" \ "addiu %2, %2, 1\n" \ "3:\n\t" \ "bnez %4, 0b\n\t" \ " srl %5, %1, 0x1f\n\t" \ ".set pop" \ : "=&r" (__mod32), "=&r" (__tmp), \ "=&r" (__quot32), "=&r" (__cf), \ "=&r" (__i), "=&r" (__tmp2) \ : "Jr" (base), "0" (high), "1" (low)); \ \ (res) = __quot32; \ __mod32; }) #define do_div(n, base) ({ \ unsigned long long __quot; \ unsigned long __mod; \ unsigned long long __div; \ unsigned long __upper, __low, __high, __base; \ \ __div = (n); \ __base = (base); \ \ __high = __div >> 32; \ __low = __div; \ __upper = __high; \ \ if (__high) \ __asm__("divu $0, %z2, %z3" \ : "=h" (__upper), "=l" (__high) \ : "Jr" (__high), "Jr" (__base) \ : GCC_REG_ACCUM); \ \ __mod = do_div64_32(__low, __upper, __low, __base); \ \ __quot = __high; \ __quot = __quot << 32 | __low; \ (n) = __quot; \ __mod; }) extern uint64_t div64_64(uint64_t dividend, uint64_t divisor); #endif /* (_MIPS_SZLONG == 32) */ #if (_MIPS_SZLONG == 64) /* * Hey, we're already 64-bit, no * need to play games.. */ #define do_div(n, base) ({ \ unsigned long __quot; \ unsigned int __mod; \ unsigned long __div; \ unsigned int __base; \ \ __div = (n); \ __base = (base); \ \ __mod = __div % __base; \ __quot = __div / __base; \ \ (n) = __quot; \ __mod; }) static inline uint64_t div64_64(uint64_t dividend, uint64_t divisor) { return dividend / divisor; } #endif /* (_MIPS_SZLONG == 64) */ #endif /* _ASM_DIV64_H */