diff options
Diffstat (limited to 'include/linux/hugetlb.h')
| -rw-r--r-- | include/linux/hugetlb.h | 10 | 
1 files changed, 10 insertions, 0 deletions
| diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 5b337cf8fb86..b65166de1d9d 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -412,6 +412,16 @@ static inline spinlock_t *huge_pte_lockptr(struct hstate *h,  	return &mm->page_table_lock;  } +static inline bool hugepages_supported(void) +{ +	/* +	 * Some platform decide whether they support huge pages at boot +	 * time. On these, such as powerpc, HPAGE_SHIFT is set to 0 when +	 * there is no such support +	 */ +	return HPAGE_SHIFT != 0; +} +  #else	/* CONFIG_HUGETLB_PAGE */  struct hstate {};  #define alloc_huge_page_node(h, nid) NULL |