aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/sysrq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/sysrq.c')
-rw-r--r--drivers/char/sysrq.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index fa71b84f217b..0540d5de2c17 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -36,7 +36,7 @@
36#include <linux/vt_kern.h> 36#include <linux/vt_kern.h>
37#include <linux/workqueue.h> 37#include <linux/workqueue.h>
38#include <linux/kexec.h> 38#include <linux/kexec.h>
39#include <linux/irq.h> 39#include <linux/interrupt.h>
40#include <linux/hrtimer.h> 40#include <linux/hrtimer.h>
41#include <linux/oom.h> 41#include <linux/oom.h>
42 42
@@ -285,7 +285,7 @@ static void sysrq_ftrace_dump(int key, struct tty_struct *tty)
285} 285}
286static struct sysrq_key_op sysrq_ftrace_dump_op = { 286static struct sysrq_key_op sysrq_ftrace_dump_op = {
287 .handler = sysrq_ftrace_dump, 287 .handler = sysrq_ftrace_dump,
288 .help_msg = "dumpZ-ftrace-buffer", 288 .help_msg = "dump-ftrace-buffer(Z)",
289 .action_msg = "Dump ftrace buffer", 289 .action_msg = "Dump ftrace buffer",
290 .enable_mask = SYSRQ_ENABLE_DUMP, 290 .enable_mask = SYSRQ_ENABLE_DUMP,
291}; 291};
@@ -348,6 +348,19 @@ static struct sysrq_key_op sysrq_moom_op = {
348 .enable_mask = SYSRQ_ENABLE_SIGNAL, 348 .enable_mask = SYSRQ_ENABLE_SIGNAL,
349}; 349};
350 350
351#ifdef CONFIG_BLOCK
352static void sysrq_handle_thaw(int key, struct tty_struct *tty)
353{
354 emergency_thaw_all();
355}
356static struct sysrq_key_op sysrq_thaw_op = {
357 .handler = sysrq_handle_thaw,
358 .help_msg = "thaw-filesystems(J)",
359 .action_msg = "Emergency Thaw of all frozen filesystems",
360 .enable_mask = SYSRQ_ENABLE_SIGNAL,
361};
362#endif
363
351static void sysrq_handle_kill(int key, struct tty_struct *tty) 364static void sysrq_handle_kill(int key, struct tty_struct *tty)
352{ 365{
353 send_sig_all(SIGKILL); 366 send_sig_all(SIGKILL);
@@ -398,9 +411,13 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
398 &sysrq_moom_op, /* f */ 411 &sysrq_moom_op, /* f */
399 /* g: May be registered by ppc for kgdb */ 412 /* g: May be registered by ppc for kgdb */
400 NULL, /* g */ 413 NULL, /* g */
401 NULL, /* h */ 414 NULL, /* h - reserved for help */
402 &sysrq_kill_op, /* i */ 415 &sysrq_kill_op, /* i */
416#ifdef CONFIG_BLOCK
417 &sysrq_thaw_op, /* j */
418#else
403 NULL, /* j */ 419 NULL, /* j */
420#endif
404 &sysrq_SAK_op, /* k */ 421 &sysrq_SAK_op, /* k */
405#ifdef CONFIG_SMP 422#ifdef CONFIG_SMP
406 &sysrq_showallcpus_op, /* l */ 423 &sysrq_showallcpus_op, /* l */