aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hugetlb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/hugetlb.h')
-rw-r--r--include/linux/hugetlb.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 5081d27bfa27..a60995afe334 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -35,6 +35,7 @@ extern int sysctl_hugetlb_shm_group;
35 35
36pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr); 36pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr);
37pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr); 37pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr);
38int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep);
38struct page *follow_huge_addr(struct mm_struct *mm, unsigned long address, 39struct page *follow_huge_addr(struct mm_struct *mm, unsigned long address,
39 int write); 40 int write);
40struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, 41struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address,
@@ -60,8 +61,11 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb, unsigned long addr,
60 * If the arch doesn't supply something else, assume that hugepage 61 * If the arch doesn't supply something else, assume that hugepage
61 * size aligned regions are ok without further preparation. 62 * size aligned regions are ok without further preparation.
62 */ 63 */
63static inline int prepare_hugepage_range(unsigned long addr, unsigned long len) 64static inline int prepare_hugepage_range(unsigned long addr, unsigned long len,
65 pgoff_t pgoff)
64{ 66{
67 if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT))
68 return -EINVAL;
65 if (len & ~HPAGE_MASK) 69 if (len & ~HPAGE_MASK)
66 return -EINVAL; 70 return -EINVAL;
67 if (addr & ~HPAGE_MASK) 71 if (addr & ~HPAGE_MASK)
@@ -69,7 +73,8 @@ static inline int prepare_hugepage_range(unsigned long addr, unsigned long len)
69 return 0; 73 return 0;
70} 74}
71#else 75#else
72int prepare_hugepage_range(unsigned long addr, unsigned long len); 76int prepare_hugepage_range(unsigned long addr, unsigned long len,
77 pgoff_t pgoff);
73#endif 78#endif
74 79
75#ifndef ARCH_HAS_SETCLEAR_HUGE_PTE 80#ifndef ARCH_HAS_SETCLEAR_HUGE_PTE
@@ -107,7 +112,7 @@ static inline unsigned long hugetlb_total_pages(void)
107#define hugetlb_report_meminfo(buf) 0 112#define hugetlb_report_meminfo(buf) 0
108#define hugetlb_report_node_meminfo(n, buf) 0 113#define hugetlb_report_node_meminfo(n, buf) 0
109#define follow_huge_pmd(mm, addr, pmd, write) NULL 114#define follow_huge_pmd(mm, addr, pmd, write) NULL
110#define prepare_hugepage_range(addr, len) (-EINVAL) 115#define prepare_hugepage_range(addr,len,pgoff) (-EINVAL)
111#define pmd_huge(x) 0 116#define pmd_huge(x) 0
112#define is_hugepage_only_range(mm, addr, len) 0 117#define is_hugepage_only_range(mm, addr, len) 0
113#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) 118#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; })