diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-26 19:51:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-26 19:51:23 -0400 |
commit | f436ab43614f105a4685c976a85a171bc112c802 (patch) | |
tree | 21db536f54a642c627008c664e2679c0ff3ccbc3 /arch | |
parent | 6cd236e0057704d1f5c77908374079e021c83928 (diff) | |
parent | 0c07f6115b779ae4597749d47dec228c6d2d1c7c (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] 4449/1: more entries in arch/arm/boot/.gitignore
[ARM] 4452/1: Force the literal pool dump before reloc_end
[ARM] Update show_regs/oops register format
[ARM] Add support for pause_on_oops and display preempt/smp options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/boot/.gitignore | 3 | ||||
-rw-r--r-- | arch/arm/boot/compressed/head.S | 1 | ||||
-rw-r--r-- | arch/arm/kernel/process.c | 63 | ||||
-rw-r--r-- | arch/arm/kernel/traps.c | 20 |
4 files changed, 58 insertions, 29 deletions
diff --git a/arch/arm/boot/.gitignore b/arch/arm/boot/.gitignore index 171a0853caf8..ce1c5ff746e7 100644 --- a/arch/arm/boot/.gitignore +++ b/arch/arm/boot/.gitignore | |||
@@ -1,2 +1,5 @@ | |||
1 | Image | 1 | Image |
2 | zImage | 2 | zImage |
3 | xipImage | ||
4 | bootpImage | ||
5 | uImage | ||
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 23348e9561b9..680ea6ed77b8 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -836,6 +836,7 @@ memdump: mov r12, r0 | |||
836 | mov pc, r10 | 836 | mov pc, r10 |
837 | #endif | 837 | #endif |
838 | 838 | ||
839 | .ltorg | ||
839 | reloc_end: | 840 | reloc_end: |
840 | 841 | ||
841 | .align | 842 | .align |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 5d6e6523598b..842361777d4e 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/elfcore.h> | 28 | #include <linux/elfcore.h> |
29 | #include <linux/pm.h> | 29 | #include <linux/pm.h> |
30 | #include <linux/tick.h> | 30 | #include <linux/tick.h> |
31 | #include <linux/utsname.h> | ||
31 | 32 | ||
32 | #include <asm/leds.h> | 33 | #include <asm/leds.h> |
33 | #include <asm/processor.h> | 34 | #include <asm/processor.h> |
@@ -199,16 +200,19 @@ void machine_restart(char * __unused) | |||
199 | 200 | ||
200 | void __show_regs(struct pt_regs *regs) | 201 | void __show_regs(struct pt_regs *regs) |
201 | { | 202 | { |
202 | unsigned long flags = condition_codes(regs); | 203 | unsigned long flags; |
204 | char buf[64]; | ||
203 | 205 | ||
204 | printk("CPU: %d\n", smp_processor_id()); | 206 | printk("CPU: %d %s (%s %.*s)\n", |
207 | smp_processor_id(), print_tainted(), init_utsname()->release, | ||
208 | (int)strcspn(init_utsname()->version, " "), | ||
209 | init_utsname()->version); | ||
205 | print_symbol("PC is at %s\n", instruction_pointer(regs)); | 210 | print_symbol("PC is at %s\n", instruction_pointer(regs)); |
206 | print_symbol("LR is at %s\n", regs->ARM_lr); | 211 | print_symbol("LR is at %s\n", regs->ARM_lr); |
207 | printk("pc : [<%08lx>] lr : [<%08lx>] %s\n" | 212 | printk("pc : [<%08lx>] lr : [<%08lx>] psr: %08lx\n" |
208 | "sp : %08lx ip : %08lx fp : %08lx\n", | 213 | "sp : %08lx ip : %08lx fp : %08lx\n", |
209 | instruction_pointer(regs), | 214 | regs->ARM_pc, regs->ARM_lr, regs->ARM_cpsr, |
210 | regs->ARM_lr, print_tainted(), regs->ARM_sp, | 215 | regs->ARM_sp, regs->ARM_ip, regs->ARM_fp); |
211 | regs->ARM_ip, regs->ARM_fp); | ||
212 | printk("r10: %08lx r9 : %08lx r8 : %08lx\n", | 216 | printk("r10: %08lx r9 : %08lx r8 : %08lx\n", |
213 | regs->ARM_r10, regs->ARM_r9, | 217 | regs->ARM_r10, regs->ARM_r9, |
214 | regs->ARM_r8); | 218 | regs->ARM_r8); |
@@ -218,36 +222,39 @@ void __show_regs(struct pt_regs *regs) | |||
218 | printk("r3 : %08lx r2 : %08lx r1 : %08lx r0 : %08lx\n", | 222 | printk("r3 : %08lx r2 : %08lx r1 : %08lx r0 : %08lx\n", |
219 | regs->ARM_r3, regs->ARM_r2, | 223 | regs->ARM_r3, regs->ARM_r2, |
220 | regs->ARM_r1, regs->ARM_r0); | 224 | regs->ARM_r1, regs->ARM_r0); |
221 | printk("Flags: %c%c%c%c", | 225 | |
222 | flags & PSR_N_BIT ? 'N' : 'n', | 226 | flags = regs->ARM_cpsr; |
223 | flags & PSR_Z_BIT ? 'Z' : 'z', | 227 | buf[0] = flags & PSR_N_BIT ? 'N' : 'n'; |
224 | flags & PSR_C_BIT ? 'C' : 'c', | 228 | buf[1] = flags & PSR_Z_BIT ? 'Z' : 'z'; |
225 | flags & PSR_V_BIT ? 'V' : 'v'); | 229 | buf[2] = flags & PSR_C_BIT ? 'C' : 'c'; |
226 | printk(" IRQs o%s FIQs o%s Mode %s%s Segment %s\n", | 230 | buf[3] = flags & PSR_V_BIT ? 'V' : 'v'; |
227 | interrupts_enabled(regs) ? "n" : "ff", | 231 | buf[4] = '\0'; |
232 | |||
233 | printk("Flags: %s IRQs o%s FIQs o%s Mode %s%s Segment %s\n", | ||
234 | buf, interrupts_enabled(regs) ? "n" : "ff", | ||
228 | fast_interrupts_enabled(regs) ? "n" : "ff", | 235 | fast_interrupts_enabled(regs) ? "n" : "ff", |
229 | processor_modes[processor_mode(regs)], | 236 | processor_modes[processor_mode(regs)], |
230 | thumb_mode(regs) ? " (T)" : "", | 237 | thumb_mode(regs) ? " (T)" : "", |
231 | get_fs() == get_ds() ? "kernel" : "user"); | 238 | get_fs() == get_ds() ? "kernel" : "user"); |
232 | #if CONFIG_CPU_CP15 | 239 | #ifdef CONFIG_CPU_CP15 |
233 | { | 240 | { |
234 | unsigned int ctrl; | 241 | unsigned int ctrl; |
235 | __asm__ ( | 242 | |
236 | " mrc p15, 0, %0, c1, c0\n" | 243 | buf[0] = '\0'; |
237 | : "=r" (ctrl)); | ||
238 | printk("Control: %04X\n", ctrl); | ||
239 | } | ||
240 | #ifdef CONFIG_CPU_CP15_MMU | 244 | #ifdef CONFIG_CPU_CP15_MMU |
241 | { | 245 | { |
242 | unsigned int transbase, dac; | 246 | unsigned int transbase, dac; |
243 | __asm__ ( | 247 | asm("mrc p15, 0, %0, c2, c0\n\t" |
244 | " mrc p15, 0, %0, c2, c0\n" | 248 | "mrc p15, 0, %1, c3, c0\n" |
245 | " mrc p15, 0, %1, c3, c0\n" | 249 | : "=r" (transbase), "=r" (dac)); |
246 | : "=r" (transbase), "=r" (dac)); | 250 | snprintf(buf, sizeof(buf), " Table: %08x DAC: %08x", |
247 | printk("Table: %08X DAC: %08X\n", | 251 | transbase, dac); |
248 | transbase, dac); | 252 | } |
249 | } | ||
250 | #endif | 253 | #endif |
254 | asm("mrc p15, 0, %0, c1, c0\n" : "=r" (ctrl)); | ||
255 | |||
256 | printk("Control: %08x%s\n", ctrl, buf); | ||
257 | } | ||
251 | #endif | 258 | #endif |
252 | } | 259 | } |
253 | 260 | ||
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 10ff36e4e414..1b68d365d0e1 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -204,12 +204,24 @@ void show_stack(struct task_struct *tsk, unsigned long *sp) | |||
204 | barrier(); | 204 | barrier(); |
205 | } | 205 | } |
206 | 206 | ||
207 | #ifdef CONFIG_PREEMPT | ||
208 | #define S_PREEMPT " PREEMPT" | ||
209 | #else | ||
210 | #define S_PREEMPT "" | ||
211 | #endif | ||
212 | #ifdef CONFIG_SMP | ||
213 | #define S_SMP " SMP" | ||
214 | #else | ||
215 | #define S_SMP "" | ||
216 | #endif | ||
217 | |||
207 | static void __die(const char *str, int err, struct thread_info *thread, struct pt_regs *regs) | 218 | static void __die(const char *str, int err, struct thread_info *thread, struct pt_regs *regs) |
208 | { | 219 | { |
209 | struct task_struct *tsk = thread->task; | 220 | struct task_struct *tsk = thread->task; |
210 | static int die_counter; | 221 | static int die_counter; |
211 | 222 | ||
212 | printk("Internal error: %s: %x [#%d]\n", str, err, ++die_counter); | 223 | printk("Internal error: %s: %x [#%d]" S_PREEMPT S_SMP "\n", |
224 | str, err, ++die_counter); | ||
213 | print_modules(); | 225 | print_modules(); |
214 | __show_regs(regs); | 226 | __show_regs(regs); |
215 | printk("Process %s (pid: %d, stack limit = 0x%p)\n", | 227 | printk("Process %s (pid: %d, stack limit = 0x%p)\n", |
@@ -232,6 +244,8 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err) | |||
232 | { | 244 | { |
233 | struct thread_info *thread = current_thread_info(); | 245 | struct thread_info *thread = current_thread_info(); |
234 | 246 | ||
247 | oops_enter(); | ||
248 | |||
235 | console_verbose(); | 249 | console_verbose(); |
236 | spin_lock_irq(&die_lock); | 250 | spin_lock_irq(&die_lock); |
237 | bust_spinlocks(1); | 251 | bust_spinlocks(1); |
@@ -239,9 +253,13 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err) | |||
239 | bust_spinlocks(0); | 253 | bust_spinlocks(0); |
240 | spin_unlock_irq(&die_lock); | 254 | spin_unlock_irq(&die_lock); |
241 | 255 | ||
256 | if (in_interrupt()) | ||
257 | panic("Fatal exception in interrupt"); | ||
258 | |||
242 | if (panic_on_oops) | 259 | if (panic_on_oops) |
243 | panic("Fatal exception"); | 260 | panic("Fatal exception"); |
244 | 261 | ||
262 | oops_exit(); | ||
245 | do_exit(SIGSEGV); | 263 | do_exit(SIGSEGV); |
246 | } | 264 | } |
247 | 265 | ||