aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/hash_utils_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/mm/hash_utils_64.c')
-rw-r--r--arch/powerpc/mm/hash_utils_64.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 37273f518a35..3d83c3b84f0e 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -328,12 +328,14 @@ static void __init htab_init_page_sizes(void)
328 */ 328 */
329 if (mmu_psize_defs[MMU_PAGE_16M].shift) 329 if (mmu_psize_defs[MMU_PAGE_16M].shift)
330 mmu_huge_psize = MMU_PAGE_16M; 330 mmu_huge_psize = MMU_PAGE_16M;
331 /* With 4k/4level pagetables, we can't (for now) cope with a
332 * huge page size < PMD_SIZE */
331 else if (mmu_psize_defs[MMU_PAGE_1M].shift) 333 else if (mmu_psize_defs[MMU_PAGE_1M].shift)
332 mmu_huge_psize = MMU_PAGE_1M; 334 mmu_huge_psize = MMU_PAGE_1M;
333 335
334 /* Calculate HPAGE_SHIFT and sanity check it */ 336 /* Calculate HPAGE_SHIFT and sanity check it */
335 if (mmu_psize_defs[mmu_huge_psize].shift > 16 && 337 if (mmu_psize_defs[mmu_huge_psize].shift > MIN_HUGEPTE_SHIFT &&
336 mmu_psize_defs[mmu_huge_psize].shift < 28) 338 mmu_psize_defs[mmu_huge_psize].shift < SID_SHIFT)
337 HPAGE_SHIFT = mmu_psize_defs[mmu_huge_psize].shift; 339 HPAGE_SHIFT = mmu_psize_defs[mmu_huge_psize].shift;
338 else 340 else
339 HPAGE_SHIFT = 0; /* No huge pages dude ! */ 341 HPAGE_SHIFT = 0; /* No huge pages dude ! */