]> err.no Git - linux-2.6/commitdiff
[PATCH] x86_64: fix USER_PTRS_PER_PGD
authorJan Beulich <jbeulich@novell.com>
Sun, 26 Feb 2006 03:18:25 +0000 (04:18 +0100)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 26 Feb 2006 17:53:30 +0000 (09:53 -0800)
The value, while currently unused in the native kernel, was off by one.

Signed-Off-By: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/asm-x86_64/pgtable.h

index 8fbf4dd72115da164273d16b90df27ff607638e1..715fd94cf5771b2ceedcbc26a972acee7dad7269 100644 (file)
@@ -131,7 +131,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long
 #define PGDIR_SIZE     (1UL << PGDIR_SHIFT)
 #define PGDIR_MASK     (~(PGDIR_SIZE-1))
 
-#define USER_PTRS_PER_PGD      (TASK_SIZE/PGDIR_SIZE)
+#define USER_PTRS_PER_PGD      ((TASK_SIZE-1)/PGDIR_SIZE+1)
 #define FIRST_USER_ADDRESS     0
 
 #ifndef __ASSEMBLY__