Commit f424f2c1 authored by Russell King (Oracle)'s avatar Russell King (Oracle)

ARM: findbit: add unwinder information

Add unwinder information so oops in the findbit functions can create a
proper backtrace.
Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
parent 2511d032
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
*/ */
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/assembler.h> #include <asm/assembler.h>
#include <asm/unwind.h>
.text .text
#ifdef __ARMEB__ #ifdef __ARMEB__
...@@ -22,6 +23,7 @@ ...@@ -22,6 +23,7 @@
.macro find_first, endian, set, name .macro find_first, endian, set, name
ENTRY(_find_first_\name\()bit_\endian) ENTRY(_find_first_\name\()bit_\endian)
UNWIND( .fnstart)
teq r1, #0 teq r1, #0
beq 3f beq 3f
mov r2, #0 mov r2, #0
...@@ -41,11 +43,13 @@ ENTRY(_find_first_\name\()bit_\endian) ...@@ -41,11 +43,13 @@ ENTRY(_find_first_\name\()bit_\endian)
blo 1b blo 1b
3: mov r0, r1 @ no more bits 3: mov r0, r1 @ no more bits
ret lr ret lr
UNWIND( .fnend)
ENDPROC(_find_first_\name\()bit_\endian) ENDPROC(_find_first_\name\()bit_\endian)
.endm .endm
.macro find_next, endian, set, name .macro find_next, endian, set, name
ENTRY(_find_next_\name\()bit_\endian) ENTRY(_find_next_\name\()bit_\endian)
UNWIND( .fnstart)
cmp r2, r1 cmp r2, r1
bhs 3b bhs 3b
mov ip, r2, lsr #5 @ word index mov ip, r2, lsr #5 @ word index
...@@ -69,6 +73,7 @@ ENTRY(_find_next_\name\()bit_\endian) ...@@ -69,6 +73,7 @@ ENTRY(_find_next_\name\()bit_\endian)
orr r2, r2, #31 @ no zero bits orr r2, r2, #31 @ no zero bits
add r2, r2, #1 @ align bit pointer add r2, r2, #1 @ align bit pointer
b 2b @ loop for next bit b 2b @ loop for next bit
UNWIND( .fnend)
ENDPROC(_find_next_\name\()bit_\endian) ENDPROC(_find_next_\name\()bit_\endian)
.endm .endm
...@@ -97,6 +102,7 @@ ENDPROC(_find_next_\name\()bit_\endian) ...@@ -97,6 +102,7 @@ ENDPROC(_find_next_\name\()bit_\endian)
* One or more bits in the LSB of r3 are assumed to be set. * One or more bits in the LSB of r3 are assumed to be set.
*/ */
.L_found_swab: .L_found_swab:
UNWIND( .fnstart)
rev_l r3, ip rev_l r3, ip
.L_found: .L_found:
#if __LINUX_ARM_ARCH__ >= 7 #if __LINUX_ARM_ARCH__ >= 7
...@@ -130,4 +136,4 @@ ENDPROC(_find_next_\name\()bit_\endian) ...@@ -130,4 +136,4 @@ ENDPROC(_find_next_\name\()bit_\endian)
cmp r1, r0 @ Clamp to maxbit cmp r1, r0 @ Clamp to maxbit
movlo r0, r1 movlo r0, r1
ret lr ret lr
UNWIND( .fnend)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment