projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7957f0a
)
powerpc: Fix div64 in bootloader
author
Benjamin Herrenschmidt
<
[email protected]
>
Thu, 18 Nov 2010 03:39:24 +0000
(14:39 +1100)
committer
Benjamin Herrenschmidt
<
[email protected]
>
Thu, 18 Nov 2010 03:39:24 +0000
(14:39 +1100)
The code is missing a fix that went into the main kernel variant
(we should try to share that code again at some stage)
Reported-by: Albert Cahalan <
[email protected]
>
Signed-off-by: Benjamin Herrenschmidt <
[email protected]
>
arch/powerpc/boot/div64.S
patch
|
blob
|
history
diff --git
a/arch/powerpc/boot/div64.S
b/arch/powerpc/boot/div64.S
index 722f360a32a9e905b2edf6f3cdb90b9ef9e5d588..d271ab5426732ab07ec0bec73e52a195e493fe64 100644
(file)
--- 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
+ add
c
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