diff options
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/head-nommu.S | 7 | ||||
-rw-r--r-- | arch/arm/kernel/process.c | 22 |
2 files changed, 22 insertions, 7 deletions
diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S index ac9eb3d30518..698a537915dd 100644 --- a/arch/arm/kernel/head-nommu.S +++ b/arch/arm/kernel/head-nommu.S | |||
@@ -9,7 +9,6 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | * | 10 | * |
11 | * Common kernel startup code (non-paged MM) | 11 | * Common kernel startup code (non-paged MM) |
12 | * for 32-bit CPUs which has a process ID register(CP15). | ||
13 | * | 12 | * |
14 | */ | 13 | */ |
15 | #include <linux/linkage.h> | 14 | #include <linux/linkage.h> |
@@ -40,7 +39,11 @@ | |||
40 | ENTRY(stext) | 39 | ENTRY(stext) |
41 | msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode | 40 | msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode |
42 | @ and irqs disabled | 41 | @ and irqs disabled |
42 | #ifndef CONFIG_CPU_CP15 | ||
43 | ldr r9, =CONFIG_PROCESSOR_ID | ||
44 | #else | ||
43 | mrc p15, 0, r9, c0, c0 @ get processor id | 45 | mrc p15, 0, r9, c0, c0 @ get processor id |
46 | #endif | ||
44 | bl __lookup_processor_type @ r5=procinfo r9=cpuid | 47 | bl __lookup_processor_type @ r5=procinfo r9=cpuid |
45 | movs r10, r5 @ invalid processor (r5=0)? | 48 | movs r10, r5 @ invalid processor (r5=0)? |
46 | beq __error_p @ yes, error 'p' | 49 | beq __error_p @ yes, error 'p' |
@@ -58,6 +61,7 @@ ENTRY(stext) | |||
58 | */ | 61 | */ |
59 | .type __after_proc_init, %function | 62 | .type __after_proc_init, %function |
60 | __after_proc_init: | 63 | __after_proc_init: |
64 | #ifdef CONFIG_CPU_CP15 | ||
61 | mrc p15, 0, r0, c1, c0, 0 @ read control reg | 65 | mrc p15, 0, r0, c1, c0, 0 @ read control reg |
62 | #ifdef CONFIG_ALIGNMENT_TRAP | 66 | #ifdef CONFIG_ALIGNMENT_TRAP |
63 | orr r0, r0, #CR_A | 67 | orr r0, r0, #CR_A |
@@ -74,6 +78,7 @@ __after_proc_init: | |||
74 | bic r0, r0, #CR_I | 78 | bic r0, r0, #CR_I |
75 | #endif | 79 | #endif |
76 | mcr p15, 0, r0, c1, c0, 0 @ write control reg | 80 | mcr p15, 0, r0, c1, c0, 0 @ write control reg |
81 | #endif /* CONFIG_CPU_CP15 */ | ||
77 | 82 | ||
78 | mov pc, r13 @ clear the BSS and jump | 83 | mov pc, r13 @ clear the BSS and jump |
79 | @ to start_kernel | 84 | @ to start_kernel |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 3079535afccd..bf35c178a877 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -221,16 +221,26 @@ void __show_regs(struct pt_regs *regs) | |||
221 | processor_modes[processor_mode(regs)], | 221 | processor_modes[processor_mode(regs)], |
222 | thumb_mode(regs) ? " (T)" : "", | 222 | thumb_mode(regs) ? " (T)" : "", |
223 | get_fs() == get_ds() ? "kernel" : "user"); | 223 | get_fs() == get_ds() ? "kernel" : "user"); |
224 | #if CONFIG_CPU_CP15 | ||
224 | { | 225 | { |
225 | unsigned int ctrl, transbase, dac; | 226 | unsigned int ctrl; |
226 | __asm__ ( | 227 | __asm__ ( |
227 | " mrc p15, 0, %0, c1, c0\n" | 228 | " mrc p15, 0, %0, c1, c0\n" |
228 | " mrc p15, 0, %1, c2, c0\n" | 229 | : "=r" (ctrl)); |
229 | " mrc p15, 0, %2, c3, c0\n" | 230 | printk("Control: %04X\n", ctrl); |
230 | : "=r" (ctrl), "=r" (transbase), "=r" (dac)); | ||
231 | printk("Control: %04X Table: %08X DAC: %08X\n", | ||
232 | ctrl, transbase, dac); | ||
233 | } | 231 | } |
232 | #ifdef CONFIG_CPU_CP15_MMU | ||
233 | { | ||
234 | unsigned int transbase, dac; | ||
235 | __asm__ ( | ||
236 | " mrc p15, 0, %0, c2, c0\n" | ||
237 | " mrc p15, 0, %1, c3, c0\n" | ||
238 | : "=r" (transbase), "=r" (dac)); | ||
239 | printk("Table: %08X DAC: %08X\n", | ||
240 | transbase, dac); | ||
241 | } | ||
242 | #endif | ||
243 | #endif | ||
234 | } | 244 | } |
235 | 245 | ||
236 | void show_regs(struct pt_regs * regs) | 246 | void show_regs(struct pt_regs * regs) |