aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/hugetlbpage.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/mm/hugetlbpage.c')
-rw-r--r--arch/powerpc/mm/hugetlbpage.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 5df82186fc93..e2a650a9e533 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -110,6 +110,22 @@ pmd_t *hpmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long addr)
110} 110}
111#endif 111#endif
112 112
113/* Build list of addresses of gigantic pages. This function is used in early
114 * boot before the buddy or bootmem allocator is setup.
115 */
116void add_gpage(unsigned long addr, unsigned long page_size,
117 unsigned long number_of_pages)
118{
119 if (!addr)
120 return;
121 while (number_of_pages > 0) {
122 gpage_freearray[nr_gpages] = addr;
123 nr_gpages++;
124 number_of_pages--;
125 addr += page_size;
126 }
127}
128
113/* Moves the gigantic page addresses from the temporary list to the 129/* Moves the gigantic page addresses from the temporary list to the
114 * huge_boot_pages list. */ 130 * huge_boot_pages list. */
115int alloc_bootmem_huge_page(struct hstate *h) 131int alloc_bootmem_huge_page(struct hstate *h)