ARM: Fix broken commit 0cc41e4a21
corrupting kernel messages
Commit 0cc41e4a21
(arch: remove direct definitions of KERN_<LEVEL>
uses) is broken - not enough thought was put into changing:
.asciz "string"
to
.asciz "string1" "string2"
The problem is that each string gets _separately_ NUL terminated, so
the result is a string containing:
"string1\0string2\0"
rather than:
"string1string2\0"
With our new printk levels, this ends up as - eg, KERN_DEBUG "string":
0x01 0x00 0x07 0x00 "string" 0x00
which produces lots of \x01 in the kernel log.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
b255188f90
commit
ded3ef0fa7
1 changed files with 21 additions and 15 deletions
|
@ -22,12 +22,14 @@
|
||||||
.macro DBGSTR, str
|
.macro DBGSTR, str
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
stmfd sp!, {r0-r3, ip, lr}
|
stmfd sp!, {r0-r3, ip, lr}
|
||||||
add r0, pc, #4
|
ldr r0, =1f
|
||||||
bl printk
|
bl printk
|
||||||
b 1f
|
ldmfd sp!, {r0-r3, ip, lr}
|
||||||
.asciz KERN_DEBUG "VFP: \str\n"
|
|
||||||
.balign 4
|
.pushsection .rodata, "a"
|
||||||
1: ldmfd sp!, {r0-r3, ip, lr}
|
1: .ascii KERN_DEBUG "VFP: \str\n"
|
||||||
|
.byte 0
|
||||||
|
.previous
|
||||||
#endif
|
#endif
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -35,12 +37,14 @@
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
stmfd sp!, {r0-r3, ip, lr}
|
stmfd sp!, {r0-r3, ip, lr}
|
||||||
mov r1, \arg
|
mov r1, \arg
|
||||||
add r0, pc, #4
|
ldr r0, =1f
|
||||||
bl printk
|
bl printk
|
||||||
b 1f
|
ldmfd sp!, {r0-r3, ip, lr}
|
||||||
.asciz KERN_DEBUG "VFP: \str\n"
|
|
||||||
.balign 4
|
.pushsection .rodata, "a"
|
||||||
1: ldmfd sp!, {r0-r3, ip, lr}
|
1: .ascii KERN_DEBUG "VFP: \str\n"
|
||||||
|
.byte 0
|
||||||
|
.previous
|
||||||
#endif
|
#endif
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -50,12 +54,14 @@
|
||||||
mov r3, \arg3
|
mov r3, \arg3
|
||||||
mov r2, \arg2
|
mov r2, \arg2
|
||||||
mov r1, \arg1
|
mov r1, \arg1
|
||||||
add r0, pc, #4
|
ldr r0, =1f
|
||||||
bl printk
|
bl printk
|
||||||
b 1f
|
ldmfd sp!, {r0-r3, ip, lr}
|
||||||
.asciz KERN_DEBUG "VFP: \str\n"
|
|
||||||
.balign 4
|
.pushsection .rodata, "a"
|
||||||
1: ldmfd sp!, {r0-r3, ip, lr}
|
1: .ascii KERN_DEBUG "VFP: \str\n"
|
||||||
|
.byte 0
|
||||||
|
.previous
|
||||||
#endif
|
#endif
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue