|
@@ -357,7 +357,7 @@ void add_gpage(u64 addr, u64 page_size, unsigned long number_of_pages)
|
|
int alloc_bootmem_huge_page(struct hstate *hstate)
|
|
int alloc_bootmem_huge_page(struct hstate *hstate)
|
|
{
|
|
{
|
|
struct huge_bootmem_page *m;
|
|
struct huge_bootmem_page *m;
|
|
- int idx = shift_to_mmu_psize(hstate->order + PAGE_SHIFT);
|
|
|
|
|
|
+ int idx = shift_to_mmu_psize(huge_page_shift(hstate));
|
|
int nr_gpages = gpage_freearray[idx].nr_gpages;
|
|
int nr_gpages = gpage_freearray[idx].nr_gpages;
|
|
|
|
|
|
if (nr_gpages == 0)
|
|
if (nr_gpages == 0)
|