diff options
Diffstat (limited to 'include/linux/hugetlb.h')
-rw-r--r-- | include/linux/hugetlb.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index f479700df61b..943c76b3d4bb 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -43,7 +43,8 @@ int hugetlb_reserve_pages(struct inode *inode, long from, long to, | |||
43 | struct vm_area_struct *vma, | 43 | struct vm_area_struct *vma, |
44 | int acctflags); | 44 | int acctflags); |
45 | void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); | 45 | void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); |
46 | void __isolate_hwpoisoned_huge_page(struct page *page); | 46 | int dequeue_hwpoisoned_huge_page(struct page *page); |
47 | void copy_huge_page(struct page *dst, struct page *src); | ||
47 | 48 | ||
48 | extern unsigned long hugepages_treat_as_movable; | 49 | extern unsigned long hugepages_treat_as_movable; |
49 | extern const unsigned long hugetlb_zero, hugetlb_infinity; | 50 | extern const unsigned long hugetlb_zero, hugetlb_infinity; |
@@ -101,7 +102,10 @@ static inline void hugetlb_report_meminfo(struct seq_file *m) | |||
101 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) | 102 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) |
102 | #define hugetlb_fault(mm, vma, addr, flags) ({ BUG(); 0; }) | 103 | #define hugetlb_fault(mm, vma, addr, flags) ({ BUG(); 0; }) |
103 | #define huge_pte_offset(mm, address) 0 | 104 | #define huge_pte_offset(mm, address) 0 |
104 | #define __isolate_hwpoisoned_huge_page(page) 0 | 105 | #define dequeue_hwpoisoned_huge_page(page) 0 |
106 | static inline void copy_huge_page(struct page *dst, struct page *src) | ||
107 | { | ||
108 | } | ||
105 | 109 | ||
106 | #define hugetlb_change_protection(vma, address, end, newprot) | 110 | #define hugetlb_change_protection(vma, address, end, newprot) |
107 | 111 | ||
@@ -228,6 +232,8 @@ struct huge_bootmem_page { | |||
228 | struct hstate *hstate; | 232 | struct hstate *hstate; |
229 | }; | 233 | }; |
230 | 234 | ||
235 | struct page *alloc_huge_page_node(struct hstate *h, int nid); | ||
236 | |||
231 | /* arch callback */ | 237 | /* arch callback */ |
232 | int __init alloc_bootmem_huge_page(struct hstate *h); | 238 | int __init alloc_bootmem_huge_page(struct hstate *h); |
233 | 239 | ||
@@ -301,8 +307,14 @@ static inline struct hstate *page_hstate(struct page *page) | |||
301 | return size_to_hstate(PAGE_SIZE << compound_order(page)); | 307 | return size_to_hstate(PAGE_SIZE << compound_order(page)); |
302 | } | 308 | } |
303 | 309 | ||
310 | static inline unsigned hstate_index_to_shift(unsigned index) | ||
311 | { | ||
312 | return hstates[index].order + PAGE_SHIFT; | ||
313 | } | ||
314 | |||
304 | #else | 315 | #else |
305 | struct hstate {}; | 316 | struct hstate {}; |
317 | #define alloc_huge_page_node(h, nid) NULL | ||
306 | #define alloc_bootmem_huge_page(h) NULL | 318 | #define alloc_bootmem_huge_page(h) NULL |
307 | #define hstate_file(f) NULL | 319 | #define hstate_file(f) NULL |
308 | #define hstate_vma(v) NULL | 320 | #define hstate_vma(v) NULL |
@@ -317,6 +329,7 @@ static inline unsigned int pages_per_huge_page(struct hstate *h) | |||
317 | { | 329 | { |
318 | return 1; | 330 | return 1; |
319 | } | 331 | } |
332 | #define hstate_index_to_shift(index) 0 | ||
320 | #endif | 333 | #endif |
321 | 334 | ||
322 | #endif /* _LINUX_HUGETLB_H */ | 335 | #endif /* _LINUX_HUGETLB_H */ |