summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-04-17 15:50:36 +0100
committerRussell King <rmk@dyn-67.arm.linux.org.uk>2005-04-17 15:50:36 +0100
commit652a12ef98d16ccd1ee5cdf2c832ce5411ed3262 (patch)
treefb4202396bed56574c68f5b516eeb85846e88c6a /arch
parent58c02ec4701c94c671a41e1e5d50c582e859851f (diff)
downloadblackbird-op-linux-652a12ef98d16ccd1ee5cdf2c832ce5411ed3262.tar.gz
blackbird-op-linux-652a12ef98d16ccd1ee5cdf2c832ce5411ed3262.zip
[PATCH] ARM: showregs
Fix show_regs() to provide a backtrace. Provide a new __show_regs() function which implements the common subset of show_regs() and die(). Add prototypes to asm-arm/system.h Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/process.c15
-rw-r--r--arch/arm/kernel/traps.c8
2 files changed, 13 insertions, 10 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index dbd8ca89b385..26eacd3e5def 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -168,12 +168,11 @@ void machine_restart(char * __unused)
EXPORT_SYMBOL(machine_restart);
-void show_regs(struct pt_regs * regs)
+void __show_regs(struct pt_regs *regs)
{
- unsigned long flags;
-
- flags = condition_codes(regs);
+ unsigned long flags = condition_codes(regs);
+ printk("CPU: %d\n", smp_processor_id());
print_symbol("PC is at %s\n", instruction_pointer(regs));
print_symbol("LR is at %s\n", regs->ARM_lr);
printk("pc : [<%08lx>] lr : [<%08lx>] %s\n"
@@ -213,6 +212,14 @@ void show_regs(struct pt_regs * regs)
}
}
+void show_regs(struct pt_regs * regs)
+{
+ printk("\n");
+ printk("Pid: %d, comm: %20s\n", current->pid, current->comm);
+ __show_regs(regs);
+ __backtrace();
+}
+
void show_fpregs(struct user_fp *regs)
{
int i;
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 93dc4646cd7f..6e31718f6008 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -31,9 +31,6 @@
#include "ptrace.h"
-extern void c_backtrace (unsigned long fp, int pmode);
-extern void show_pte(struct mm_struct *mm, unsigned long addr);
-
const char *processor_modes[]=
{ "USER_26", "FIQ_26" , "IRQ_26" , "SVC_26" , "UK4_26" , "UK5_26" , "UK6_26" , "UK7_26" ,
"UK8_26" , "UK9_26" , "UK10_26", "UK11_26", "UK12_26", "UK13_26", "UK14_26", "UK15_26",
@@ -216,8 +213,7 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
printk("Internal error: %s: %x [#%d]\n", str, err, ++die_counter);
print_modules();
- printk("CPU: %d\n", smp_processor_id());
- show_regs(regs);
+ __show_regs(regs);
printk("Process %s (pid: %d, stack limit = 0x%p)\n",
tsk->comm, tsk->pid, tsk->thread_info + 1);
@@ -482,7 +478,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs)
current->pid, current->comm, no);
dump_instr(regs);
if (user_mode(regs)) {
- show_regs(regs);
+ __show_regs(regs);
c_backtrace(regs->ARM_fp, processor_mode(regs));
}
}
OpenPOWER on IntegriCloud