Commit a25a6d9a authored by Andrew Morton's avatar Andrew Morton Committed by David S. Miller

[PATCH] print some x86 build options during oopses

I find this handy sometimes: it makes the oops output include info as to
whether the user has selected CONFIG_PREEMPT, CONFIG_SMP or, particularly,
CONFIG_DEBUG_PAGEALLOC.  It can save one email round-trip.
parent c1588714
...@@ -255,12 +255,27 @@ spinlock_t die_lock = SPIN_LOCK_UNLOCKED; ...@@ -255,12 +255,27 @@ spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
void die(const char * str, struct pt_regs * regs, long err) void die(const char * str, struct pt_regs * regs, long err)
{ {
static int die_counter; static int die_counter;
int nl = 0;
console_verbose(); console_verbose();
spin_lock_irq(&die_lock); spin_lock_irq(&die_lock);
bust_spinlocks(1); bust_spinlocks(1);
handle_BUG(regs); handle_BUG(regs);
printk("%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); printk("%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter);
#ifdef CONFIG_PREEMPT
printk("PREEMPT ");
nl = 1;
#endif
#ifdef CONFIG_SMP
printk("SMP ");
nl = 1;
#endif
#ifdef CONFIG_DEBUG_PAGEALLOC
printk("DEBUG_PAGEALLOC");
nl = 1;
#endif
if (nl)
printk("\n");
show_registers(regs); show_registers(regs);
bust_spinlocks(0); bust_spinlocks(0);
spin_unlock_irq(&die_lock); 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