diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 15:26:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 15:26:52 -0400 |
commit | 3498d13b8090c0b0ef911409fbc503a7c4cca6ef (patch) | |
tree | 254ca00276e863d9fba25707690c66b2a04c49e9 /kernel | |
parent | def7cb8cd4e3258db88050eaaca5438bcc3dafca (diff) | |
parent | 0c57dfcc6c1d037243c2f8fbf62eab3633326ec0 (diff) |
Merge tag 'tty-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull TTY changes from Greg Kroah-Hartman:
"As we skipped the merge window for 3.6-rc1 for the tty tree,
everything is now settled down and working properly, so we are ready
for 3.7-rc1. Here's the patchset, it's big, but the large changes are
removing a firmware file and adding a staging tty driver (it depended
on the tty core changes, so it's going through this tree instead of
the staging tree.)
All of these patches have been in the linux-next tree for a while.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
Fix up more-or-less trivial conflicts in
- drivers/char/pcmcia/synclink_cs.c:
tty NULL dereference fix vs tty_port_cts_enabled() helper function
- drivers/staging/{Kconfig,Makefile}:
add-add conflict (dgrp driver added close to other staging drivers)
- drivers/staging/ipack/devices/ipoctal.c:
"split ipoctal_channel from iopctal" vs "TTY: use tty_port_register_device"
* tag 'tty-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (235 commits)
tty/serial: Add kgdb_nmi driver
tty/serial/amba-pl011: Quiesce interrupts in poll_get_char
tty/serial/amba-pl011: Implement poll_init callback
tty/serial/core: Introduce poll_init callback
kdb: Turn KGDB_KDB=n stubs into static inlines
kdb: Implement disable_nmi command
kernel/debug: Mask KGDB NMI upon entry
serial: pl011: handle corruption at high clock speeds
serial: sccnxp: Make 'default' choice in switch last
serial: sccnxp: Remove mask termios caps for SW flow control
serial: sccnxp: Report actual baudrate back to core
serial: samsung: Add poll_get_char & poll_put_char
Powerpc 8xx CPM_UART setting MAXIDL register proportionaly to baud rate
Powerpc 8xx CPM_UART maxidl should not depend on fifo size
Powerpc 8xx CPM_UART too many interrupts
Powerpc 8xx CPM_UART desynchronisation
serial: set correct baud_base for EXSYS EX-41092 Dual 16950
serial: omap: fix the reciever line error case
8250: blacklist Winbond CIR port
8250_pnp: do pnp probe before legacy probe
...
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/debug/debug_core.c | 14 | ||||
-rw-r--r-- | kernel/debug/kdb/kdb_main.c | 31 |
2 files changed, 42 insertions, 3 deletions
diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c index 0557f24c6bca..17e073c309e6 100644 --- a/kernel/debug/debug_core.c +++ b/kernel/debug/debug_core.c | |||
@@ -672,6 +672,10 @@ kgdb_handle_exception(int evector, int signo, int ecode, struct pt_regs *regs) | |||
672 | { | 672 | { |
673 | struct kgdb_state kgdb_var; | 673 | struct kgdb_state kgdb_var; |
674 | struct kgdb_state *ks = &kgdb_var; | 674 | struct kgdb_state *ks = &kgdb_var; |
675 | int ret = 0; | ||
676 | |||
677 | if (arch_kgdb_ops.enable_nmi) | ||
678 | arch_kgdb_ops.enable_nmi(0); | ||
675 | 679 | ||
676 | ks->cpu = raw_smp_processor_id(); | 680 | ks->cpu = raw_smp_processor_id(); |
677 | ks->ex_vector = evector; | 681 | ks->ex_vector = evector; |
@@ -681,11 +685,15 @@ kgdb_handle_exception(int evector, int signo, int ecode, struct pt_regs *regs) | |||
681 | ks->linux_regs = regs; | 685 | ks->linux_regs = regs; |
682 | 686 | ||
683 | if (kgdb_reenter_check(ks)) | 687 | if (kgdb_reenter_check(ks)) |
684 | return 0; /* Ouch, double exception ! */ | 688 | goto out; /* Ouch, double exception ! */ |
685 | if (kgdb_info[ks->cpu].enter_kgdb != 0) | 689 | if (kgdb_info[ks->cpu].enter_kgdb != 0) |
686 | return 0; | 690 | goto out; |
687 | 691 | ||
688 | return kgdb_cpu_enter(ks, regs, DCPU_WANT_MASTER); | 692 | ret = kgdb_cpu_enter(ks, regs, DCPU_WANT_MASTER); |
693 | out: | ||
694 | if (arch_kgdb_ops.enable_nmi) | ||
695 | arch_kgdb_ops.enable_nmi(1); | ||
696 | return ret; | ||
689 | } | 697 | } |
690 | 698 | ||
691 | int kgdb_nmicallback(int cpu, void *regs) | 699 | int kgdb_nmicallback(int cpu, void *regs) |
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index 31df1706b9a9..1261dc7eaeb9 100644 --- a/kernel/debug/kdb/kdb_main.c +++ b/kernel/debug/kdb/kdb_main.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/smp.h> | 21 | #include <linux/smp.h> |
22 | #include <linux/utsname.h> | 22 | #include <linux/utsname.h> |
23 | #include <linux/vmalloc.h> | 23 | #include <linux/vmalloc.h> |
24 | #include <linux/atomic.h> | ||
24 | #include <linux/module.h> | 25 | #include <linux/module.h> |
25 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
26 | #include <linux/init.h> | 27 | #include <linux/init.h> |
@@ -2107,6 +2108,32 @@ static int kdb_dmesg(int argc, const char **argv) | |||
2107 | return 0; | 2108 | return 0; |
2108 | } | 2109 | } |
2109 | #endif /* CONFIG_PRINTK */ | 2110 | #endif /* CONFIG_PRINTK */ |
2111 | |||
2112 | /* Make sure we balance enable/disable calls, must disable first. */ | ||
2113 | static atomic_t kdb_nmi_disabled; | ||
2114 | |||
2115 | static int kdb_disable_nmi(int argc, const char *argv[]) | ||
2116 | { | ||
2117 | if (atomic_read(&kdb_nmi_disabled)) | ||
2118 | return 0; | ||
2119 | atomic_set(&kdb_nmi_disabled, 1); | ||
2120 | arch_kgdb_ops.enable_nmi(0); | ||
2121 | return 0; | ||
2122 | } | ||
2123 | |||
2124 | static int kdb_param_enable_nmi(const char *val, const struct kernel_param *kp) | ||
2125 | { | ||
2126 | if (!atomic_add_unless(&kdb_nmi_disabled, -1, 0)) | ||
2127 | return -EINVAL; | ||
2128 | arch_kgdb_ops.enable_nmi(1); | ||
2129 | return 0; | ||
2130 | } | ||
2131 | |||
2132 | static const struct kernel_param_ops kdb_param_ops_enable_nmi = { | ||
2133 | .set = kdb_param_enable_nmi, | ||
2134 | }; | ||
2135 | module_param_cb(enable_nmi, &kdb_param_ops_enable_nmi, NULL, 0600); | ||
2136 | |||
2110 | /* | 2137 | /* |
2111 | * kdb_cpu - This function implements the 'cpu' command. | 2138 | * kdb_cpu - This function implements the 'cpu' command. |
2112 | * cpu [<cpunum>] | 2139 | * cpu [<cpunum>] |
@@ -2851,6 +2878,10 @@ static void __init kdb_inittab(void) | |||
2851 | kdb_register_repeat("dmesg", kdb_dmesg, "[lines]", | 2878 | kdb_register_repeat("dmesg", kdb_dmesg, "[lines]", |
2852 | "Display syslog buffer", 0, KDB_REPEAT_NONE); | 2879 | "Display syslog buffer", 0, KDB_REPEAT_NONE); |
2853 | #endif | 2880 | #endif |
2881 | if (arch_kgdb_ops.enable_nmi) { | ||
2882 | kdb_register_repeat("disable_nmi", kdb_disable_nmi, "", | ||
2883 | "Disable NMI entry to KDB", 0, KDB_REPEAT_NONE); | ||
2884 | } | ||
2854 | kdb_register_repeat("defcmd", kdb_defcmd, "name \"usage\" \"help\"", | 2885 | kdb_register_repeat("defcmd", kdb_defcmd, "name \"usage\" \"help\"", |
2855 | "Define a set of commands, down to endefcmd", 0, KDB_REPEAT_NONE); | 2886 | "Define a set of commands, down to endefcmd", 0, KDB_REPEAT_NONE); |
2856 | kdb_register_repeat("kill", kdb_kill, "<-signal> <pid>", | 2887 | kdb_register_repeat("kill", kdb_kill, "<-signal> <pid>", |