From 7b8d7e98639b9a7ce9eca639782bcb600f08e7c6 Mon Sep 17 00:00:00 2001 From: Mel Gorman Date: Tue, 2 Mar 2010 22:24:19 +0000 Subject: [PATCH] --- yaml --- r: 188808 b: refs/heads/master c: 352fa6ad16b89f8ffd1a93b4419b1a8f2259feab h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/tty.h | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 883b945ce220..d17719d4df28 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 87a6aca504d65f242589583e04df5e74b5eae1fe +refs/heads/master: 352fa6ad16b89f8ffd1a93b4419b1a8f2259feab diff --git a/trunk/include/linux/tty.h b/trunk/include/linux/tty.h index 568369a86306..593228a520e1 100644 --- a/trunk/include/linux/tty.h +++ b/trunk/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 {