[POWERPC] Add hugepagesz boot-time parameter
This adds the hugepagesz boot-time parameter for ppc64. It lets one pick the size for huge pages. The choices available are 64K and 16M when the base page size is 4k. It defaults to 16M (previously the only only choice) if nothing or an invalid choice is specified. Tested 64K huge pages successfully with the libhugetlbfs 1.2. Signed-off-by: Jon Tollefson <kniht@linux.vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
committed by
Paul Mackerras
parent
5b14e5f9dd
commit
4ec161cf73
@@ -369,18 +369,11 @@ static void __init htab_init_page_sizes(void)
|
||||
* on what is available
|
||||
*/
|
||||
if (mmu_psize_defs[MMU_PAGE_16M].shift)
|
||||
mmu_huge_psize = MMU_PAGE_16M;
|
||||
set_huge_psize(MMU_PAGE_16M);
|
||||
/* With 4k/4level pagetables, we can't (for now) cope with a
|
||||
* huge page size < PMD_SIZE */
|
||||
else if (mmu_psize_defs[MMU_PAGE_1M].shift)
|
||||
mmu_huge_psize = MMU_PAGE_1M;
|
||||
|
||||
/* Calculate HPAGE_SHIFT and sanity check it */
|
||||
if (mmu_psize_defs[mmu_huge_psize].shift > MIN_HUGEPTE_SHIFT &&
|
||||
mmu_psize_defs[mmu_huge_psize].shift < SID_SHIFT)
|
||||
HPAGE_SHIFT = mmu_psize_defs[mmu_huge_psize].shift;
|
||||
else
|
||||
HPAGE_SHIFT = 0; /* No huge pages dude ! */
|
||||
set_huge_psize(MMU_PAGE_1M);
|
||||
#endif /* CONFIG_HUGETLB_PAGE */
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user