diff -urN --exclude-from=/home/davej/.exclude linux-2.4.15pre6/kernel/panic.c linux-ac/kernel/panic.c --- linux-2.4.15pre6/kernel/panic.c Sun Sep 30 19:26:08 2001 +++ linux-ac/kernel/panic.c Mon Nov 19 14:09:24 2001 @@ -96,6 +96,10 @@ #endif sti(); for(;;) { +#if defined(__i386__) && defined(CONFIG_VT) + extern void panic_blink(void); + panic_blink(); +#endif CHECK_EMERGENCY_SYNC } } diff -urN --exclude-from=/home/davej/.exclude linux-2.4.15pre6/drivers/char/pc_keyb.c linux-ac/drivers/char/pc_keyb.c --- linux-2.4.15pre6/drivers/char/pc_keyb.c Mon Nov 19 13:40:54 2001 +++ linux-ac/drivers/char/pc_keyb.c Mon Nov 19 14:09:20 2001 @@ -1215,3 +1215,26 @@ } #endif /* CONFIG_PSMOUSE */ + + +/* Tell the user who may be running in X and not see the console that we have + panic'ed. This is to distingush panics from "real" lockups. + Could in theory send the panic message as morse, but that is left as an + exercise for the reader. */ +void panic_blink(void) +{ + static unsigned long last_jiffie; + static char led; + /* Roughly 1/2s frequency. KDB uses about 1s. Make sure it is + different. */ + if (jiffies - last_jiffie > HZ/2) { + led ^= 0x01 | 0x04; + while (kbd_read_status() & KBD_STAT_IBF) mdelay(1); + kbd_write_output(KBD_CMD_SET_LEDS); + mdelay(1); + while (kbd_read_status() & KBD_STAT_IBF) mdelay(1); + mdelay(1); + kbd_write_output(led); + last_jiffie = jiffies; + } +}