Commit f436ab43 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 6cd236e0 0c07f611
Image Image
zImage zImage
xipImage
bootpImage
uImage
...@@ -836,6 +836,7 @@ memdump: mov r12, r0 ...@@ -836,6 +836,7 @@ memdump: mov r12, r0
mov pc, r10 mov pc, r10
#endif #endif
.ltorg
reloc_end: reloc_end:
.align .align
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <linux/elfcore.h> #include <linux/elfcore.h>
#include <linux/pm.h> #include <linux/pm.h>
#include <linux/tick.h> #include <linux/tick.h>
#include <linux/utsname.h>
#include <asm/leds.h> #include <asm/leds.h>
#include <asm/processor.h> #include <asm/processor.h>
...@@ -199,16 +200,19 @@ void machine_restart(char * __unused) ...@@ -199,16 +200,19 @@ void machine_restart(char * __unused)
void __show_regs(struct pt_regs *regs) void __show_regs(struct pt_regs *regs)
{ {
unsigned long flags = condition_codes(regs); unsigned long flags;
char buf[64];
printk("CPU: %d\n", smp_processor_id()); printk("CPU: %d %s (%s %.*s)\n",
smp_processor_id(), print_tainted(), init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
init_utsname()->version);
print_symbol("PC is at %s\n", instruction_pointer(regs)); print_symbol("PC is at %s\n", instruction_pointer(regs));
print_symbol("LR is at %s\n", regs->ARM_lr); print_symbol("LR is at %s\n", regs->ARM_lr);
printk("pc : [<%08lx>] lr : [<%08lx>] %s\n" printk("pc : [<%08lx>] lr : [<%08lx>] psr: %08lx\n"
"sp : %08lx ip : %08lx fp : %08lx\n", "sp : %08lx ip : %08lx fp : %08lx\n",
instruction_pointer(regs), regs->ARM_pc, regs->ARM_lr, regs->ARM_cpsr,
regs->ARM_lr, print_tainted(), regs->ARM_sp, regs->ARM_sp, regs->ARM_ip, regs->ARM_fp);
regs->ARM_ip, regs->ARM_fp);
printk("r10: %08lx r9 : %08lx r8 : %08lx\n", printk("r10: %08lx r9 : %08lx r8 : %08lx\n",
regs->ARM_r10, regs->ARM_r9, regs->ARM_r10, regs->ARM_r9,
regs->ARM_r8); regs->ARM_r8);
...@@ -218,36 +222,39 @@ void __show_regs(struct pt_regs *regs) ...@@ -218,36 +222,39 @@ void __show_regs(struct pt_regs *regs)
printk("r3 : %08lx r2 : %08lx r1 : %08lx r0 : %08lx\n", printk("r3 : %08lx r2 : %08lx r1 : %08lx r0 : %08lx\n",
regs->ARM_r3, regs->ARM_r2, regs->ARM_r3, regs->ARM_r2,
regs->ARM_r1, regs->ARM_r0); regs->ARM_r1, regs->ARM_r0);
printk("Flags: %c%c%c%c",
flags & PSR_N_BIT ? 'N' : 'n', flags = regs->ARM_cpsr;
flags & PSR_Z_BIT ? 'Z' : 'z', buf[0] = flags & PSR_N_BIT ? 'N' : 'n';
flags & PSR_C_BIT ? 'C' : 'c', buf[1] = flags & PSR_Z_BIT ? 'Z' : 'z';
flags & PSR_V_BIT ? 'V' : 'v'); buf[2] = flags & PSR_C_BIT ? 'C' : 'c';
printk(" IRQs o%s FIQs o%s Mode %s%s Segment %s\n", buf[3] = flags & PSR_V_BIT ? 'V' : 'v';
interrupts_enabled(regs) ? "n" : "ff", buf[4] = '\0';
printk("Flags: %s IRQs o%s FIQs o%s Mode %s%s Segment %s\n",
buf, interrupts_enabled(regs) ? "n" : "ff",
fast_interrupts_enabled(regs) ? "n" : "ff", fast_interrupts_enabled(regs) ? "n" : "ff",
processor_modes[processor_mode(regs)], processor_modes[processor_mode(regs)],
thumb_mode(regs) ? " (T)" : "", thumb_mode(regs) ? " (T)" : "",
get_fs() == get_ds() ? "kernel" : "user"); get_fs() == get_ds() ? "kernel" : "user");
#if CONFIG_CPU_CP15 #ifdef CONFIG_CPU_CP15
{ {
unsigned int ctrl; unsigned int ctrl;
__asm__ (
" mrc p15, 0, %0, c1, c0\n" buf[0] = '\0';
: "=r" (ctrl));
printk("Control: %04X\n", ctrl);
}
#ifdef CONFIG_CPU_CP15_MMU #ifdef CONFIG_CPU_CP15_MMU
{ {
unsigned int transbase, dac; unsigned int transbase, dac;
__asm__ ( asm("mrc p15, 0, %0, c2, c0\n\t"
" mrc p15, 0, %0, c2, c0\n" "mrc p15, 0, %1, c3, c0\n"
" mrc p15, 0, %1, c3, c0\n" : "=r" (transbase), "=r" (dac));
: "=r" (transbase), "=r" (dac)); snprintf(buf, sizeof(buf), " Table: %08x DAC: %08x",
printk("Table: %08X DAC: %08X\n", transbase, dac);
transbase, dac); }
}
#endif #endif
asm("mrc p15, 0, %0, c1, c0\n" : "=r" (ctrl));
printk("Control: %08x%s\n", ctrl, buf);
}
#endif #endif
} }
......
...@@ -204,12 +204,24 @@ void show_stack(struct task_struct *tsk, unsigned long *sp) ...@@ -204,12 +204,24 @@ void show_stack(struct task_struct *tsk, unsigned long *sp)
barrier(); barrier();
} }
#ifdef CONFIG_PREEMPT
#define S_PREEMPT " PREEMPT"
#else
#define S_PREEMPT ""
#endif
#ifdef CONFIG_SMP
#define S_SMP " SMP"
#else
#define S_SMP ""
#endif
static void __die(const char *str, int err, struct thread_info *thread, struct pt_regs *regs) static void __die(const char *str, int err, struct thread_info *thread, struct pt_regs *regs)
{ {
struct task_struct *tsk = thread->task; struct task_struct *tsk = thread->task;
static int die_counter; static int die_counter;
printk("Internal error: %s: %x [#%d]\n", str, err, ++die_counter); printk("Internal error: %s: %x [#%d]" S_PREEMPT S_SMP "\n",
str, err, ++die_counter);
print_modules(); print_modules();
__show_regs(regs); __show_regs(regs);
printk("Process %s (pid: %d, stack limit = 0x%p)\n", 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,6 +244,8 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
{ {
struct thread_info *thread = current_thread_info(); struct thread_info *thread = current_thread_info();
oops_enter();
console_verbose(); console_verbose();
spin_lock_irq(&die_lock); spin_lock_irq(&die_lock);
bust_spinlocks(1); bust_spinlocks(1);
...@@ -239,9 +253,13 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err) ...@@ -239,9 +253,13 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
bust_spinlocks(0); bust_spinlocks(0);
spin_unlock_irq(&die_lock); spin_unlock_irq(&die_lock);
if (in_interrupt())
panic("Fatal exception in interrupt");
if (panic_on_oops) if (panic_on_oops)
panic("Fatal exception"); panic("Fatal exception");
oops_exit();
do_exit(SIGSEGV); do_exit(SIGSEGV);
} }
......
...@@ -112,9 +112,6 @@ struct pt_regs { ...@@ -112,9 +112,6 @@ struct pt_regs {
#define fast_interrupts_enabled(regs) \ #define fast_interrupts_enabled(regs) \
(!((regs)->ARM_cpsr & PSR_F_BIT)) (!((regs)->ARM_cpsr & PSR_F_BIT))
#define condition_codes(regs) \
((regs)->ARM_cpsr & (PSR_V_BIT|PSR_C_BIT|PSR_Z_BIT|PSR_N_BIT))
/* Are the current registers suitable for user mode? /* Are the current registers suitable for user mode?
* (used to maintain security in signal handlers) * (used to maintain security in signal handlers)
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment