Commit f800efd5 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: print useful flags in oops, like x86

From: Anton Blanchard <anton@samba.org

print useful flags in oops, like x86
parent c03158bf
......@@ -70,11 +70,30 @@ static spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
void die(const char *str, struct pt_regs *regs, long err)
{
static int die_counter;
int nl = 0;
console_verbose();
spin_lock_irq(&die_lock);
bust_spinlocks(1);
printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter);
#ifdef CONFIG_PREEMPT
printk("PREEMPT ");
nl = 1;
#endif
#ifdef CONFIG_SMP
printk("SMP NR_CPUS=%d", NR_CPUS);
nl = 1;
#endif
#ifdef CONFIG_DEBUG_PAGEALLOC
printk("DEBUG_PAGEALLOC");
nl = 1;
#endif
#ifdef CONFIG_NUMA
printk("NUMA");
nl = 1;
#endif
if (nl)
printk("\n");
show_regs(regs);
bust_spinlocks(0);
spin_unlock_irq(&die_lock);
......
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