summaryrefslogtreecommitdiff
path: root/arch/arm/lib
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2022-08-11 17:03:29 +0100
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2022-11-14 12:00:58 +0000
commitf424f2c18432f8a2c35ebafb23dd004148bce149 (patch)
tree690c489176eb1098364be3111baf877add808c17 /arch/arm/lib
parent2511d032f02e6426b0bd87d225b4b322a7154d15 (diff)
ARM: findbit: add unwinder information
Add unwinder information so oops in the findbit functions can create a proper backtrace. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm/lib')
-rw-r--r--arch/arm/lib/findbit.S8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/lib/findbit.S b/arch/arm/lib/findbit.S
index 6ec584d16d46..b7ac2d3c0748 100644
--- a/arch/arm/lib/findbit.S
+++ b/arch/arm/lib/findbit.S
@@ -12,6 +12,7 @@
*/
#include <linux/linkage.h>
#include <asm/assembler.h>
+#include <asm/unwind.h>
.text
#ifdef __ARMEB__
@@ -22,6 +23,7 @@
.macro find_first, endian, set, name
ENTRY(_find_first_\name\()bit_\endian)
+ UNWIND( .fnstart)
teq r1, #0
beq 3f
mov r2, #0
@@ -41,11 +43,13 @@ ENTRY(_find_first_\name\()bit_\endian)
blo 1b
3: mov r0, r1 @ no more bits
ret lr
+ UNWIND( .fnend)
ENDPROC(_find_first_\name\()bit_\endian)
.endm
.macro find_next, endian, set, name
ENTRY(_find_next_\name\()bit_\endian)
+ UNWIND( .fnstart)
cmp r2, r1
bhs 3b
mov ip, r2, lsr #5 @ word index
@@ -69,6 +73,7 @@ ENTRY(_find_next_\name\()bit_\endian)
orr r2, r2, #31 @ no zero bits
add r2, r2, #1 @ align bit pointer
b 2b @ loop for next bit
+ UNWIND( .fnend)
ENDPROC(_find_next_\name\()bit_\endian)
.endm
@@ -97,6 +102,7 @@ ENDPROC(_find_next_\name\()bit_\endian)
* One or more bits in the LSB of r3 are assumed to be set.
*/
.L_found_swab:
+ UNWIND( .fnstart)
rev_l r3, ip
.L_found:
#if __LINUX_ARM_ARCH__ >= 7
@@ -130,4 +136,4 @@ ENDPROC(_find_next_\name\()bit_\endian)
cmp r1, r0 @ Clamp to maxbit
movlo r0, r1
ret lr
-
+ UNWIND( .fnend)