diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-14 00:05:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-14 00:05:31 -0500 |
commit | fb0255fb2941ef6f21742b2bc146d6b9aef4fedc (patch) | |
tree | 8334f3485152b1c887ddfe04ba9a95c8a704481c /drivers/tty/sysrq.c | |
parent | 449fcf3ab0baf3dde9952385e6789f2ca10c3980 (diff) | |
parent | 57f5d648c45c3d40a3257c06629c14fd53c383bc (diff) |
Merge tag 'tty-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial updates from Greg KH:
"Here is the big tty/serial driver pull request for 4.15-rc1.
Lots of serial driver updates in here, some small vt cleanups, and a
raft of SPDX and license boilerplate cleanups, messing up the diffstat
a bit.
Nothing major, with no realy functional changes except better hardware
support for some platforms.
All of these have been in linux-next for a while with no reported
issues"
* tag 'tty-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (110 commits)
tty: ehv_bytechan: fix spelling mistake
tty: serial: meson: allow baud-rates lower than 9600
serial: 8250_fintek: Fix crash with baud rate B0
serial: 8250_fintek: Disable delays for ports != 0
serial: 8250_fintek: Return -EINVAL on invalid configuration
tty: Remove redundant license text
tty: serdev: Remove redundant license text
tty: hvc: Remove redundant license text
tty: serial: Remove redundant license text
tty: add SPDX identifiers to all remaining files in drivers/tty/
tty: serial: jsm: remove redundant pointer ts
tty: serial: jsm: add space before the open parenthesis '('
tty: serial: jsm: fix coding style
tty: serial: jsm: delete space between function name and '('
tty: serial: jsm: add blank line after declarations
tty: serial: jsm: change the type of local variable
tty: serial: imx: remove dead code imx_dma_rxint
tty: serial: imx: disable ageing timer interrupt if dma in use
serial: 8250: fix potential deadlock in rs485-mode
serial: m32r_sio: Drop redundant .data assignment
...
Diffstat (limited to 'drivers/tty/sysrq.c')
-rw-r--r-- | drivers/tty/sysrq.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index d008f5a75197..b674793be478 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c | |||
@@ -246,8 +246,10 @@ static void sysrq_handle_showallcpus(int key) | |||
246 | * architecture has no support for it: | 246 | * architecture has no support for it: |
247 | */ | 247 | */ |
248 | if (!trigger_all_cpu_backtrace()) { | 248 | if (!trigger_all_cpu_backtrace()) { |
249 | struct pt_regs *regs = get_irq_regs(); | 249 | struct pt_regs *regs = NULL; |
250 | 250 | ||
251 | if (in_irq()) | ||
252 | regs = get_irq_regs(); | ||
251 | if (regs) { | 253 | if (regs) { |
252 | pr_info("CPU%d:\n", smp_processor_id()); | 254 | pr_info("CPU%d:\n", smp_processor_id()); |
253 | show_regs(regs); | 255 | show_regs(regs); |
@@ -266,7 +268,10 @@ static struct sysrq_key_op sysrq_showallcpus_op = { | |||
266 | 268 | ||
267 | static void sysrq_handle_showregs(int key) | 269 | static void sysrq_handle_showregs(int key) |
268 | { | 270 | { |
269 | struct pt_regs *regs = get_irq_regs(); | 271 | struct pt_regs *regs = NULL; |
272 | |||
273 | if (in_irq()) | ||
274 | regs = get_irq_regs(); | ||
270 | if (regs) | 275 | if (regs) |
271 | show_regs(regs); | 276 | show_regs(regs); |
272 | perf_event_print_debug(); | 277 | perf_event_print_debug(); |
@@ -649,9 +654,9 @@ static void sysrq_parse_reset_sequence(struct sysrq_state *state) | |||
649 | state->reset_seq_version = sysrq_reset_seq_version; | 654 | state->reset_seq_version = sysrq_reset_seq_version; |
650 | } | 655 | } |
651 | 656 | ||
652 | static void sysrq_do_reset(unsigned long _state) | 657 | static void sysrq_do_reset(struct timer_list *t) |
653 | { | 658 | { |
654 | struct sysrq_state *state = (struct sysrq_state *) _state; | 659 | struct sysrq_state *state = from_timer(state, t, keyreset_timer); |
655 | 660 | ||
656 | state->reset_requested = true; | 661 | state->reset_requested = true; |
657 | 662 | ||
@@ -668,7 +673,7 @@ static void sysrq_handle_reset_request(struct sysrq_state *state) | |||
668 | mod_timer(&state->keyreset_timer, | 673 | mod_timer(&state->keyreset_timer, |
669 | jiffies + msecs_to_jiffies(sysrq_reset_downtime_ms)); | 674 | jiffies + msecs_to_jiffies(sysrq_reset_downtime_ms)); |
670 | else | 675 | else |
671 | sysrq_do_reset((unsigned long)state); | 676 | sysrq_do_reset(&state->keyreset_timer); |
672 | } | 677 | } |
673 | 678 | ||
674 | static void sysrq_detect_reset_sequence(struct sysrq_state *state, | 679 | static void sysrq_detect_reset_sequence(struct sysrq_state *state, |
@@ -904,8 +909,7 @@ static int sysrq_connect(struct input_handler *handler, | |||
904 | sysrq->handle.handler = handler; | 909 | sysrq->handle.handler = handler; |
905 | sysrq->handle.name = "sysrq"; | 910 | sysrq->handle.name = "sysrq"; |
906 | sysrq->handle.private = sysrq; | 911 | sysrq->handle.private = sysrq; |
907 | setup_timer(&sysrq->keyreset_timer, | 912 | timer_setup(&sysrq->keyreset_timer, sysrq_do_reset, 0); |
908 | sysrq_do_reset, (unsigned long)sysrq); | ||
909 | 913 | ||
910 | error = input_register_handle(&sysrq->handle); | 914 | error = input_register_handle(&sysrq->handle); |
911 | if (error) { | 915 | if (error) { |