aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/tty.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 568369a86306..593228a520e1 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -70,12 +70,13 @@ struct tty_buffer {
70 70
71/* 71/*
72 * We default to dicing tty buffer allocations to this many characters 72 * We default to dicing tty buffer allocations to this many characters
73 * in order to avoid multiple page allocations. We assume tty_buffer itself 73 * in order to avoid multiple page allocations. We know the size of
74 * is under 256 bytes. See tty_buffer_find for the allocation logic this 74 * tty_buffer itself but it must also be taken into account that the
75 * must match 75 * the buffer is 256 byte aligned. See tty_buffer_find for the allocation
76 * logic this must match
76 */ 77 */
77 78
78#define TTY_BUFFER_PAGE ((PAGE_SIZE - 256) / 2) 79#define TTY_BUFFER_PAGE (((PAGE_SIZE - sizeof(struct tty_buffer)) / 2) & ~0xFF)
79 80
80 81
81struct tty_bufhead { 82struct tty_bufhead {