static __init int gigantic_pages_init(void) { /* With CMA we can allocate gigantic pages at runtime */ if (cpu_has_gbpages && !size_to_hstate(1UL << PUD_SHIFT)) hugetlb_add_hstate(PUD_SHIFT - PAGE_SHIFT); return 0; }
static void __init add_huge_page_size(unsigned long size) { if (size_to_hstate(size)) return; hugetlb_add_hstate(ilog2(size) - PAGE_SHIFT); }
static __init int gigantic_pages_init(void) { /* With compaction or CMA we can allocate gigantic pages at runtime */ if (boot_cpu_has(X86_FEATURE_GBPAGES) && !size_to_hstate(1UL << PUD_SHIFT)) hugetlb_add_hstate(PUD_SHIFT - PAGE_SHIFT); return 0; }
static __init int add_default_hugepagesz(void) { if (size_to_hstate(CONT_PTES * PAGE_SIZE) == NULL) hugetlb_add_hstate(CONT_PTE_SHIFT); return 0; }