diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2007-03-29 04:20:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-29 11:22:24 -0400 |
commit | 602ed87ecd93a857dc687afb938d2c0f45552986 (patch) | |
tree | e6c3b134ec527669419df297e2844b93dcfd5255 | |
parent | d40f6d71da81deb66c4fa54b46e22977cdb8b451 (diff) |
[PATCH] uml: fix pte bit collision
_PAGE_PROTNONE conflicts with the lowest bit of pgoff. This causes all sorts
of weirdness when nonlinear mappings are used.
Took me a good half day to track this down.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Acked-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/asm-um/pgtable-2level.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/asm-um/pgtable-2level.h b/include/asm-um/pgtable-2level.h index 6050e0eb257e..172a75fde512 100644 --- a/include/asm-um/pgtable-2level.h +++ b/include/asm-um/pgtable-2level.h | |||
@@ -45,12 +45,12 @@ static inline void pgd_mkuptodate(pgd_t pgd) { } | |||
45 | ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) | 45 | ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) |
46 | 46 | ||
47 | /* | 47 | /* |
48 | * Bits 0 through 3 are taken | 48 | * Bits 0 through 4 are taken |
49 | */ | 49 | */ |
50 | #define PTE_FILE_MAX_BITS 28 | 50 | #define PTE_FILE_MAX_BITS 27 |
51 | 51 | ||
52 | #define pte_to_pgoff(pte) (pte_val(pte) >> 4) | 52 | #define pte_to_pgoff(pte) (pte_val(pte) >> 5) |
53 | 53 | ||
54 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 4) + _PAGE_FILE }) | 54 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 5) + _PAGE_FILE }) |
55 | 55 | ||
56 | #endif | 56 | #endif |