diff options
-rw-r--r-- | arch/ia64/hp/sim/simserial.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/mconsole_kern.c | 2 | ||||
-rw-r--r-- | drivers/char/hangcheck-timer.c | 2 | ||||
-rw-r--r-- | drivers/char/hvc_console.c | 2 | ||||
-rw-r--r-- | drivers/char/hvsi.c | 2 | ||||
-rw-r--r-- | drivers/char/sysrq.c | 11 | ||||
-rw-r--r-- | drivers/s390/char/ctrlchar.c | 4 | ||||
-rw-r--r-- | drivers/s390/char/keyboard.c | 2 | ||||
-rw-r--r-- | drivers/serial/sn_console.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/generic.c | 2 | ||||
-rw-r--r-- | drivers/xen/manage.c | 2 | ||||
-rw-r--r-- | include/linux/serial_core.h | 2 | ||||
-rw-r--r-- | include/linux/sysrq.h | 12 | ||||
-rw-r--r-- | kernel/debug/kdb/kdb_main.c | 2 |
14 files changed, 22 insertions, 27 deletions
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c index 2bef5261d96d..1e8d71ad93ef 100644 --- a/arch/ia64/hp/sim/simserial.c +++ b/arch/ia64/hp/sim/simserial.c | |||
@@ -149,7 +149,7 @@ static void receive_chars(struct tty_struct *tty) | |||
149 | ch = ia64_ssc(0, 0, 0, 0, | 149 | ch = ia64_ssc(0, 0, 0, 0, |
150 | SSC_GETCHAR); | 150 | SSC_GETCHAR); |
151 | while (!ch); | 151 | while (!ch); |
152 | handle_sysrq(ch, NULL); | 152 | handle_sysrq(ch); |
153 | } | 153 | } |
154 | #endif | 154 | #endif |
155 | seen_esc = 0; | 155 | seen_esc = 0; |
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index de317d0c3294..ebc680717e59 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c | |||
@@ -690,7 +690,7 @@ static void with_console(struct mc_request *req, void (*proc)(void *), | |||
690 | static void sysrq_proc(void *arg) | 690 | static void sysrq_proc(void *arg) |
691 | { | 691 | { |
692 | char *op = arg; | 692 | char *op = arg; |
693 | handle_sysrq(*op, NULL); | 693 | handle_sysrq(*op); |
694 | } | 694 | } |
695 | 695 | ||
696 | void mconsole_sysrq(struct mc_request *req) | 696 | void mconsole_sysrq(struct mc_request *req) |
diff --git a/drivers/char/hangcheck-timer.c b/drivers/char/hangcheck-timer.c index e0249722d25f..f953c96efc86 100644 --- a/drivers/char/hangcheck-timer.c +++ b/drivers/char/hangcheck-timer.c | |||
@@ -159,7 +159,7 @@ static void hangcheck_fire(unsigned long data) | |||
159 | if (hangcheck_dump_tasks) { | 159 | if (hangcheck_dump_tasks) { |
160 | printk(KERN_CRIT "Hangcheck: Task state:\n"); | 160 | printk(KERN_CRIT "Hangcheck: Task state:\n"); |
161 | #ifdef CONFIG_MAGIC_SYSRQ | 161 | #ifdef CONFIG_MAGIC_SYSRQ |
162 | handle_sysrq('t', NULL); | 162 | handle_sysrq('t'); |
163 | #endif /* CONFIG_MAGIC_SYSRQ */ | 163 | #endif /* CONFIG_MAGIC_SYSRQ */ |
164 | } | 164 | } |
165 | if (hangcheck_reboot) { | 165 | if (hangcheck_reboot) { |
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index fa27d1676ee5..3afd62e856eb 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c | |||
@@ -651,7 +651,7 @@ int hvc_poll(struct hvc_struct *hp) | |||
651 | if (sysrq_pressed) | 651 | if (sysrq_pressed) |
652 | continue; | 652 | continue; |
653 | } else if (sysrq_pressed) { | 653 | } else if (sysrq_pressed) { |
654 | handle_sysrq(buf[i], tty); | 654 | handle_sysrq(buf[i]); |
655 | sysrq_pressed = 0; | 655 | sysrq_pressed = 0; |
656 | continue; | 656 | continue; |
657 | } | 657 | } |
diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c index 1f4b6de65a2d..a2bc885ce60a 100644 --- a/drivers/char/hvsi.c +++ b/drivers/char/hvsi.c | |||
@@ -403,7 +403,7 @@ static void hvsi_insert_chars(struct hvsi_struct *hp, const char *buf, int len) | |||
403 | hp->sysrq = 1; | 403 | hp->sysrq = 1; |
404 | continue; | 404 | continue; |
405 | } else if (hp->sysrq) { | 405 | } else if (hp->sysrq) { |
406 | handle_sysrq(c, hp->tty); | 406 | handle_sysrq(c); |
407 | hp->sysrq = 0; | 407 | hp->sysrq = 0; |
408 | continue; | 408 | continue; |
409 | } | 409 | } |
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index a892a3c249dd..ef31bb81e843 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
21 | #include <linux/tty.h> | ||
22 | #include <linux/mount.h> | 21 | #include <linux/mount.h> |
23 | #include <linux/kdev_t.h> | 22 | #include <linux/kdev_t.h> |
24 | #include <linux/major.h> | 23 | #include <linux/major.h> |
@@ -493,7 +492,7 @@ static void __sysrq_put_key_op(int key, struct sysrq_key_op *op_p) | |||
493 | sysrq_key_table[i] = op_p; | 492 | sysrq_key_table[i] = op_p; |
494 | } | 493 | } |
495 | 494 | ||
496 | void __handle_sysrq(int key, struct tty_struct *tty, int check_mask) | 495 | void __handle_sysrq(int key, bool check_mask) |
497 | { | 496 | { |
498 | struct sysrq_key_op *op_p; | 497 | struct sysrq_key_op *op_p; |
499 | int orig_log_level; | 498 | int orig_log_level; |
@@ -545,10 +544,10 @@ void __handle_sysrq(int key, struct tty_struct *tty, int check_mask) | |||
545 | spin_unlock_irqrestore(&sysrq_key_table_lock, flags); | 544 | spin_unlock_irqrestore(&sysrq_key_table_lock, flags); |
546 | } | 545 | } |
547 | 546 | ||
548 | void handle_sysrq(int key, struct tty_struct *tty) | 547 | void handle_sysrq(int key) |
549 | { | 548 | { |
550 | if (sysrq_on()) | 549 | if (sysrq_on()) |
551 | __handle_sysrq(key, tty, 1); | 550 | __handle_sysrq(key, true); |
552 | } | 551 | } |
553 | EXPORT_SYMBOL(handle_sysrq); | 552 | EXPORT_SYMBOL(handle_sysrq); |
554 | 553 | ||
@@ -597,7 +596,7 @@ static bool sysrq_filter(struct input_handle *handle, unsigned int type, | |||
597 | 596 | ||
598 | default: | 597 | default: |
599 | if (sysrq_down && value && value != 2) | 598 | if (sysrq_down && value && value != 2) |
600 | __handle_sysrq(sysrq_xlate[code], NULL, 1); | 599 | __handle_sysrq(sysrq_xlate[code], true); |
601 | break; | 600 | break; |
602 | } | 601 | } |
603 | 602 | ||
@@ -765,7 +764,7 @@ static ssize_t write_sysrq_trigger(struct file *file, const char __user *buf, | |||
765 | 764 | ||
766 | if (get_user(c, buf)) | 765 | if (get_user(c, buf)) |
767 | return -EFAULT; | 766 | return -EFAULT; |
768 | __handle_sysrq(c, NULL, 0); | 767 | __handle_sysrq(c, false); |
769 | } | 768 | } |
770 | 769 | ||
771 | return count; | 770 | return count; |
diff --git a/drivers/s390/char/ctrlchar.c b/drivers/s390/char/ctrlchar.c index c6cbcb3f925e..0e9a309b9669 100644 --- a/drivers/s390/char/ctrlchar.c +++ b/drivers/s390/char/ctrlchar.c | |||
@@ -16,12 +16,11 @@ | |||
16 | 16 | ||
17 | #ifdef CONFIG_MAGIC_SYSRQ | 17 | #ifdef CONFIG_MAGIC_SYSRQ |
18 | static int ctrlchar_sysrq_key; | 18 | static int ctrlchar_sysrq_key; |
19 | static struct tty_struct *sysrq_tty; | ||
20 | 19 | ||
21 | static void | 20 | static void |
22 | ctrlchar_handle_sysrq(struct work_struct *work) | 21 | ctrlchar_handle_sysrq(struct work_struct *work) |
23 | { | 22 | { |
24 | handle_sysrq(ctrlchar_sysrq_key, sysrq_tty); | 23 | handle_sysrq(ctrlchar_sysrq_key); |
25 | } | 24 | } |
26 | 25 | ||
27 | static DECLARE_WORK(ctrlchar_work, ctrlchar_handle_sysrq); | 26 | static DECLARE_WORK(ctrlchar_work, ctrlchar_handle_sysrq); |
@@ -54,7 +53,6 @@ ctrlchar_handle(const unsigned char *buf, int len, struct tty_struct *tty) | |||
54 | /* racy */ | 53 | /* racy */ |
55 | if (len == 3 && buf[1] == '-') { | 54 | if (len == 3 && buf[1] == '-') { |
56 | ctrlchar_sysrq_key = buf[2]; | 55 | ctrlchar_sysrq_key = buf[2]; |
57 | sysrq_tty = tty; | ||
58 | schedule_work(&ctrlchar_work); | 56 | schedule_work(&ctrlchar_work); |
59 | return CTRLCHAR_SYSRQ; | 57 | return CTRLCHAR_SYSRQ; |
60 | } | 58 | } |
diff --git a/drivers/s390/char/keyboard.c b/drivers/s390/char/keyboard.c index 18d9a497863b..8cd58e412b5e 100644 --- a/drivers/s390/char/keyboard.c +++ b/drivers/s390/char/keyboard.c | |||
@@ -305,7 +305,7 @@ kbd_keycode(struct kbd_data *kbd, unsigned int keycode) | |||
305 | if (kbd->sysrq) { | 305 | if (kbd->sysrq) { |
306 | if (kbd->sysrq == K(KT_LATIN, '-')) { | 306 | if (kbd->sysrq == K(KT_LATIN, '-')) { |
307 | kbd->sysrq = 0; | 307 | kbd->sysrq = 0; |
308 | handle_sysrq(value, kbd->tty); | 308 | handle_sysrq(value); |
309 | return; | 309 | return; |
310 | } | 310 | } |
311 | if (value == '-') { | 311 | if (value == '-') { |
diff --git a/drivers/serial/sn_console.c b/drivers/serial/sn_console.c index 7e5e5efea4e2..cff9a306660f 100644 --- a/drivers/serial/sn_console.c +++ b/drivers/serial/sn_console.c | |||
@@ -492,7 +492,7 @@ sn_receive_chars(struct sn_cons_port *port, unsigned long flags) | |||
492 | sysrq_requested = 0; | 492 | sysrq_requested = 0; |
493 | if (ch && time_before(jiffies, sysrq_timeout)) { | 493 | if (ch && time_before(jiffies, sysrq_timeout)) { |
494 | spin_unlock_irqrestore(&port->sc_port.lock, flags); | 494 | spin_unlock_irqrestore(&port->sc_port.lock, flags); |
495 | handle_sysrq(ch, NULL); | 495 | handle_sysrq(ch); |
496 | spin_lock_irqsave(&port->sc_port.lock, flags); | 496 | spin_lock_irqsave(&port->sc_port.lock, flags); |
497 | /* ignore actual sysrq command char */ | 497 | /* ignore actual sysrq command char */ |
498 | continue; | 498 | continue; |
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index ca92f67747cc..1e846cc3c7a4 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c | |||
@@ -453,7 +453,7 @@ int usb_serial_handle_sysrq_char(struct tty_struct *tty, | |||
453 | { | 453 | { |
454 | if (port->sysrq && port->port.console) { | 454 | if (port->sysrq && port->port.console) { |
455 | if (ch && time_before(jiffies, port->sysrq)) { | 455 | if (ch && time_before(jiffies, port->sysrq)) { |
456 | handle_sysrq(ch, tty); | 456 | handle_sysrq(ch); |
457 | port->sysrq = 0; | 457 | port->sysrq = 0; |
458 | return 1; | 458 | return 1; |
459 | } | 459 | } |
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c index 1799bd890315..ef9c7db52077 100644 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c | |||
@@ -237,7 +237,7 @@ static void sysrq_handler(struct xenbus_watch *watch, const char **vec, | |||
237 | goto again; | 237 | goto again; |
238 | 238 | ||
239 | if (sysrq_key != '\0') | 239 | if (sysrq_key != '\0') |
240 | handle_sysrq(sysrq_key, NULL); | 240 | handle_sysrq(sysrq_key); |
241 | } | 241 | } |
242 | 242 | ||
243 | static struct xenbus_watch sysrq_watch = { | 243 | static struct xenbus_watch sysrq_watch = { |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 3c2ad99fed34..64458a9a8938 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -465,7 +465,7 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch) | |||
465 | #ifdef SUPPORT_SYSRQ | 465 | #ifdef SUPPORT_SYSRQ |
466 | if (port->sysrq) { | 466 | if (port->sysrq) { |
467 | if (ch && time_before(jiffies, port->sysrq)) { | 467 | if (ch && time_before(jiffies, port->sysrq)) { |
468 | handle_sysrq(ch, port->state->port.tty); | 468 | handle_sysrq(ch); |
469 | port->sysrq = 0; | 469 | port->sysrq = 0; |
470 | return 1; | 470 | return 1; |
471 | } | 471 | } |
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index 4ee650315119..387fa7d05c98 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h | |||
@@ -15,9 +15,7 @@ | |||
15 | #define _LINUX_SYSRQ_H | 15 | #define _LINUX_SYSRQ_H |
16 | 16 | ||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | 18 | #include <linux/types.h> | |
19 | struct pt_regs; | ||
20 | struct tty_struct; | ||
21 | 19 | ||
22 | /* Possible values of bitmask for enabling sysrq functions */ | 20 | /* Possible values of bitmask for enabling sysrq functions */ |
23 | /* 0x0001 is reserved for enable everything */ | 21 | /* 0x0001 is reserved for enable everything */ |
@@ -44,8 +42,8 @@ struct sysrq_key_op { | |||
44 | * are available -- else NULL's). | 42 | * are available -- else NULL's). |
45 | */ | 43 | */ |
46 | 44 | ||
47 | void handle_sysrq(int key, struct tty_struct *tty); | 45 | void handle_sysrq(int key); |
48 | void __handle_sysrq(int key, struct tty_struct *tty, int check_mask); | 46 | void __handle_sysrq(int key, bool check_mask); |
49 | int register_sysrq_key(int key, struct sysrq_key_op *op); | 47 | int register_sysrq_key(int key, struct sysrq_key_op *op); |
50 | int unregister_sysrq_key(int key, struct sysrq_key_op *op); | 48 | int unregister_sysrq_key(int key, struct sysrq_key_op *op); |
51 | struct sysrq_key_op *__sysrq_get_key_op(int key); | 49 | struct sysrq_key_op *__sysrq_get_key_op(int key); |
@@ -54,11 +52,11 @@ int sysrq_toggle_support(int enable_mask); | |||
54 | 52 | ||
55 | #else | 53 | #else |
56 | 54 | ||
57 | static inline void handle_sysrq(int key, struct tty_struct *tty) | 55 | static inline void handle_sysrq(int key) |
58 | { | 56 | { |
59 | } | 57 | } |
60 | 58 | ||
61 | static inline void __handle_sysrq(int key, struct tty_struct *tty, int check_mask); | 59 | static inline void __handle_sysrq(int key, bool check_mask) |
62 | { | 60 | { |
63 | } | 61 | } |
64 | 62 | ||
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index 28b844118bbd..caf057a3de0e 100644 --- a/kernel/debug/kdb/kdb_main.c +++ b/kernel/debug/kdb/kdb_main.c | |||
@@ -1929,7 +1929,7 @@ static int kdb_sr(int argc, const char **argv) | |||
1929 | if (argc != 1) | 1929 | if (argc != 1) |
1930 | return KDB_ARGCOUNT; | 1930 | return KDB_ARGCOUNT; |
1931 | kdb_trap_printk++; | 1931 | kdb_trap_printk++; |
1932 | __handle_sysrq(*argv[1], NULL, 0); | 1932 | __handle_sysrq(*argv[1], false); |
1933 | kdb_trap_printk--; | 1933 | kdb_trap_printk--; |
1934 | 1934 | ||
1935 | return 0; | 1935 | return 0; |