Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King: "A few more ARM fixes: - the assembly backtrace code suffers problems with the new printk() implementation which assumes that kernel messages without KERN_CONT should have newlines inserted between them. Fix this. - fix a section naming error - ".init.text" rather than ".text.init" - preallocate DMA debug memory at core_initcall() time rather than fs_initcall(), as we have some core drivers that need to use DMA mapping - and that triggers a kernel warning from the DMA debug code. - fix XIP kernels after the ro_after_init changes made this data permanently read-only" * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: Fix XIP kernels ARM: 8628/1: dma-mapping: preallocate DMA-debug hash tables in core_initcall ARM: 8624/1: proc-v7m.S: fix init section name ARM: fix backtrace
This commit is contained in:
commit
697ed8d039
|
@ -74,6 +74,26 @@ void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long
|
||||||
dump_mem("", "Exception stack", frame + 4, frame + 4 + sizeof(struct pt_regs));
|
dump_mem("", "Exception stack", frame + 4, frame + 4 + sizeof(struct pt_regs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void dump_backtrace_stm(u32 *stack, u32 instruction)
|
||||||
|
{
|
||||||
|
char str[80], *p;
|
||||||
|
unsigned int x;
|
||||||
|
int reg;
|
||||||
|
|
||||||
|
for (reg = 10, x = 0, p = str; reg >= 0; reg--) {
|
||||||
|
if (instruction & BIT(reg)) {
|
||||||
|
p += sprintf(p, " r%d:%08x", reg, *stack--);
|
||||||
|
if (++x == 6) {
|
||||||
|
x = 0;
|
||||||
|
p = str;
|
||||||
|
printk("%s\n", str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (p != str)
|
||||||
|
printk("%s\n", str);
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_ARM_UNWIND
|
#ifndef CONFIG_ARM_UNWIND
|
||||||
/*
|
/*
|
||||||
* Stack pointers should always be within the kernels view of
|
* Stack pointers should always be within the kernels view of
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
* Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
|
* Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* No __ro_after_init data in the .rodata section - which will always be ro */
|
||||||
|
#define RO_AFTER_INIT_DATA
|
||||||
|
|
||||||
#include <asm-generic/vmlinux.lds.h>
|
#include <asm-generic/vmlinux.lds.h>
|
||||||
#include <asm/cache.h>
|
#include <asm/cache.h>
|
||||||
#include <asm/thread_info.h>
|
#include <asm/thread_info.h>
|
||||||
|
@ -223,6 +226,8 @@ SECTIONS
|
||||||
. = ALIGN(PAGE_SIZE);
|
. = ALIGN(PAGE_SIZE);
|
||||||
__init_end = .;
|
__init_end = .;
|
||||||
|
|
||||||
|
*(.data..ro_after_init)
|
||||||
|
|
||||||
NOSAVE_DATA
|
NOSAVE_DATA
|
||||||
CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
|
CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
|
||||||
READ_MOSTLY_DATA(L1_CACHE_BYTES)
|
READ_MOSTLY_DATA(L1_CACHE_BYTES)
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
* 27/03/03 Ian Molton Clean up CONFIG_CPU
|
* 27/03/03 Ian Molton Clean up CONFIG_CPU
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#include <linux/kern_levels.h>
|
||||||
#include <linux/linkage.h>
|
#include <linux/linkage.h>
|
||||||
#include <asm/assembler.h>
|
#include <asm/assembler.h>
|
||||||
.text
|
.text
|
||||||
|
@ -83,13 +84,13 @@ for_each_frame: tst frame, mask @ Check for address exceptions
|
||||||
teq r3, r1, lsr #11
|
teq r3, r1, lsr #11
|
||||||
ldreq r0, [frame, #-8] @ get sp
|
ldreq r0, [frame, #-8] @ get sp
|
||||||
subeq r0, r0, #4 @ point at the last arg
|
subeq r0, r0, #4 @ point at the last arg
|
||||||
bleq .Ldumpstm @ dump saved registers
|
bleq dump_backtrace_stm @ dump saved registers
|
||||||
|
|
||||||
1004: ldr r1, [sv_pc, #0] @ if stmfd sp!, {..., fp, ip, lr, pc}
|
1004: ldr r1, [sv_pc, #0] @ if stmfd sp!, {..., fp, ip, lr, pc}
|
||||||
ldr r3, .Ldsi @ instruction exists,
|
ldr r3, .Ldsi @ instruction exists,
|
||||||
teq r3, r1, lsr #11
|
teq r3, r1, lsr #11
|
||||||
subeq r0, frame, #16
|
subeq r0, frame, #16
|
||||||
bleq .Ldumpstm @ dump saved registers
|
bleq dump_backtrace_stm @ dump saved registers
|
||||||
|
|
||||||
teq sv_fp, #0 @ zero saved fp means
|
teq sv_fp, #0 @ zero saved fp means
|
||||||
beq no_frame @ no further frames
|
beq no_frame @ no further frames
|
||||||
|
@ -112,38 +113,6 @@ ENDPROC(c_backtrace)
|
||||||
.long 1004b, 1006b
|
.long 1004b, 1006b
|
||||||
.popsection
|
.popsection
|
||||||
|
|
||||||
#define instr r4
|
|
||||||
#define reg r5
|
|
||||||
#define stack r6
|
|
||||||
|
|
||||||
.Ldumpstm: stmfd sp!, {instr, reg, stack, r7, lr}
|
|
||||||
mov stack, r0
|
|
||||||
mov instr, r1
|
|
||||||
mov reg, #10
|
|
||||||
mov r7, #0
|
|
||||||
1: mov r3, #1
|
|
||||||
ARM( tst instr, r3, lsl reg )
|
|
||||||
THUMB( lsl r3, reg )
|
|
||||||
THUMB( tst instr, r3 )
|
|
||||||
beq 2f
|
|
||||||
add r7, r7, #1
|
|
||||||
teq r7, #6
|
|
||||||
moveq r7, #0
|
|
||||||
adr r3, .Lcr
|
|
||||||
addne r3, r3, #1 @ skip newline
|
|
||||||
ldr r2, [stack], #-4
|
|
||||||
mov r1, reg
|
|
||||||
adr r0, .Lfp
|
|
||||||
bl printk
|
|
||||||
2: subs reg, reg, #1
|
|
||||||
bpl 1b
|
|
||||||
teq r7, #0
|
|
||||||
adrne r0, .Lcr
|
|
||||||
blne printk
|
|
||||||
ldmfd sp!, {instr, reg, stack, r7, pc}
|
|
||||||
|
|
||||||
.Lfp: .asciz " r%d:%08x%s"
|
|
||||||
.Lcr: .asciz "\n"
|
|
||||||
.Lbad: .asciz "Backtrace aborted due to bad frame pointer <%p>\n"
|
.Lbad: .asciz "Backtrace aborted due to bad frame pointer <%p>\n"
|
||||||
.align
|
.align
|
||||||
.Ldsi: .word 0xe92dd800 >> 11 @ stmfd sp!, {... fp, ip, lr, pc}
|
.Ldsi: .word 0xe92dd800 >> 11 @ stmfd sp!, {... fp, ip, lr, pc}
|
||||||
|
|
|
@ -1167,7 +1167,7 @@ static int __init dma_debug_do_init(void)
|
||||||
dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES);
|
dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
fs_initcall(dma_debug_do_init);
|
core_initcall(dma_debug_do_init);
|
||||||
|
|
||||||
#ifdef CONFIG_ARM_DMA_USE_IOMMU
|
#ifdef CONFIG_ARM_DMA_USE_IOMMU
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ ENTRY(cpu_cm7_proc_fin)
|
||||||
ret lr
|
ret lr
|
||||||
ENDPROC(cpu_cm7_proc_fin)
|
ENDPROC(cpu_cm7_proc_fin)
|
||||||
|
|
||||||
.section ".text.init", #alloc, #execinstr
|
.section ".init.text", #alloc, #execinstr
|
||||||
|
|
||||||
__v7m_cm7_setup:
|
__v7m_cm7_setup:
|
||||||
mov r8, #(V7M_SCB_CCR_DC | V7M_SCB_CCR_IC| V7M_SCB_CCR_BP)
|
mov r8, #(V7M_SCB_CCR_DC | V7M_SCB_CCR_IC| V7M_SCB_CCR_BP)
|
||||||
|
|
Loading…
Reference in New Issue