diff options
-rw-r--r-- | drivers/char/sysrq.c | 14 | ||||
-rw-r--r-- | include/linux/hrtimer.h | 3 |
2 files changed, 16 insertions, 1 deletions
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index be73c80d699d..1d8c4ae61551 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/workqueue.h> | 36 | #include <linux/workqueue.h> |
37 | #include <linux/kexec.h> | 37 | #include <linux/kexec.h> |
38 | #include <linux/irq.h> | 38 | #include <linux/irq.h> |
39 | #include <linux/hrtimer.h> | ||
39 | 40 | ||
40 | #include <asm/ptrace.h> | 41 | #include <asm/ptrace.h> |
41 | #include <asm/irq_regs.h> | 42 | #include <asm/irq_regs.h> |
@@ -158,6 +159,17 @@ static struct sysrq_key_op sysrq_sync_op = { | |||
158 | .enable_mask = SYSRQ_ENABLE_SYNC, | 159 | .enable_mask = SYSRQ_ENABLE_SYNC, |
159 | }; | 160 | }; |
160 | 161 | ||
162 | static void sysrq_handle_show_timers(int key, struct tty_struct *tty) | ||
163 | { | ||
164 | sysrq_timer_list_show(); | ||
165 | } | ||
166 | |||
167 | static struct sysrq_key_op sysrq_show_timers_op = { | ||
168 | .handler = sysrq_handle_show_timers, | ||
169 | .help_msg = "show-all-timers(Q)", | ||
170 | .action_msg = "Show Pending Timers", | ||
171 | }; | ||
172 | |||
161 | static void sysrq_handle_mountro(int key, struct tty_struct *tty) | 173 | static void sysrq_handle_mountro(int key, struct tty_struct *tty) |
162 | { | 174 | { |
163 | emergency_remount(); | 175 | emergency_remount(); |
@@ -335,7 +347,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = { | |||
335 | /* o: This will often be registered as 'Off' at init time */ | 347 | /* o: This will often be registered as 'Off' at init time */ |
336 | NULL, /* o */ | 348 | NULL, /* o */ |
337 | &sysrq_showregs_op, /* p */ | 349 | &sysrq_showregs_op, /* p */ |
338 | NULL, /* q */ | 350 | &sysrq_show_timers_op, /* q */ |
339 | &sysrq_unraw_op, /* r */ | 351 | &sysrq_unraw_op, /* r */ |
340 | &sysrq_sync_op, /* s */ | 352 | &sysrq_sync_op, /* s */ |
341 | &sysrq_showstate_op, /* t */ | 353 | &sysrq_showstate_op, /* t */ |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 93b8757c1ea2..37f9279192a9 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -316,6 +316,9 @@ extern unsigned long ktime_divns(const ktime_t kt, s64 div); | |||
316 | # define ktime_divns(kt, div) (unsigned long)((kt).tv64 / (div)) | 316 | # define ktime_divns(kt, div) (unsigned long)((kt).tv64 / (div)) |
317 | #endif | 317 | #endif |
318 | 318 | ||
319 | /* Show pending timers: */ | ||
320 | extern void sysrq_timer_list_show(void); | ||
321 | |||
319 | /* | 322 | /* |
320 | * Timer-statistics info: | 323 | * Timer-statistics info: |
321 | */ | 324 | */ |