Commit 9114fe8c authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman

tty: Remove private constant from global namespace

TTY_BUFFER_PAGE is only used within drivers/tty/tty_buffer.c;
relocate to that file scope.
Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a7c8d58c
...@@ -28,6 +28,16 @@ ...@@ -28,6 +28,16 @@
*/ */
#define TTYB_MEM_LIMIT 65536 #define TTYB_MEM_LIMIT 65536
/*
* We default to dicing tty buffer allocations to this many characters
* 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 - sizeof(struct tty_buffer)) / 2) & ~0xFF)
/** /**
* tty_buffer_lock_exclusive - gain exclusive access to buffer * tty_buffer_lock_exclusive - gain exclusive access to buffer
......
...@@ -53,17 +53,6 @@ static inline char *flag_buf_ptr(struct tty_buffer *b, int ofs) ...@@ -53,17 +53,6 @@ static inline char *flag_buf_ptr(struct tty_buffer *b, int ofs)
return (char *)char_buf_ptr(b, ofs) + b->size; return (char *)char_buf_ptr(b, ofs) + b->size;
} }
/*
* We default to dicing tty buffer allocations to this many characters
* 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 - sizeof(struct tty_buffer)) / 2) & ~0xFF)
struct tty_bufhead { struct tty_bufhead {
struct tty_buffer *head; /* Queue head */ struct tty_buffer *head; /* Queue head */
struct work_struct work; struct work_struct work;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment