diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-02 14:32:06 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-02 14:32:06 -0400 |
| commit | 0de10f9ea67d1046b1e16c91fa26accf23939aab (patch) | |
| tree | 1255e106529d0c708b3744dfd10367a535bda6f9 /include/linux | |
| parent | a84270189e2afc7028b1123415a66d444f460977 (diff) | |
| parent | 828c6a102b1f2b8583fadc0e779c46b31d448f0b (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.h | 3 | ||||
| -rw-r--r-- | include/linux/serial_core.h | 7 | ||||
| -rw-r--r-- | include/linux/tty.h | 3 | ||||
| -rw-r--r-- | include/linux/tty_ldisc.h | 52 | ||||
| -rw-r--r-- | include/linux/vt_kern.h | 2 |
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 */ | |||
| 75 | extern const struct consw prom_con; /* SPARC PROM console */ | 75 | extern const struct consw prom_con; /* SPARC PROM console */ |
| 76 | 76 | ||
| 77 | int con_is_bound(const struct consw *csw); | 77 | int con_is_bound(const struct consw *csw); |
| 78 | int register_con_driver(const struct consw *csw, int first, int last); | ||
| 79 | int unregister_con_driver(const struct consw *csw); | ||
| 80 | int do_unregister_con_driver(const struct consw *csw); | 78 | int do_unregister_con_driver(const struct consw *csw); |
| 81 | int take_over_console(const struct consw *sw, int first, int last, int deflt); | ||
| 82 | int do_take_over_console(const struct consw *sw, int first, int last, int deflt); | 79 | int do_take_over_console(const struct consw *sw, int first, int last, int deflt); |
| 83 | void give_up_console(const struct consw *sw); | 80 | void 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 | |||
| 34 | struct uart_port; | 41 | struct uart_port; |
| 35 | struct serial_struct; | 42 | struct serial_struct; |
| 36 | struct device; | 43 | struct 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 | */ | ||
| 122 | struct 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 | |||
| 133 | extern void __init_ldsem(struct ld_semaphore *sem, const char *name, | ||
| 134 | struct lock_class_key *key); | ||
| 135 | |||
| 136 | #define init_ldsem(sem) \ | ||
| 137 | do { \ | ||
| 138 | static struct lock_class_key __key; \ | ||
| 139 | \ | ||
| 140 | __init_ldsem((sem), #sem, &__key); \ | ||
| 141 | } while (0) | ||
| 142 | |||
| 143 | |||
| 144 | extern int ldsem_down_read(struct ld_semaphore *sem, long timeout); | ||
| 145 | extern int ldsem_down_read_trylock(struct ld_semaphore *sem); | ||
| 146 | extern int ldsem_down_write(struct ld_semaphore *sem, long timeout); | ||
| 147 | extern int ldsem_down_write_trylock(struct ld_semaphore *sem); | ||
| 148 | extern void ldsem_up_read(struct ld_semaphore *sem); | ||
| 149 | extern void ldsem_up_write(struct ld_semaphore *sem); | ||
| 150 | |||
| 151 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
| 152 | extern int ldsem_down_read_nested(struct ld_semaphore *sem, int subclass, | ||
| 153 | long timeout); | ||
| 154 | extern 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 | |||
| 113 | struct tty_ldisc_ops { | 164 | struct 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); | |||
| 133 | void reset_vc(struct vc_data *vc); | 133 | void reset_vc(struct vc_data *vc); |
| 134 | extern int do_unbind_con_driver(const struct consw *csw, int first, int last, | 134 | extern int do_unbind_con_driver(const struct consw *csw, int first, int last, |
| 135 | int deflt); | 135 | int deflt); |
| 136 | extern int unbind_con_driver(const struct consw *csw, int first, int last, | ||
| 137 | int deflt); | ||
| 138 | int vty_init(const struct file_operations *console_fops); | 136 | int vty_init(const struct file_operations *console_fops); |
| 139 | 137 | ||
| 140 | static inline bool vt_force_oops_output(struct vc_data *vc) | 138 | static inline bool vt_force_oops_output(struct vc_data *vc) |
