diff options
Diffstat (limited to 'include/linux/hugetlb.h')
-rw-r--r-- | include/linux/hugetlb.h | 11 |
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 | ||
36 | pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr); | 36 | pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr); |
37 | pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr); | 37 | pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr); |
38 | int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep); | ||
38 | struct page *follow_huge_addr(struct mm_struct *mm, unsigned long address, | 39 | struct page *follow_huge_addr(struct mm_struct *mm, unsigned long address, |
39 | int write); | 40 | int write); |
40 | struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, | 41 | struct 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 | */ |
63 | static inline int prepare_hugepage_range(unsigned long addr, unsigned long len) | 64 | static 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 |
72 | int prepare_hugepage_range(unsigned long addr, unsigned long len); | 76 | int 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; }) |