aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPeter Watkins <treestem@gmail.com>2006-08-23 11:15:49 -0400
committerRalf Baechle <ralf@linux-mips.org>2006-09-27 08:37:52 -0400
commit9dbd7b9142e95867ee8a56da5d45c72884c107d3 (patch)
treea21e246155a5d4e779f161ea7595ada9b1f43a51 /include
parent663c3d9009c1a41194b8390abdcea61e3ade1c8f (diff)
[MIPS] Fix USER_PTRS_PER_PGD for 64K page size.
The code in pgtable-64.h assumes TASK_SIZE is always bigger than a first level PGDIR_SIZE. This is not the case for 64K pages, where task size is 40 bits (1TB) and a pgd entry can map 42 bits. This leads to USER_PTRS_PER_PGD being zero for 64K pages. Signed-off-by: Peter Watkins <treestem@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-mips/pgtable-64.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/asm-mips/pgtable-64.h b/include/asm-mips/pgtable-64.h
index c59a1e21f5b0..d05fb6f38aa7 100644
--- a/include/asm-mips/pgtable-64.h
+++ b/include/asm-mips/pgtable-64.h
@@ -93,8 +93,12 @@
93#define PTRS_PER_PMD ((PAGE_SIZE << PMD_ORDER) / sizeof(pmd_t)) 93#define PTRS_PER_PMD ((PAGE_SIZE << PMD_ORDER) / sizeof(pmd_t))
94#define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t)) 94#define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t))
95 95
96#if PGDIR_SIZE >= TASK_SIZE
97#define USER_PTRS_PER_PGD (1)
98#else
96#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE) 99#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
97#define FIRST_USER_ADDRESS 0 100#endif
101#define FIRST_USER_ADDRESS 0UL
98 102
99#define VMALLOC_START MAP_BASE 103#define VMALLOC_START MAP_BASE
100#define VMALLOC_END \ 104#define VMALLOC_END \