# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID ced400d2588622dca429f2b4c5b897d41f56c0ca
# Parent 54f652eee32403fc66d29a8e7824bd10a76451fb
Clean up formatting of Xen crash messages.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
diff -r 54f652eee324 -r ced400d25886 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c Thu Aug 18 14:18:15 2005
+++ b/xen/arch/x86/traps.c Thu Aug 18 14:26:36 2005
@@ -159,10 +159,8 @@
addr = *stack++;
if ( is_kernel_text(addr) )
{
- if ( (i != 0) && ((i % 6) == 0) )
- printk("\n ");
printk("[<%p>]", _p(addr));
- print_symbol(" %s\n", addr);
+ print_symbol(" %s\n ", addr);
i++;
}
}
diff -r 54f652eee324 -r ced400d25886 xen/arch/x86/x86_32/traps.c
--- a/xen/arch/x86/x86_32/traps.c Thu Aug 18 14:18:15 2005
+++ b/xen/arch/x86/x86_32/traps.c Thu Aug 18 14:26:36 2005
@@ -66,7 +66,8 @@
printk("CPU: %d\nEIP: %04lx:[<%08lx>]",
smp_processor_id(), (unsigned long)0xffff & regs->cs, eip);
- print_symbol(" %s\n", eip);
+ if ( !GUEST_MODE(regs) )
+ print_symbol(" %s\n", eip);
printk("EFLAGS: %08lx CONTEXT: %s\n", eflags, context);
printk("eax: %08x ebx: %08x ecx: %08x edx: %08x\n",
regs->eax, regs->ebx, regs->ecx, regs->edx);
diff -r 54f652eee324 -r ced400d25886 xen/arch/x86/x86_64/traps.c
--- a/xen/arch/x86/x86_64/traps.c Thu Aug 18 14:18:15 2005
+++ b/xen/arch/x86/x86_64/traps.c Thu Aug 18 14:26:36 2005
@@ -17,7 +17,8 @@
{
printk("CPU: %d\nEIP: %04x:[<%016lx>]",
smp_processor_id(), 0xffff & regs->cs, regs->rip);
- print_symbol(" %s\n", regs->rip);
+ if ( !GUEST_MODE(regs) )
+ print_symbol(" %s\n", regs->rip);
printk("EFLAGS: %016lx\n", regs->eflags);
printk("rax: %016lx rbx: %016lx rcx: %016lx rdx: %016lx\n",
regs->rax, regs->rbx, regs->rcx, regs->rdx);
diff -r 54f652eee324 -r ced400d25886 xen/drivers/char/console.c
--- a/xen/drivers/char/console.c Thu Aug 18 14:18:15 2005
+++ b/xen/drivers/char/console.c Thu Aug 18 14:26:36 2005
@@ -652,8 +652,9 @@
void panic(const char *fmt, ...)
{
va_list args;
- char buf[128], cpustr[10];
+ char buf[128];
unsigned long flags;
+ static spinlock_t lock = SPIN_LOCK_UNLOCKED;
extern void machine_restart(char *);
debugtrace_dump();
@@ -665,16 +666,13 @@
debugger_trap_immediate();
/* Spit out multiline message in one go. */
- spin_lock_irqsave(&console_lock, flags);
- __putstr("\n****************************************\n");
- __putstr("Panic on CPU");
- sprintf(cpustr, "%d", smp_processor_id());
- __putstr(cpustr);
- __putstr(":\n");
- __putstr(buf);
- __putstr("****************************************\n\n");
- __putstr("Reboot in five seconds...\n");
- spin_unlock_irqrestore(&console_lock, flags);
+ spin_lock_irqsave(&lock, flags);
+ printk("\n****************************************\n");
+ printk("Panic on CPU %d:\n", smp_processor_id());
+ printk(buf);
+ printk("****************************************\n\n");
+ printk("Reboot in five seconds...\n");
+ spin_unlock_irqrestore(&lock, flags);
watchdog_disable();
mdelay(5000);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|