aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hugetlb.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-06-05 06:28:59 -0400
committerDave Airlie <airlied@redhat.com>2014-06-05 06:28:59 -0400
commit8d4ad9d4bb0a618c975a32d77087694ec6336f68 (patch)
treed18d12688174a623e3503b11118e44ef8186c90b /include/linux/hugetlb.h
parent5ea1f752ae04be403a3dc8ec876a60d7f5f6990a (diff)
parent9e9a928eed8796a0a1aaed7e0b676db86ba84594 (diff)
Merge commit '9e9a928eed8796a0a1aaed7e0b676db86ba84594' into drm-next
Merge drm-fixes into drm-next. Both i915 and radeon need this done for later patches. Conflicts: drivers/gpu/drm/drm_crtc_helper.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_gem.c drivers/gpu/drm/i915/i915_gem_execbuffer.c drivers/gpu/drm/i915/i915_gem_gtt.c
Diffstat (limited to 'include/linux/hugetlb.h')
-rw-r--r--include/linux/hugetlb.h10
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
415static 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 */
416struct hstate {}; 426struct hstate {};
417#define alloc_huge_page_node(h, nid) NULL 427#define alloc_huge_page_node(h, nid) NULL