summaryrefslogtreecommitdiff
path: root/arch/powerpc/boot/div64.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-11-18 07:38:58 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2010-11-18 07:38:58 -0800
commit70b99eff756e8995b607a9d33f242c1e4f480f32 (patch)
tree23b62ad71f77f9cb44622d0be55ff3e4f7e55a00 /arch/powerpc/boot/div64.S
parent0a5b871ea4c6bfb2723ac2ffc7ef5c32452abb89 (diff)
parent0f6b77ca12bea571e0a97b0588f62aa5f6012d61 (diff)
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc: Update a BKL related comment powerpc/mm: Fix module instruction tlb fault handling on Book-E 64 powerpc: Fix call to subpage_protection() powerpc: Set CONFIG_32BIT on ppc32 powerpc/mm: Fix build error in setup_initial_memory_limit powerpc/pseries: Don't override CONFIG_PPC_PSERIES_DEBUG powerpc: Fix div64 in bootloader
Diffstat (limited to 'arch/powerpc/boot/div64.S')
-rw-r--r--arch/powerpc/boot/div64.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/boot/div64.S b/arch/powerpc/boot/div64.S
index 722f360a32a9..d271ab542673 100644
--- a/arch/powerpc/boot/div64.S
+++ b/arch/powerpc/boot/div64.S
@@ -33,9 +33,10 @@ __div64_32:
cntlzw r0,r5 # we are shifting the dividend right
li r10,-1 # to make it < 2^32, and shifting
srw r10,r10,r0 # the divisor right the same amount,
- add r9,r4,r10 # rounding up (so the estimate cannot
+ addc r9,r4,r10 # rounding up (so the estimate cannot
andc r11,r6,r10 # ever be too large, only too small)
andc r9,r9,r10
+ addze r9,r9
or r11,r5,r11
rotlw r9,r9,r0
rotlw r11,r11,r0