aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/kernel/etm.c2
-rw-r--r--arch/powerpc/xmon/xmon.c5
-rw-r--r--arch/sparc/kernel/process_64.c2
-rw-r--r--drivers/char/sysrq.c42
-rw-r--r--drivers/gpu/drm/drm_fb_helper.c2
-rw-r--r--drivers/net/ibm_newemac/debug.c2
-rw-r--r--include/linux/sysrq.h6
-rw-r--r--kernel/debug/debug_core.c2
-rw-r--r--kernel/power/poweroff.c2
9 files changed, 34 insertions, 31 deletions
diff --git a/arch/arm/kernel/etm.c b/arch/arm/kernel/etm.c
index 56418f98cd01..33c7077174db 100644
--- a/arch/arm/kernel/etm.c
+++ b/arch/arm/kernel/etm.c
@@ -230,7 +230,7 @@ static void etm_dump(void)
230 etb_lock(t); 230 etb_lock(t);
231} 231}
232 232
233static void sysrq_etm_dump(int key, struct tty_struct *tty) 233static void sysrq_etm_dump(int key)
234{ 234{
235 dev_dbg(tracer.dev, "Dumping ETB buffer\n"); 235 dev_dbg(tracer.dev, "Dumping ETB buffer\n");
236 etm_dump(); 236 etm_dump();
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 0554445200bf..d17d04cfb2cd 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -2880,15 +2880,14 @@ static void xmon_init(int enable)
2880} 2880}
2881 2881
2882#ifdef CONFIG_MAGIC_SYSRQ 2882#ifdef CONFIG_MAGIC_SYSRQ
2883static void sysrq_handle_xmon(int key, struct tty_struct *tty) 2883static void sysrq_handle_xmon(int key)
2884{ 2884{
2885 /* ensure xmon is enabled */ 2885 /* ensure xmon is enabled */
2886 xmon_init(1); 2886 xmon_init(1);
2887 debugger(get_irq_regs()); 2887 debugger(get_irq_regs());
2888} 2888}
2889 2889
2890static struct sysrq_key_op sysrq_xmon_op = 2890static struct sysrq_key_op sysrq_xmon_op = {
2891{
2892 .handler = sysrq_handle_xmon, 2891 .handler = sysrq_handle_xmon,
2893 .help_msg = "Xmon", 2892 .help_msg = "Xmon",
2894 .action_msg = "Entering xmon", 2893 .action_msg = "Entering xmon",
diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c
index dbe81a368b45..25b01b43b40d 100644
--- a/arch/sparc/kernel/process_64.c
+++ b/arch/sparc/kernel/process_64.c
@@ -303,7 +303,7 @@ void arch_trigger_all_cpu_backtrace(void)
303 303
304#ifdef CONFIG_MAGIC_SYSRQ 304#ifdef CONFIG_MAGIC_SYSRQ
305 305
306static void sysrq_handle_globreg(int key, struct tty_struct *tty) 306static void sysrq_handle_globreg(int key)
307{ 307{
308 arch_trigger_all_cpu_backtrace(); 308 arch_trigger_all_cpu_backtrace();
309} 309}
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index 878ac0c2cc68..a892a3c249dd 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -76,7 +76,7 @@ static int __init sysrq_always_enabled_setup(char *str)
76__setup("sysrq_always_enabled", sysrq_always_enabled_setup); 76__setup("sysrq_always_enabled", sysrq_always_enabled_setup);
77 77
78 78
79static void sysrq_handle_loglevel(int key, struct tty_struct *tty) 79static void sysrq_handle_loglevel(int key)
80{ 80{
81 int i; 81 int i;
82 82
@@ -93,7 +93,7 @@ static struct sysrq_key_op sysrq_loglevel_op = {
93}; 93};
94 94
95#ifdef CONFIG_VT 95#ifdef CONFIG_VT
96static void sysrq_handle_SAK(int key, struct tty_struct *tty) 96static void sysrq_handle_SAK(int key)
97{ 97{
98 struct work_struct *SAK_work = &vc_cons[fg_console].SAK_work; 98 struct work_struct *SAK_work = &vc_cons[fg_console].SAK_work;
99 schedule_work(SAK_work); 99 schedule_work(SAK_work);
@@ -109,7 +109,7 @@ static struct sysrq_key_op sysrq_SAK_op = {
109#endif 109#endif
110 110
111#ifdef CONFIG_VT 111#ifdef CONFIG_VT
112static void sysrq_handle_unraw(int key, struct tty_struct *tty) 112static void sysrq_handle_unraw(int key)
113{ 113{
114 struct kbd_struct *kbd = &kbd_table[fg_console]; 114 struct kbd_struct *kbd = &kbd_table[fg_console];
115 115
@@ -126,7 +126,7 @@ static struct sysrq_key_op sysrq_unraw_op = {
126#define sysrq_unraw_op (*(struct sysrq_key_op *)NULL) 126#define sysrq_unraw_op (*(struct sysrq_key_op *)NULL)
127#endif /* CONFIG_VT */ 127#endif /* CONFIG_VT */
128 128
129static void sysrq_handle_crash(int key, struct tty_struct *tty) 129static void sysrq_handle_crash(int key)
130{ 130{
131 char *killer = NULL; 131 char *killer = NULL;
132 132
@@ -141,7 +141,7 @@ static struct sysrq_key_op sysrq_crash_op = {
141 .enable_mask = SYSRQ_ENABLE_DUMP, 141 .enable_mask = SYSRQ_ENABLE_DUMP,
142}; 142};
143 143
144static void sysrq_handle_reboot(int key, struct tty_struct *tty) 144static void sysrq_handle_reboot(int key)
145{ 145{
146 lockdep_off(); 146 lockdep_off();
147 local_irq_enable(); 147 local_irq_enable();
@@ -154,7 +154,7 @@ static struct sysrq_key_op sysrq_reboot_op = {
154 .enable_mask = SYSRQ_ENABLE_BOOT, 154 .enable_mask = SYSRQ_ENABLE_BOOT,
155}; 155};
156 156
157static void sysrq_handle_sync(int key, struct tty_struct *tty) 157static void sysrq_handle_sync(int key)
158{ 158{
159 emergency_sync(); 159 emergency_sync();
160} 160}
@@ -165,7 +165,7 @@ static struct sysrq_key_op sysrq_sync_op = {
165 .enable_mask = SYSRQ_ENABLE_SYNC, 165 .enable_mask = SYSRQ_ENABLE_SYNC,
166}; 166};
167 167
168static void sysrq_handle_show_timers(int key, struct tty_struct *tty) 168static void sysrq_handle_show_timers(int key)
169{ 169{
170 sysrq_timer_list_show(); 170 sysrq_timer_list_show();
171} 171}
@@ -176,7 +176,7 @@ static struct sysrq_key_op sysrq_show_timers_op = {
176 .action_msg = "Show clockevent devices & pending hrtimers (no others)", 176 .action_msg = "Show clockevent devices & pending hrtimers (no others)",
177}; 177};
178 178
179static void sysrq_handle_mountro(int key, struct tty_struct *tty) 179static void sysrq_handle_mountro(int key)
180{ 180{
181 emergency_remount(); 181 emergency_remount();
182} 182}
@@ -188,7 +188,7 @@ static struct sysrq_key_op sysrq_mountro_op = {
188}; 188};
189 189
190#ifdef CONFIG_LOCKDEP 190#ifdef CONFIG_LOCKDEP
191static void sysrq_handle_showlocks(int key, struct tty_struct *tty) 191static void sysrq_handle_showlocks(int key)
192{ 192{
193 debug_show_all_locks(); 193 debug_show_all_locks();
194} 194}
@@ -226,7 +226,7 @@ static void sysrq_showregs_othercpus(struct work_struct *dummy)
226 226
227static DECLARE_WORK(sysrq_showallcpus, sysrq_showregs_othercpus); 227static DECLARE_WORK(sysrq_showallcpus, sysrq_showregs_othercpus);
228 228
229static void sysrq_handle_showallcpus(int key, struct tty_struct *tty) 229static void sysrq_handle_showallcpus(int key)
230{ 230{
231 /* 231 /*
232 * Fall back to the workqueue based printing if the 232 * Fall back to the workqueue based printing if the
@@ -252,7 +252,7 @@ static struct sysrq_key_op sysrq_showallcpus_op = {
252}; 252};
253#endif 253#endif
254 254
255static void sysrq_handle_showregs(int key, struct tty_struct *tty) 255static void sysrq_handle_showregs(int key)
256{ 256{
257 struct pt_regs *regs = get_irq_regs(); 257 struct pt_regs *regs = get_irq_regs();
258 if (regs) 258 if (regs)
@@ -266,7 +266,7 @@ static struct sysrq_key_op sysrq_showregs_op = {
266 .enable_mask = SYSRQ_ENABLE_DUMP, 266 .enable_mask = SYSRQ_ENABLE_DUMP,
267}; 267};
268 268
269static void sysrq_handle_showstate(int key, struct tty_struct *tty) 269static void sysrq_handle_showstate(int key)
270{ 270{
271 show_state(); 271 show_state();
272} 272}
@@ -277,7 +277,7 @@ static struct sysrq_key_op sysrq_showstate_op = {
277 .enable_mask = SYSRQ_ENABLE_DUMP, 277 .enable_mask = SYSRQ_ENABLE_DUMP,
278}; 278};
279 279
280static void sysrq_handle_showstate_blocked(int key, struct tty_struct *tty) 280static void sysrq_handle_showstate_blocked(int key)
281{ 281{
282 show_state_filter(TASK_UNINTERRUPTIBLE); 282 show_state_filter(TASK_UNINTERRUPTIBLE);
283} 283}
@@ -291,7 +291,7 @@ static struct sysrq_key_op sysrq_showstate_blocked_op = {
291#ifdef CONFIG_TRACING 291#ifdef CONFIG_TRACING
292#include <linux/ftrace.h> 292#include <linux/ftrace.h>
293 293
294static void sysrq_ftrace_dump(int key, struct tty_struct *tty) 294static void sysrq_ftrace_dump(int key)
295{ 295{
296 ftrace_dump(DUMP_ALL); 296 ftrace_dump(DUMP_ALL);
297} 297}
@@ -305,7 +305,7 @@ static struct sysrq_key_op sysrq_ftrace_dump_op = {
305#define sysrq_ftrace_dump_op (*(struct sysrq_key_op *)NULL) 305#define sysrq_ftrace_dump_op (*(struct sysrq_key_op *)NULL)
306#endif 306#endif
307 307
308static void sysrq_handle_showmem(int key, struct tty_struct *tty) 308static void sysrq_handle_showmem(int key)
309{ 309{
310 show_mem(); 310 show_mem();
311} 311}
@@ -330,7 +330,7 @@ static void send_sig_all(int sig)
330 } 330 }
331} 331}
332 332
333static void sysrq_handle_term(int key, struct tty_struct *tty) 333static void sysrq_handle_term(int key)
334{ 334{
335 send_sig_all(SIGTERM); 335 send_sig_all(SIGTERM);
336 console_loglevel = 8; 336 console_loglevel = 8;
@@ -349,7 +349,7 @@ static void moom_callback(struct work_struct *ignored)
349 349
350static DECLARE_WORK(moom_work, moom_callback); 350static DECLARE_WORK(moom_work, moom_callback);
351 351
352static void sysrq_handle_moom(int key, struct tty_struct *tty) 352static void sysrq_handle_moom(int key)
353{ 353{
354 schedule_work(&moom_work); 354 schedule_work(&moom_work);
355} 355}
@@ -361,7 +361,7 @@ static struct sysrq_key_op sysrq_moom_op = {
361}; 361};
362 362
363#ifdef CONFIG_BLOCK 363#ifdef CONFIG_BLOCK
364static void sysrq_handle_thaw(int key, struct tty_struct *tty) 364static void sysrq_handle_thaw(int key)
365{ 365{
366 emergency_thaw_all(); 366 emergency_thaw_all();
367} 367}
@@ -373,7 +373,7 @@ static struct sysrq_key_op sysrq_thaw_op = {
373}; 373};
374#endif 374#endif
375 375
376static void sysrq_handle_kill(int key, struct tty_struct *tty) 376static void sysrq_handle_kill(int key)
377{ 377{
378 send_sig_all(SIGKILL); 378 send_sig_all(SIGKILL);
379 console_loglevel = 8; 379 console_loglevel = 8;
@@ -385,7 +385,7 @@ static struct sysrq_key_op sysrq_kill_op = {
385 .enable_mask = SYSRQ_ENABLE_SIGNAL, 385 .enable_mask = SYSRQ_ENABLE_SIGNAL,
386}; 386};
387 387
388static void sysrq_handle_unrt(int key, struct tty_struct *tty) 388static void sysrq_handle_unrt(int key)
389{ 389{
390 normalize_rt_tasks(); 390 normalize_rt_tasks();
391} 391}
@@ -520,7 +520,7 @@ void __handle_sysrq(int key, struct tty_struct *tty, int check_mask)
520 if (!check_mask || sysrq_on_mask(op_p->enable_mask)) { 520 if (!check_mask || sysrq_on_mask(op_p->enable_mask)) {
521 printk("%s\n", op_p->action_msg); 521 printk("%s\n", op_p->action_msg);
522 console_loglevel = orig_log_level; 522 console_loglevel = orig_log_level;
523 op_p->handler(key, tty); 523 op_p->handler(key);
524 } else { 524 } else {
525 printk("This sysrq operation is disabled.\n"); 525 printk("This sysrq operation is disabled.\n");
526 } 526 }
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index de82e201d682..5efd6d6742ec 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -369,7 +369,7 @@ static void drm_fb_helper_restore_work_fn(struct work_struct *ignored)
369} 369}
370static DECLARE_WORK(drm_fb_helper_restore_work, drm_fb_helper_restore_work_fn); 370static DECLARE_WORK(drm_fb_helper_restore_work, drm_fb_helper_restore_work_fn);
371 371
372static void drm_fb_helper_sysrq(int dummy1, struct tty_struct *dummy3) 372static void drm_fb_helper_sysrq(int dummy1)
373{ 373{
374 schedule_work(&drm_fb_helper_restore_work); 374 schedule_work(&drm_fb_helper_restore_work);
375} 375}
diff --git a/drivers/net/ibm_newemac/debug.c b/drivers/net/ibm_newemac/debug.c
index 3995fafc1e08..8c6c1e2a8750 100644
--- a/drivers/net/ibm_newemac/debug.c
+++ b/drivers/net/ibm_newemac/debug.c
@@ -238,7 +238,7 @@ void emac_dbg_dump_all(void)
238} 238}
239 239
240#if defined(CONFIG_MAGIC_SYSRQ) 240#if defined(CONFIG_MAGIC_SYSRQ)
241static void emac_sysrq_handler(int key, struct tty_struct *tty) 241static void emac_sysrq_handler(int key)
242{ 242{
243 emac_dbg_dump_all(); 243 emac_dbg_dump_all();
244} 244}
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h
index 609e8ca5f534..4ee650315119 100644
--- a/include/linux/sysrq.h
+++ b/include/linux/sysrq.h
@@ -31,7 +31,7 @@ struct tty_struct;
31#define SYSRQ_ENABLE_RTNICE 0x0100 31#define SYSRQ_ENABLE_RTNICE 0x0100
32 32
33struct sysrq_key_op { 33struct sysrq_key_op {
34 void (*handler)(int, struct tty_struct *); 34 void (*handler)(int);
35 char *help_msg; 35 char *help_msg;
36 char *action_msg; 36 char *action_msg;
37 int enable_mask; 37 int enable_mask;
@@ -58,6 +58,10 @@ static inline void handle_sysrq(int key, struct tty_struct *tty)
58{ 58{
59} 59}
60 60
61static inline void __handle_sysrq(int key, struct tty_struct *tty, int check_mask);
62{
63}
64
61static inline int register_sysrq_key(int key, struct sysrq_key_op *op) 65static inline int register_sysrq_key(int key, struct sysrq_key_op *op)
62{ 66{
63 return -EINVAL; 67 return -EINVAL;
diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c
index 3c2d4972d235..de407c78178d 100644
--- a/kernel/debug/debug_core.c
+++ b/kernel/debug/debug_core.c
@@ -741,7 +741,7 @@ static struct console kgdbcons = {
741}; 741};
742 742
743#ifdef CONFIG_MAGIC_SYSRQ 743#ifdef CONFIG_MAGIC_SYSRQ
744static void sysrq_handle_dbg(int key, struct tty_struct *tty) 744static void sysrq_handle_dbg(int key)
745{ 745{
746 if (!dbg_io_ops) { 746 if (!dbg_io_ops) {
747 printk(KERN_CRIT "ERROR: No KGDB I/O module available\n"); 747 printk(KERN_CRIT "ERROR: No KGDB I/O module available\n");
diff --git a/kernel/power/poweroff.c b/kernel/power/poweroff.c
index e8b337006276..d52359374e85 100644
--- a/kernel/power/poweroff.c
+++ b/kernel/power/poweroff.c
@@ -24,7 +24,7 @@ static void do_poweroff(struct work_struct *dummy)
24 24
25static DECLARE_WORK(poweroff_work, do_poweroff); 25static DECLARE_WORK(poweroff_work, do_poweroff);
26 26
27static void handle_poweroff(int key, struct tty_struct *tty) 27static void handle_poweroff(int key)
28{ 28{
29 /* run sysrq poweroff on boot cpu */ 29 /* run sysrq poweroff on boot cpu */
30 schedule_work_on(cpumask_first(cpu_online_mask), &poweroff_work); 30 schedule_work_on(cpumask_first(cpu_online_mask), &poweroff_work);