diff options
Diffstat (limited to 'include/linux/hugetlb.h')
-rw-r--r-- | include/linux/hugetlb.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 82a25880714a..36fa6a2a82e3 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -119,6 +119,7 @@ long hugetlb_unreserve_pages(struct inode *inode, long start, long end, | |||
119 | long freed); | 119 | long freed); |
120 | bool isolate_huge_page(struct page *page, struct list_head *list); | 120 | bool isolate_huge_page(struct page *page, struct list_head *list); |
121 | void putback_active_hugepage(struct page *page); | 121 | void putback_active_hugepage(struct page *page); |
122 | void move_hugetlb_state(struct page *oldpage, struct page *newpage, int reason); | ||
122 | void free_huge_page(struct page *page); | 123 | void free_huge_page(struct page *page); |
123 | void hugetlb_fix_reserve_counts(struct inode *inode); | 124 | void hugetlb_fix_reserve_counts(struct inode *inode); |
124 | extern struct mutex *hugetlb_fault_mutex_table; | 125 | extern struct mutex *hugetlb_fault_mutex_table; |
@@ -129,7 +130,6 @@ u32 hugetlb_fault_mutex_hash(struct hstate *h, struct mm_struct *mm, | |||
129 | 130 | ||
130 | pte_t *huge_pmd_share(struct mm_struct *mm, unsigned long addr, pud_t *pud); | 131 | pte_t *huge_pmd_share(struct mm_struct *mm, unsigned long addr, pud_t *pud); |
131 | 132 | ||
132 | extern int hugepages_treat_as_movable; | ||
133 | extern int sysctl_hugetlb_shm_group; | 133 | extern int sysctl_hugetlb_shm_group; |
134 | extern struct list_head huge_boot_pages; | 134 | extern struct list_head huge_boot_pages; |
135 | 135 | ||
@@ -158,6 +158,7 @@ unsigned long hugetlb_change_protection(struct vm_area_struct *vma, | |||
158 | unsigned long address, unsigned long end, pgprot_t newprot); | 158 | unsigned long address, unsigned long end, pgprot_t newprot); |
159 | 159 | ||
160 | bool is_hugetlb_entry_migration(pte_t pte); | 160 | bool is_hugetlb_entry_migration(pte_t pte); |
161 | |||
161 | #else /* !CONFIG_HUGETLB_PAGE */ | 162 | #else /* !CONFIG_HUGETLB_PAGE */ |
162 | 163 | ||
163 | static inline void reset_vma_resv_huge_pages(struct vm_area_struct *vma) | 164 | static inline void reset_vma_resv_huge_pages(struct vm_area_struct *vma) |
@@ -198,6 +199,7 @@ static inline bool isolate_huge_page(struct page *page, struct list_head *list) | |||
198 | return false; | 199 | return false; |
199 | } | 200 | } |
200 | #define putback_active_hugepage(p) do {} while (0) | 201 | #define putback_active_hugepage(p) do {} while (0) |
202 | #define move_hugetlb_state(old, new, reason) do {} while (0) | ||
201 | 203 | ||
202 | static inline unsigned long hugetlb_change_protection(struct vm_area_struct *vma, | 204 | static inline unsigned long hugetlb_change_protection(struct vm_area_struct *vma, |
203 | unsigned long address, unsigned long end, pgprot_t newprot) | 205 | unsigned long address, unsigned long end, pgprot_t newprot) |
@@ -271,6 +273,17 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) | |||
271 | return sb->s_fs_info; | 273 | return sb->s_fs_info; |
272 | } | 274 | } |
273 | 275 | ||
276 | struct hugetlbfs_inode_info { | ||
277 | struct shared_policy policy; | ||
278 | struct inode vfs_inode; | ||
279 | unsigned int seals; | ||
280 | }; | ||
281 | |||
282 | static inline struct hugetlbfs_inode_info *HUGETLBFS_I(struct inode *inode) | ||
283 | { | ||
284 | return container_of(inode, struct hugetlbfs_inode_info, vfs_inode); | ||
285 | } | ||
286 | |||
274 | extern const struct file_operations hugetlbfs_file_operations; | 287 | extern const struct file_operations hugetlbfs_file_operations; |
275 | extern const struct vm_operations_struct hugetlb_vm_ops; | 288 | extern const struct vm_operations_struct hugetlb_vm_ops; |
276 | struct file *hugetlb_file_setup(const char *name, size_t size, vm_flags_t acct, | 289 | struct file *hugetlb_file_setup(const char *name, size_t size, vm_flags_t acct, |
@@ -343,10 +356,10 @@ struct huge_bootmem_page { | |||
343 | struct page *alloc_huge_page(struct vm_area_struct *vma, | 356 | struct page *alloc_huge_page(struct vm_area_struct *vma, |
344 | unsigned long addr, int avoid_reserve); | 357 | unsigned long addr, int avoid_reserve); |
345 | struct page *alloc_huge_page_node(struct hstate *h, int nid); | 358 | struct page *alloc_huge_page_node(struct hstate *h, int nid); |
346 | struct page *alloc_huge_page_noerr(struct vm_area_struct *vma, | ||
347 | unsigned long addr, int avoid_reserve); | ||
348 | struct page *alloc_huge_page_nodemask(struct hstate *h, int preferred_nid, | 359 | struct page *alloc_huge_page_nodemask(struct hstate *h, int preferred_nid, |
349 | nodemask_t *nmask); | 360 | nodemask_t *nmask); |
361 | struct page *alloc_huge_page_vma(struct hstate *h, struct vm_area_struct *vma, | ||
362 | unsigned long address); | ||
350 | int huge_add_to_page_cache(struct page *page, struct address_space *mapping, | 363 | int huge_add_to_page_cache(struct page *page, struct address_space *mapping, |
351 | pgoff_t idx); | 364 | pgoff_t idx); |
352 | 365 | ||
@@ -524,7 +537,7 @@ struct hstate {}; | |||
524 | #define alloc_huge_page(v, a, r) NULL | 537 | #define alloc_huge_page(v, a, r) NULL |
525 | #define alloc_huge_page_node(h, nid) NULL | 538 | #define alloc_huge_page_node(h, nid) NULL |
526 | #define alloc_huge_page_nodemask(h, preferred_nid, nmask) NULL | 539 | #define alloc_huge_page_nodemask(h, preferred_nid, nmask) NULL |
527 | #define alloc_huge_page_noerr(v, a, r) NULL | 540 | #define alloc_huge_page_vma(h, vma, address) NULL |
528 | #define alloc_bootmem_huge_page(h) NULL | 541 | #define alloc_bootmem_huge_page(h) NULL |
529 | #define hstate_file(f) NULL | 542 | #define hstate_file(f) NULL |
530 | #define hstate_sizelog(s) NULL | 543 | #define hstate_sizelog(s) NULL |