diff options
Diffstat (limited to 'include/linux/tty.h')
| -rw-r--r-- | include/linux/tty.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h index 6abfcf5b5887..4409967db0c4 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -68,6 +68,17 @@ struct tty_buffer { | |||
| 68 | unsigned long data[0]; | 68 | unsigned long data[0]; |
| 69 | }; | 69 | }; |
| 70 | 70 | ||
| 71 | /* | ||
| 72 | * We default to dicing tty buffer allocations to this many characters | ||
| 73 | * in order to avoid multiple page allocations. We know the size of | ||
| 74 | * tty_buffer itself but it must also be taken into account that the | ||
| 75 | * the buffer is 256 byte aligned. See tty_buffer_find for the allocation | ||
| 76 | * logic this must match | ||
| 77 | */ | ||
| 78 | |||
| 79 | #define TTY_BUFFER_PAGE (((PAGE_SIZE - sizeof(struct tty_buffer)) / 2) & ~0xFF) | ||
| 80 | |||
| 81 | |||
| 71 | struct tty_bufhead { | 82 | struct tty_bufhead { |
| 72 | struct delayed_work work; | 83 | struct delayed_work work; |
| 73 | spinlock_t lock; | 84 | spinlock_t lock; |
| @@ -213,6 +224,7 @@ struct tty_port { | |||
| 213 | wait_queue_head_t close_wait; /* Close waiters */ | 224 | wait_queue_head_t close_wait; /* Close waiters */ |
| 214 | wait_queue_head_t delta_msr_wait; /* Modem status change */ | 225 | wait_queue_head_t delta_msr_wait; /* Modem status change */ |
| 215 | unsigned long flags; /* TTY flags ASY_*/ | 226 | unsigned long flags; /* TTY flags ASY_*/ |
| 227 | unsigned char console:1; /* port is a console */ | ||
| 216 | struct mutex mutex; /* Locking */ | 228 | struct mutex mutex; /* Locking */ |
| 217 | struct mutex buf_mutex; /* Buffer alloc lock */ | 229 | struct mutex buf_mutex; /* Buffer alloc lock */ |
| 218 | unsigned char *xmit_buf; /* Optional buffer */ | 230 | unsigned char *xmit_buf; /* Optional buffer */ |
| @@ -504,6 +516,7 @@ extern void tty_ldisc_enable(struct tty_struct *tty); | |||
| 504 | 516 | ||
| 505 | /* n_tty.c */ | 517 | /* n_tty.c */ |
| 506 | extern struct tty_ldisc_ops tty_ldisc_N_TTY; | 518 | extern struct tty_ldisc_ops tty_ldisc_N_TTY; |
| 519 | extern void n_tty_inherit_ops(struct tty_ldisc_ops *ops); | ||
| 507 | 520 | ||
| 508 | /* tty_audit.c */ | 521 | /* tty_audit.c */ |
| 509 | #ifdef CONFIG_AUDIT | 522 | #ifdef CONFIG_AUDIT |
