diff options
| author | Rob Herring <robh@kernel.org> | 2014-05-13 19:34:35 -0400 |
|---|---|---|
| committer | Rob Herring <robh@kernel.org> | 2014-05-13 19:34:35 -0400 |
| commit | eafd370dfe487facfdef499057f4eac9aa0b4bf5 (patch) | |
| tree | 0925a67cd658cdf4811f49b4cd2073f663166bd0 /include/linux/hugetlb.h | |
| parent | c3fc952d2fbe3ec78defd70cf73d5d76d27092ec (diff) | |
| parent | fb2caa50fbacd21719a90dd66b617ce3cb4fd6d7 (diff) | |
Merge branch 'dt-bus-name' into for-next
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, | |||
| 412 | return &mm->page_table_lock; | 412 | return &mm->page_table_lock; |
| 413 | } | 413 | } |
| 414 | 414 | ||
| 415 | static inline bool hugepages_supported(void) | ||
| 416 | { | ||
| 417 | /* | ||
| 418 | * Some platform decide whether they support huge pages at boot | ||
| 419 | * time. On these, such as powerpc, HPAGE_SHIFT is set to 0 when | ||
| 420 | * there is no such support | ||
| 421 | */ | ||
| 422 | return HPAGE_SHIFT != 0; | ||
| 423 | } | ||
| 424 | |||
| 415 | #else /* CONFIG_HUGETLB_PAGE */ | 425 | #else /* CONFIG_HUGETLB_PAGE */ |
| 416 | struct hstate {}; | 426 | struct hstate {}; |
| 417 | #define alloc_huge_page_node(h, nid) NULL | 427 | #define alloc_huge_page_node(h, nid) NULL |
