Messages in this thread Patch in this message | | | Date | Mon, 12 Mar 2001 10:01:55 +0200 | From | Matti Aarnio <> | Subject | 2.4.2-ac18 fix for Alpha machines |
| |
The linkage of vmlinux fails with lacking code for bust_spinlocks(), thus I cloned the i386 one as is -- which apparently is not really processor specific...
--- arch/alpha/mm/fault.c~ Sun Mar 11 11:49:23 2001 +++ arch/alpha/mm/fault.c Sun Mar 11 14:46:39 2001 @@ -231,3 +231,39 @@ } #endif } + +extern spinlock_t timerlist_lock; + +/* + * Unlock any spinlocks which will prevent us from getting the + * message out (timerlist_lock is acquired through the + * console unblank code) + */ +void bust_spinlocks(int yes) +{ + spin_lock_init(&timerlist_lock); + if (yes) { + oops_in_progress = 1; +#ifdef CONFIG_SMP + global_irq_lock = 0; /* Many serial drivers do __global_cli() */ +#endif + } else { + int loglevel_save = console_loglevel; + unblank_screen(); + oops_in_progress = 0; + /* + * OK, the message is on the console. Now we call printk() + * without oops_in_progress set so that printk will give klogd + * a poke. Hold onto your hats... + */ + console_loglevel = 15; /* NMI oopser may have shut the console up */ + printk(" "); + console_loglevel = loglevel_save; + } +} + +void do_BUG(const char *file, int line) +{ + bust_spinlocks(1); + printk("kernel BUG at %s:%d!\n", file, line); +} - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |