aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-02 14:32:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-02 14:32:06 -0400
commit0de10f9ea67d1046b1e16c91fa26accf23939aab (patch)
tree1255e106529d0c708b3744dfd10367a535bda6f9 /include/linux
parenta84270189e2afc7028b1123415a66d444f460977 (diff)
parent828c6a102b1f2b8583fadc0e779c46b31d448f0b (diff)
Merge tag 'tty-3.11-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 merge for 3.11-rc1. It's not all that big, nothing major changed in the tty api, which is a nice change, just a number of serial driver fixes and updates and new drivers, along with some n_tty fixes to help resolve some reported issues. All of these have been in the linux-next releases for a while, with the exception of the last revert patch, which was reported this past weekend by two different people as being needed." * tag 'tty-3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (51 commits) Revert "serial: 8250_pci: add support for another kind of NetMos Technology PCI 9835 Multi-I/O Controller" pch_uart: Add uart_clk selection for the MinnowBoard tty: atmel_serial: prepare clk before calling enable tty: Reset itty for other pty n_tty: Buffer work should not reschedule itself n_tty: Fix unsafe update of available buffer space n_tty: Untangle read completion variables n_tty: Encapsulate minimum_to_wake within N_TTY serial: omap: Fix device tree based PM runtime serial: imx: Fix serial clock unbalance serial/mpc52xx_uart: fix kernel panic when system reboot serial: mfd: Add sysrq support serial: imx: enable the clocks for console tty: serial: add Freescale lpuart driver support serial: imx: Improve Kconfig text serial: imx: Allow module build serial: imx: Fix warning when !CONFIG_SERIAL_IMX_CONSOLE tty/serial/sirf: fix error propagation in sirfsoc_uart_probe() serial: omap: fix potential NULL pointer dereference in serial_omap_runtime_suspend() tty: serial: Enable uartlite for ARM zynq ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/console.h3
-rw-r--r--include/linux/serial_core.h7
-rw-r--r--include/linux/tty.h3
-rw-r--r--include/linux/tty_ldisc.h52
-rw-r--r--include/linux/vt_kern.h2
5 files changed, 59 insertions, 8 deletions
diff --git a/include/linux/console.h b/include/linux/console.h
index 73bab0f58af5..7571a16bd653 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -75,10 +75,7 @@ extern const struct consw newport_con; /* SGI Newport console */
75extern const struct consw prom_con; /* SPARC PROM console */ 75extern const struct consw prom_con; /* SPARC PROM console */
76 76
77int con_is_bound(const struct consw *csw); 77int con_is_bound(const struct consw *csw);
78int register_con_driver(const struct consw *csw, int first, int last);
79int unregister_con_driver(const struct consw *csw);
80int do_unregister_con_driver(const struct consw *csw); 78int do_unregister_con_driver(const struct consw *csw);
81int take_over_console(const struct consw *sw, int first, int last, int deflt);
82int do_take_over_console(const struct consw *sw, int first, int last, int deflt); 79int do_take_over_console(const struct consw *sw, int first, int last, int deflt);
83void give_up_console(const struct consw *sw); 80void give_up_console(const struct consw *sw);
84#ifdef CONFIG_HW_CONSOLE 81#ifdef CONFIG_HW_CONSOLE
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 87d4bbc773fc..b98291ac7f14 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -31,6 +31,13 @@
31#include <linux/sysrq.h> 31#include <linux/sysrq.h>
32#include <uapi/linux/serial_core.h> 32#include <uapi/linux/serial_core.h>
33 33
34#ifdef CONFIG_SERIAL_CORE_CONSOLE
35#define uart_console(port) \
36 ((port)->cons && (port)->cons->index == (port)->line)
37#else
38#define uart_console(port) (0)
39#endif
40
34struct uart_port; 41struct uart_port;
35struct serial_struct; 42struct serial_struct;
36struct device; 43struct device;
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 8780bd2a272a..01ac30efd6a6 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -272,7 +272,6 @@ struct tty_struct {
272#define N_TTY_BUF_SIZE 4096 272#define N_TTY_BUF_SIZE 4096
273 273
274 unsigned char closing:1; 274 unsigned char closing:1;
275 unsigned short minimum_to_wake;
276 unsigned char *write_buf; 275 unsigned char *write_buf;
277 int write_cnt; 276 int write_cnt;
278 /* If the tty has a pending do_SAK, queue it here - akpm */ 277 /* If the tty has a pending do_SAK, queue it here - akpm */
@@ -309,8 +308,6 @@ struct tty_file_private {
309#define TTY_LDISC 9 /* Line discipline attached */ 308#define TTY_LDISC 9 /* Line discipline attached */
310#define TTY_LDISC_CHANGING 10 /* Line discipline changing */ 309#define TTY_LDISC_CHANGING 10 /* Line discipline changing */
311#define TTY_LDISC_OPEN 11 /* Line discipline is open */ 310#define TTY_LDISC_OPEN 11 /* Line discipline is open */
312#define TTY_HW_COOK_OUT 14 /* Hardware can do output cooking */
313#define TTY_HW_COOK_IN 15 /* Hardware can do input cooking */
314#define TTY_PTY_LOCK 16 /* pty private */ 311#define TTY_PTY_LOCK 16 /* pty private */
315#define TTY_NO_WRITE_SPLIT 17 /* Preserve write boundaries to driver */ 312#define TTY_NO_WRITE_SPLIT 17 /* Preserve write boundaries to driver */
316#define TTY_HUPPED 18 /* Post driver->hangup() */ 313#define TTY_HUPPED 18 /* Post driver->hangup() */
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h
index 58390c73df8b..a1b048999821 100644
--- a/include/linux/tty_ldisc.h
+++ b/include/linux/tty_ldisc.h
@@ -100,6 +100,11 @@
100 * seek to perform this action quickly but should wait until 100 * seek to perform this action quickly but should wait until
101 * any pending driver I/O is completed. 101 * any pending driver I/O is completed.
102 * 102 *
103 * void (*fasync)(struct tty_struct *, int on)
104 *
105 * Notify line discipline when signal-driven I/O is enabled or
106 * disabled.
107 *
103 * void (*dcd_change)(struct tty_struct *tty, unsigned int status) 108 * void (*dcd_change)(struct tty_struct *tty, unsigned int status)
104 * 109 *
105 * Tells the discipline that the DCD pin has changed its status. 110 * Tells the discipline that the DCD pin has changed its status.
@@ -110,6 +115,52 @@
110#include <linux/wait.h> 115#include <linux/wait.h>
111#include <linux/wait.h> 116#include <linux/wait.h>
112 117
118
119/*
120 * the semaphore definition
121 */
122struct ld_semaphore {
123 long count;
124 raw_spinlock_t wait_lock;
125 unsigned int wait_readers;
126 struct list_head read_wait;
127 struct list_head write_wait;
128#ifdef CONFIG_DEBUG_LOCK_ALLOC
129 struct lockdep_map dep_map;
130#endif
131};
132
133extern void __init_ldsem(struct ld_semaphore *sem, const char *name,
134 struct lock_class_key *key);
135
136#define init_ldsem(sem) \
137do { \
138 static struct lock_class_key __key; \
139 \
140 __init_ldsem((sem), #sem, &__key); \
141} while (0)
142
143
144extern int ldsem_down_read(struct ld_semaphore *sem, long timeout);
145extern int ldsem_down_read_trylock(struct ld_semaphore *sem);
146extern int ldsem_down_write(struct ld_semaphore *sem, long timeout);
147extern int ldsem_down_write_trylock(struct ld_semaphore *sem);
148extern void ldsem_up_read(struct ld_semaphore *sem);
149extern void ldsem_up_write(struct ld_semaphore *sem);
150
151#ifdef CONFIG_DEBUG_LOCK_ALLOC
152extern int ldsem_down_read_nested(struct ld_semaphore *sem, int subclass,
153 long timeout);
154extern int ldsem_down_write_nested(struct ld_semaphore *sem, int subclass,
155 long timeout);
156#else
157# define ldsem_down_read_nested(sem, subclass, timeout) \
158 ldsem_down_read(sem, timeout)
159# define ldsem_down_write_nested(sem, subclass, timeout) \
160 ldsem_down_write(sem, timeout)
161#endif
162
163
113struct tty_ldisc_ops { 164struct tty_ldisc_ops {
114 int magic; 165 int magic;
115 char *name; 166 char *name;
@@ -143,6 +194,7 @@ struct tty_ldisc_ops {
143 char *fp, int count); 194 char *fp, int count);
144 void (*write_wakeup)(struct tty_struct *); 195 void (*write_wakeup)(struct tty_struct *);
145 void (*dcd_change)(struct tty_struct *, unsigned int); 196 void (*dcd_change)(struct tty_struct *, unsigned int);
197 void (*fasync)(struct tty_struct *tty, int on);
146 198
147 struct module *owner; 199 struct module *owner;
148 200
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h
index 0d33fca48774..8d7634247fb4 100644
--- a/include/linux/vt_kern.h
+++ b/include/linux/vt_kern.h
@@ -133,8 +133,6 @@ void change_console(struct vc_data *new_vc);
133void reset_vc(struct vc_data *vc); 133void reset_vc(struct vc_data *vc);
134extern int do_unbind_con_driver(const struct consw *csw, int first, int last, 134extern int do_unbind_con_driver(const struct consw *csw, int first, int last,
135 int deflt); 135 int deflt);
136extern int unbind_con_driver(const struct consw *csw, int first, int last,
137 int deflt);
138int vty_init(const struct file_operations *console_fops); 136int vty_init(const struct file_operations *console_fops);
139 137
140static inline bool vt_force_oops_output(struct vc_data *vc) 138static inline bool vt_force_oops_output(struct vc_data *vc)