Messages in this thread Patch in this message | | | Date | Tue, 29 Jul 2003 21:37:26 -0400 (EDT) | From | Zwane Mwaikambo <> | Subject | Re: Turning off automatic screen clanking |
| |
On Wed, 30 Jul 2003, Jamie Lokier wrote:
> One of Richard's points is that there is presently no way to fix the > box in userspace. If the kernel crashes during boot, it will blank > the screen and there is no way to unblank it in that state.
Well something like this should work without complicating things during panic.
Index: linux-2.6.0-test2/arch/i386/kernel/traps.c =================================================================== RCS file: /build/cvsroot/linux-2.6.0-test2/arch/i386/kernel/traps.c,v retrieving revision 1.1.1.1 diff -u -p -B -r1.1.1.1 traps.c --- linux-2.6.0-test2/arch/i386/kernel/traps.c 30 Jul 2003 00:06:00 -0000 1.1.1.1 +++ linux-2.6.0-test2/arch/i386/kernel/traps.c 30 Jul 2003 01:34:12 -0000 @@ -248,6 +248,7 @@ bug: } spinlock_t die_lock = SPIN_LOCK_UNLOCKED; +int dont_blank_on_panic; void die(const char * str, struct pt_regs * regs, long err) { @@ -261,8 +262,11 @@ void die(const char * str, struct pt_reg show_registers(regs); bust_spinlocks(0); spin_unlock_irq(&die_lock); - if (in_interrupt()) + if (in_interrupt()) { + dont_blank_on_panic = 1; + barrier(); panic("Fatal exception in interrupt"); + } if (panic_on_oops) { printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n"); Index: linux-2.6.0-test2/drivers/char/vt.c =================================================================== RCS file: /build/cvsroot/linux-2.6.0-test2/drivers/char/vt.c,v retrieving revision 1.1.1.1 diff -u -p -B -r1.1.1.1 vt.c --- linux-2.6.0-test2/drivers/char/vt.c 30 Jul 2003 00:06:17 -0000 1.1.1.1 +++ linux-2.6.0-test2/drivers/char/vt.c 30 Jul 2003 01:33:41 -0000 @@ -2696,10 +2696,11 @@ static void vesa_powerdown_screen(unsign static void timer_do_blank_screen(int entering_gfx, int from_timer_handler) { + extern int dont_blank_on_panic; int currcons = fg_console; int i; - if (console_blanked) + if (console_blanked || dont_blank_on_panic) return; /* entering graphics mode? */ -- function.linuxpower.ca - 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/
| |