diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-06-07 23:24:07 -0700 | 
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-06-07 23:24:07 -0700 | 
| commit | a292241cccb7e20e8b997a9a44177e7c98141859 (patch) | |
| tree | a0b0bb95e7dce3233a2d8b203f9e326cdec7a00e /include/linux/hugetlb.h | |
| parent | d49cb7aeebb974713f9f7ab2991352d3050b095b (diff) | |
| parent | 68807a0c2015cb40df4869e16651f0ce5cc14d52 (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 3.16.
Diffstat (limited to 'include/linux/hugetlb.h')
| -rw-r--r-- | include/linux/hugetlb.h | 20 | 
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 8c43cc469d78..b65166de1d9d 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -6,6 +6,8 @@  #include <linux/fs.h>  #include <linux/hugetlb_inline.h>  #include <linux/cgroup.h> +#include <linux/list.h> +#include <linux/kref.h>  struct ctl_table;  struct user_struct; @@ -23,6 +25,14 @@ struct hugepage_subpool {  	long max_hpages, used_hpages;  }; +struct resv_map { +	struct kref refs; +	spinlock_t lock; +	struct list_head regions; +}; +extern struct resv_map *resv_map_alloc(void); +void resv_map_release(struct kref *ref); +  extern spinlock_t hugetlb_lock;  extern int hugetlb_max_hstate __read_mostly;  #define for_each_hstate(h) \ @@ -402,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  | 
