diff options
Diffstat (limited to 'arch/arm/lib')
-rw-r--r-- | arch/arm/lib/backtrace.S | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/arm/lib/backtrace.S b/arch/arm/lib/backtrace.S index cd07b5814c23..4102be617fce 100644 --- a/arch/arm/lib/backtrace.S +++ b/arch/arm/lib/backtrace.S | |||
@@ -80,14 +80,14 @@ for_each_frame: tst frame, mask @ Check for address exceptions | |||
80 | 80 | ||
81 | ldr r1, [sv_pc, #-4] @ if stmfd sp!, {args} exists, | 81 | ldr r1, [sv_pc, #-4] @ if stmfd sp!, {args} exists, |
82 | ldr r3, .Ldsi+4 | 82 | ldr r3, .Ldsi+4 |
83 | teq r3, r1, lsr #10 | 83 | teq r3, r1, lsr #11 |
84 | ldreq r0, [frame, #-8] @ get sp | 84 | ldreq r0, [frame, #-8] @ get sp |
85 | subeq r0, r0, #4 @ point at the last arg | 85 | subeq r0, r0, #4 @ point at the last arg |
86 | bleq .Ldumpstm @ dump saved registers | 86 | bleq .Ldumpstm @ dump saved registers |
87 | 87 | ||
88 | 1004: ldr r1, [sv_pc, #0] @ if stmfd sp!, {..., fp, ip, lr, pc} | 88 | 1004: ldr r1, [sv_pc, #0] @ if stmfd sp!, {..., fp, ip, lr, pc} |
89 | ldr r3, .Ldsi @ instruction exists, | 89 | ldr r3, .Ldsi @ instruction exists, |
90 | teq r3, r1, lsr #10 | 90 | teq r3, r1, lsr #11 |
91 | subeq r0, frame, #16 | 91 | subeq r0, frame, #16 |
92 | bleq .Ldumpstm @ dump saved registers | 92 | bleq .Ldumpstm @ dump saved registers |
93 | 93 | ||
@@ -128,11 +128,11 @@ ENDPROC(c_backtrace) | |||
128 | beq 2f | 128 | beq 2f |
129 | add r7, r7, #1 | 129 | add r7, r7, #1 |
130 | teq r7, #6 | 130 | teq r7, #6 |
131 | moveq r7, #1 | 131 | moveq r7, #0 |
132 | moveq r1, #'\n' | 132 | adr r3, .Lcr |
133 | movne r1, #' ' | 133 | addne r3, r3, #1 @ skip newline |
134 | ldr r3, [stack], #-4 | 134 | ldr r2, [stack], #-4 |
135 | mov r2, reg | 135 | mov r1, reg |
136 | adr r0, .Lfp | 136 | adr r0, .Lfp |
137 | bl printk | 137 | bl printk |
138 | 2: subs reg, reg, #1 | 138 | 2: subs reg, reg, #1 |
@@ -142,11 +142,11 @@ ENDPROC(c_backtrace) | |||
142 | blne printk | 142 | blne printk |
143 | ldmfd sp!, {instr, reg, stack, r7, pc} | 143 | ldmfd sp!, {instr, reg, stack, r7, pc} |
144 | 144 | ||
145 | .Lfp: .asciz "%cr%d:%08x" | 145 | .Lfp: .asciz " r%d:%08x%s" |
146 | .Lcr: .asciz "\n" | 146 | .Lcr: .asciz "\n" |
147 | .Lbad: .asciz "Backtrace aborted due to bad frame pointer <%p>\n" | 147 | .Lbad: .asciz "Backtrace aborted due to bad frame pointer <%p>\n" |
148 | .align | 148 | .align |
149 | .Ldsi: .word 0xe92dd800 >> 10 @ stmfd sp!, {... fp, ip, lr, pc} | 149 | .Ldsi: .word 0xe92dd800 >> 11 @ stmfd sp!, {... fp, ip, lr, pc} |
150 | .word 0xe92d0000 >> 10 @ stmfd sp!, {} | 150 | .word 0xe92d0000 >> 11 @ stmfd sp!, {} |
151 | 151 | ||
152 | #endif | 152 | #endif |