diff options
| author | David S. Miller <davem@davemloft.net> | 2010-03-22 20:05:26 -0700 | 
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2010-03-22 20:05:26 -0700 | 
| commit | 91c030b4d6445ebe9fbddb86d584441f300df15c (patch) | |
| tree | e8a48e3ad9e0448c690268175e555fa651983546 /include/linux/tty.h | |
| parent | 7c3456fdb503071787f7f972de1069b9cacd16f0 (diff) | |
| parent | ae6be51ed01d6c4aaf249a207b4434bc7785853b (diff) | |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'include/linux/tty.h')
| -rw-r--r-- | include/linux/tty.h | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/include/linux/tty.h b/include/linux/tty.h index 568369a86306..4409967db0c4 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -70,12 +70,13 @@ struct tty_buffer {  /*   * We default to dicing tty buffer allocations to this many characters - * in order to avoid multiple page allocations. We assume tty_buffer itself - * is under 256 bytes. See tty_buffer_find for the allocation logic this - * must match + * in order to avoid multiple page allocations. We know the size of + * tty_buffer itself but it must also be taken into account that the + * the buffer is 256 byte aligned. See tty_buffer_find for the allocation + * logic this must match   */ -#define TTY_BUFFER_PAGE		((PAGE_SIZE  - 256) / 2) +#define TTY_BUFFER_PAGE	(((PAGE_SIZE - sizeof(struct tty_buffer)) / 2) & ~0xFF)  struct tty_bufhead { @@ -223,6 +224,7 @@ struct tty_port {  	wait_queue_head_t	close_wait;	/* Close waiters */  	wait_queue_head_t	delta_msr_wait;	/* Modem status change */  	unsigned long		flags;		/* TTY flags ASY_*/ +	unsigned char		console:1;	/* port is a console */  	struct mutex		mutex;		/* Locking */  	struct mutex		buf_mutex;	/* Buffer alloc lock */  	unsigned char		*xmit_buf;	/* Optional buffer */ | 
