aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/lib
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2013-10-20 10:34:10 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-12-29 07:32:30 -0500
commitef41b5c924984b34d9c2830185295b2a9ae78e13 (patch)
treecfe11581fe72e538435c3a6a88e38c18d6b69a28 /arch/arm/lib
parent92341c83a904a23f9af52598cd97a8438b99eb00 (diff)
ARM: make kernel oops easier to read
We don't need the offset for the first function name in each backtrace entry; this needlessly consumes screen space. This is virtually always the first or second instruction in the called function. Also, recognise stmfd instructions which include r10 as a valid stack saving instruction, and when dumping the registers, dump six registers per line rather than five, and fix the wrapping. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/lib')
-rw-r--r--arch/arm/lib/backtrace.S20
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
881004: ldr r1, [sv_pc, #0] @ if stmfd sp!, {..., fp, ip, lr, pc} 881004: 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
1382: subs reg, reg, #1 1382: 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