aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/lib/findbit.S
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-11-25 16:45:43 +0900
committerPaul Mundt <lethal@linux-sh.org>2010-11-25 16:45:43 +0900
commit1ad2096c4eba144522d87541c4024b8c84e95051 (patch)
treea149d469a4da72a7b6e6b777879b740046c4ebc9 /arch/arm/lib/findbit.S
parentc4d73e7d75a54451d6e073c118ba2b8d87bd350d (diff)
parentdf73af86b6e737f357aae85e0b5e621516117780 (diff)
downloadkernel_samsung_tuna-1ad2096c4eba144522d87541c4024b8c84e95051.zip
kernel_samsung_tuna-1ad2096c4eba144522d87541c4024b8c84e95051.tar.gz
kernel_samsung_tuna-1ad2096c4eba144522d87541c4024b8c84e95051.tar.bz2
Merge branch 'rmobile/mmcif' into rmobile-latest
Diffstat (limited to 'arch/arm/lib/findbit.S')
-rw-r--r--arch/arm/lib/findbit.S6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/lib/findbit.S b/arch/arm/lib/findbit.S
index 1e4cbd4..64f6bc1 100644
--- a/arch/arm/lib/findbit.S
+++ b/arch/arm/lib/findbit.S
@@ -174,8 +174,8 @@ ENDPROC(_find_next_bit_be)
*/
.L_found:
#if __LINUX_ARM_ARCH__ >= 5
- rsb r1, r3, #0
- and r3, r3, r1
+ rsb r0, r3, #0
+ and r3, r3, r0
clz r3, r3
rsb r3, r3, #31
add r0, r2, r3
@@ -190,5 +190,7 @@ ENDPROC(_find_next_bit_be)
addeq r2, r2, #1
mov r0, r2
#endif
+ cmp r1, r0 @ Clamp to maxbit
+ movlo r0, r1
mov pc, lr