Commit 819c67e6 authored by David Mosberger-Tang's avatar David Mosberger-Tang Committed by Tony Luck

[IA64] Replace stale KDB-code with useful MAGIC_SYSRQ code in simserial.c

Patch makes it possible to use the "F4" function key to do
magic sysrq in the HP Ski simulator.
Signed-off-by: default avatarDavid Mosberger-Tang <davidm@hpl.hp.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent c1ffb6a8
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/serialP.h> #include <linux/serialP.h>
#include <linux/sysrq.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/hw_irq.h> #include <asm/hw_irq.h>
...@@ -149,12 +150,17 @@ static void receive_chars(struct tty_struct *tty, struct pt_regs *regs) ...@@ -149,12 +150,17 @@ static void receive_chars(struct tty_struct *tty, struct pt_regs *regs)
seen_esc = 2; seen_esc = 2;
continue; continue;
} else if ( seen_esc == 2 ) { } else if ( seen_esc == 2 ) {
if ( ch == 'P' ) show_state(); /* F1 key */ if ( ch == 'P' ) /* F1 */
#ifdef CONFIG_KDB show_state();
if ( ch == 'S' ) #ifdef CONFIG_MAGIC_SYSRQ
kdb(KDB_REASON_KEYBOARD, 0, (kdb_eframe_t) regs); if ( ch == 'S' ) { /* F4 */
do
ch = ia64_ssc(0, 0, 0, 0,
SSC_GETCHAR);
while (!ch);
handle_sysrq(ch, regs, NULL);
}
#endif #endif
seen_esc = 0; seen_esc = 0;
continue; continue;
} }
......
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