diff options
author | David Mosberger-Tang <davidm@hpl.hp.com> | 2005-06-10 01:40:00 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-06-28 12:58:29 -0400 |
commit | 819c67e69c4e0062787e27dd989f5f9d00d4834e (patch) | |
tree | bdbc12f883db46bb985dcf55e28765ad4b8353b0 /arch/ia64 | |
parent | c1ffb6a8aaed45ba2dc0a8f09241b0a96f9955ba (diff) |
[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: David Mosberger-Tang <davidm@hpl.hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/hp/sim/simserial.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c index 786e70718ce4..7a8ae0f4b387 100644 --- a/arch/ia64/hp/sim/simserial.c +++ b/arch/ia64/hp/sim/simserial.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/serial.h> | 31 | #include <linux/serial.h> |
32 | #include <linux/serialP.h> | 32 | #include <linux/serialP.h> |
33 | #include <linux/sysrq.h> | ||
33 | 34 | ||
34 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
35 | #include <asm/hw_irq.h> | 36 | #include <asm/hw_irq.h> |
@@ -149,12 +150,17 @@ static void receive_chars(struct tty_struct *tty, struct pt_regs *regs) | |||
149 | seen_esc = 2; | 150 | seen_esc = 2; |
150 | continue; | 151 | continue; |
151 | } else if ( seen_esc == 2 ) { | 152 | } else if ( seen_esc == 2 ) { |
152 | if ( ch == 'P' ) show_state(); /* F1 key */ | 153 | if ( ch == 'P' ) /* F1 */ |
153 | #ifdef CONFIG_KDB | 154 | show_state(); |
154 | if ( ch == 'S' ) | 155 | #ifdef CONFIG_MAGIC_SYSRQ |
155 | kdb(KDB_REASON_KEYBOARD, 0, (kdb_eframe_t) regs); | 156 | if ( ch == 'S' ) { /* F4 */ |
157 | do | ||
158 | ch = ia64_ssc(0, 0, 0, 0, | ||
159 | SSC_GETCHAR); | ||
160 | while (!ch); | ||
161 | handle_sysrq(ch, regs, NULL); | ||
162 | } | ||
156 | #endif | 163 | #endif |
157 | |||
158 | seen_esc = 0; | 164 | seen_esc = 0; |
159 | continue; | 165 | continue; |
160 | } | 166 | } |