diff options
Diffstat (limited to 'drivers/char/sysrq.c')
-rw-r--r-- | drivers/char/sysrq.c | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index ce0d9da52a8a..d41b9f6f7903 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c | |||
@@ -82,7 +82,7 @@ static void sysrq_handle_loglevel(int key, struct tty_struct *tty) | |||
82 | } | 82 | } |
83 | static struct sysrq_key_op sysrq_loglevel_op = { | 83 | static struct sysrq_key_op sysrq_loglevel_op = { |
84 | .handler = sysrq_handle_loglevel, | 84 | .handler = sysrq_handle_loglevel, |
85 | .help_msg = "loglevel0-8", | 85 | .help_msg = "loglevel(0-9)", |
86 | .action_msg = "Changing Loglevel", | 86 | .action_msg = "Changing Loglevel", |
87 | .enable_mask = SYSRQ_ENABLE_LOG, | 87 | .enable_mask = SYSRQ_ENABLE_LOG, |
88 | }; | 88 | }; |
@@ -233,7 +233,7 @@ static void sysrq_handle_showallcpus(int key, struct tty_struct *tty) | |||
233 | 233 | ||
234 | static struct sysrq_key_op sysrq_showallcpus_op = { | 234 | static struct sysrq_key_op sysrq_showallcpus_op = { |
235 | .handler = sysrq_handle_showallcpus, | 235 | .handler = sysrq_handle_showallcpus, |
236 | .help_msg = "aLlcpus", | 236 | .help_msg = "show-backtrace-all-active-cpus(L)", |
237 | .action_msg = "Show backtrace of all active CPUs", | 237 | .action_msg = "Show backtrace of all active CPUs", |
238 | .enable_mask = SYSRQ_ENABLE_DUMP, | 238 | .enable_mask = SYSRQ_ENABLE_DUMP, |
239 | }; | 239 | }; |
@@ -247,7 +247,7 @@ static void sysrq_handle_showregs(int key, struct tty_struct *tty) | |||
247 | } | 247 | } |
248 | static struct sysrq_key_op sysrq_showregs_op = { | 248 | static struct sysrq_key_op sysrq_showregs_op = { |
249 | .handler = sysrq_handle_showregs, | 249 | .handler = sysrq_handle_showregs, |
250 | .help_msg = "showPc", | 250 | .help_msg = "show-registers(P)", |
251 | .action_msg = "Show Regs", | 251 | .action_msg = "Show Regs", |
252 | .enable_mask = SYSRQ_ENABLE_DUMP, | 252 | .enable_mask = SYSRQ_ENABLE_DUMP, |
253 | }; | 253 | }; |
@@ -258,7 +258,7 @@ static void sysrq_handle_showstate(int key, struct tty_struct *tty) | |||
258 | } | 258 | } |
259 | static struct sysrq_key_op sysrq_showstate_op = { | 259 | static struct sysrq_key_op sysrq_showstate_op = { |
260 | .handler = sysrq_handle_showstate, | 260 | .handler = sysrq_handle_showstate, |
261 | .help_msg = "showTasks", | 261 | .help_msg = "show-task-states(T)", |
262 | .action_msg = "Show State", | 262 | .action_msg = "Show State", |
263 | .enable_mask = SYSRQ_ENABLE_DUMP, | 263 | .enable_mask = SYSRQ_ENABLE_DUMP, |
264 | }; | 264 | }; |
@@ -269,11 +269,27 @@ static void sysrq_handle_showstate_blocked(int key, struct tty_struct *tty) | |||
269 | } | 269 | } |
270 | static struct sysrq_key_op sysrq_showstate_blocked_op = { | 270 | static struct sysrq_key_op sysrq_showstate_blocked_op = { |
271 | .handler = sysrq_handle_showstate_blocked, | 271 | .handler = sysrq_handle_showstate_blocked, |
272 | .help_msg = "shoW-blocked-tasks", | 272 | .help_msg = "show-blocked-tasks(W)", |
273 | .action_msg = "Show Blocked State", | 273 | .action_msg = "Show Blocked State", |
274 | .enable_mask = SYSRQ_ENABLE_DUMP, | 274 | .enable_mask = SYSRQ_ENABLE_DUMP, |
275 | }; | 275 | }; |
276 | 276 | ||
277 | #ifdef CONFIG_TRACING | ||
278 | #include <linux/ftrace.h> | ||
279 | |||
280 | static void sysrq_ftrace_dump(int key, struct tty_struct *tty) | ||
281 | { | ||
282 | ftrace_dump(); | ||
283 | } | ||
284 | static struct sysrq_key_op sysrq_ftrace_dump_op = { | ||
285 | .handler = sysrq_ftrace_dump, | ||
286 | .help_msg = "dumpZ-ftrace-buffer", | ||
287 | .action_msg = "Dump ftrace buffer", | ||
288 | .enable_mask = SYSRQ_ENABLE_DUMP, | ||
289 | }; | ||
290 | #else | ||
291 | #define sysrq_ftrace_dump_op (*(struct sysrq_key_op *)0) | ||
292 | #endif | ||
277 | 293 | ||
278 | static void sysrq_handle_showmem(int key, struct tty_struct *tty) | 294 | static void sysrq_handle_showmem(int key, struct tty_struct *tty) |
279 | { | 295 | { |
@@ -281,7 +297,7 @@ static void sysrq_handle_showmem(int key, struct tty_struct *tty) | |||
281 | } | 297 | } |
282 | static struct sysrq_key_op sysrq_showmem_op = { | 298 | static struct sysrq_key_op sysrq_showmem_op = { |
283 | .handler = sysrq_handle_showmem, | 299 | .handler = sysrq_handle_showmem, |
284 | .help_msg = "showMem", | 300 | .help_msg = "show-memory-usage(M)", |
285 | .action_msg = "Show Memory", | 301 | .action_msg = "Show Memory", |
286 | .enable_mask = SYSRQ_ENABLE_DUMP, | 302 | .enable_mask = SYSRQ_ENABLE_DUMP, |
287 | }; | 303 | }; |
@@ -307,7 +323,7 @@ static void sysrq_handle_term(int key, struct tty_struct *tty) | |||
307 | } | 323 | } |
308 | static struct sysrq_key_op sysrq_term_op = { | 324 | static struct sysrq_key_op sysrq_term_op = { |
309 | .handler = sysrq_handle_term, | 325 | .handler = sysrq_handle_term, |
310 | .help_msg = "tErm", | 326 | .help_msg = "terminate-all-tasks(E)", |
311 | .action_msg = "Terminate All Tasks", | 327 | .action_msg = "Terminate All Tasks", |
312 | .enable_mask = SYSRQ_ENABLE_SIGNAL, | 328 | .enable_mask = SYSRQ_ENABLE_SIGNAL, |
313 | }; | 329 | }; |
@@ -325,7 +341,7 @@ static void sysrq_handle_moom(int key, struct tty_struct *tty) | |||
325 | } | 341 | } |
326 | static struct sysrq_key_op sysrq_moom_op = { | 342 | static struct sysrq_key_op sysrq_moom_op = { |
327 | .handler = sysrq_handle_moom, | 343 | .handler = sysrq_handle_moom, |
328 | .help_msg = "Full", | 344 | .help_msg = "memory-full-oom-kill(F)", |
329 | .action_msg = "Manual OOM execution", | 345 | .action_msg = "Manual OOM execution", |
330 | .enable_mask = SYSRQ_ENABLE_SIGNAL, | 346 | .enable_mask = SYSRQ_ENABLE_SIGNAL, |
331 | }; | 347 | }; |
@@ -337,7 +353,7 @@ static void sysrq_handle_kill(int key, struct tty_struct *tty) | |||
337 | } | 353 | } |
338 | static struct sysrq_key_op sysrq_kill_op = { | 354 | static struct sysrq_key_op sysrq_kill_op = { |
339 | .handler = sysrq_handle_kill, | 355 | .handler = sysrq_handle_kill, |
340 | .help_msg = "kIll", | 356 | .help_msg = "kill-all-tasks(I)", |
341 | .action_msg = "Kill All Tasks", | 357 | .action_msg = "Kill All Tasks", |
342 | .enable_mask = SYSRQ_ENABLE_SIGNAL, | 358 | .enable_mask = SYSRQ_ENABLE_SIGNAL, |
343 | }; | 359 | }; |
@@ -348,7 +364,7 @@ static void sysrq_handle_unrt(int key, struct tty_struct *tty) | |||
348 | } | 364 | } |
349 | static struct sysrq_key_op sysrq_unrt_op = { | 365 | static struct sysrq_key_op sysrq_unrt_op = { |
350 | .handler = sysrq_handle_unrt, | 366 | .handler = sysrq_handle_unrt, |
351 | .help_msg = "Nice", | 367 | .help_msg = "nice-all-RT-tasks(N)", |
352 | .action_msg = "Nice All RT Tasks", | 368 | .action_msg = "Nice All RT Tasks", |
353 | .enable_mask = SYSRQ_ENABLE_RTNICE, | 369 | .enable_mask = SYSRQ_ENABLE_RTNICE, |
354 | }; | 370 | }; |
@@ -406,7 +422,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = { | |||
406 | NULL, /* x */ | 422 | NULL, /* x */ |
407 | /* y: May be registered on sparc64 for global register dump */ | 423 | /* y: May be registered on sparc64 for global register dump */ |
408 | NULL, /* y */ | 424 | NULL, /* y */ |
409 | NULL /* z */ | 425 | &sysrq_ftrace_dump_op, /* z */ |
410 | }; | 426 | }; |
411 | 427 | ||
412 | /* key2index calculation, -1 on invalid index */ | 428 | /* key2index calculation, -1 on invalid index */ |