summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/pgtable-hash64.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2016-04-29 15:25:49 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2016-05-01 10:32:48 +0200
commitdd1842a2a448bb66d74aa02a550df6be8c25f20b (patch)
treee61fb71a8d15ebaed3479e1a09ae97796d252ea2 /arch/powerpc/mm/pgtable-hash64.c
parentpowerpc/mm: Move pte accessors that operate on common pte bits to pgtable.h (diff)
downloadlinux-dd1842a2a448bb66d74aa02a550df6be8c25f20b.tar.xz
linux-dd1842a2a448bb66d74aa02a550df6be8c25f20b.zip
powerpc/mm: Make page table size a variable
Radix and hash MMU models support different page table sizes. Make the #defines a variable so that existing code can work with variable sizes. Slice related code is only used by hash, so use hash constants there. We will replicate some of the boundary conditions with resepct to TASK_SIZE using radix values too. Right now we do boundary condition check using hash constants. Swapper pgdir size is initialized in asm code. We select the max pgd size to keep it simple. For now we select hash pgdir. When adding radix we will switch that to radix pgdir which is 64K. BUILD_BUG_ON check which is removed is already done in hugepage_init() using MAYBE_BUILD_BUG_ON(). Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm/pgtable-hash64.c')
-rw-r--r--arch/powerpc/mm/pgtable-hash64.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/mm/pgtable-hash64.c b/arch/powerpc/mm/pgtable-hash64.c
index f405a67c807a..6f5fa68c784e 100644
--- a/arch/powerpc/mm/pgtable-hash64.c
+++ b/arch/powerpc/mm/pgtable-hash64.c
@@ -61,6 +61,7 @@ int map_kernel_page(unsigned long ea, unsigned long pa, unsigned long flags)
pmd_t *pmdp;
pte_t *ptep;
+ BUILD_BUG_ON(TASK_SIZE_USER64 > H_PGTABLE_RANGE);
if (slab_is_available()) {
pgdp = pgd_offset_k(ea);
pudp = pud_alloc(&init_mm, pgdp, ea);