diff options
Diffstat (limited to 'include/asm-powerpc/hugetlb.h')
-rw-r--r-- | include/asm-powerpc/hugetlb.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/asm-powerpc/hugetlb.h b/include/asm-powerpc/hugetlb.h index be32ff02f4a0..26f0d0ab27a5 100644 --- a/include/asm-powerpc/hugetlb.h +++ b/include/asm-powerpc/hugetlb.h | |||
@@ -7,7 +7,7 @@ | |||
7 | int is_hugepage_only_range(struct mm_struct *mm, unsigned long addr, | 7 | int is_hugepage_only_range(struct mm_struct *mm, unsigned long addr, |
8 | unsigned long len); | 8 | unsigned long len); |
9 | 9 | ||
10 | void hugetlb_free_pgd_range(struct mmu_gather **tlb, unsigned long addr, | 10 | void hugetlb_free_pgd_range(struct mmu_gather *tlb, unsigned long addr, |
11 | unsigned long end, unsigned long floor, | 11 | unsigned long end, unsigned long floor, |
12 | unsigned long ceiling); | 12 | unsigned long ceiling); |
13 | 13 | ||
@@ -21,11 +21,13 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | |||
21 | * If the arch doesn't supply something else, assume that hugepage | 21 | * If the arch doesn't supply something else, assume that hugepage |
22 | * size aligned regions are ok without further preparation. | 22 | * size aligned regions are ok without further preparation. |
23 | */ | 23 | */ |
24 | static inline int prepare_hugepage_range(unsigned long addr, unsigned long len) | 24 | static inline int prepare_hugepage_range(struct file *file, |
25 | unsigned long addr, unsigned long len) | ||
25 | { | 26 | { |
26 | if (len & ~HPAGE_MASK) | 27 | struct hstate *h = hstate_file(file); |
28 | if (len & ~huge_page_mask(h)) | ||
27 | return -EINVAL; | 29 | return -EINVAL; |
28 | if (addr & ~HPAGE_MASK) | 30 | if (addr & ~huge_page_mask(h)) |
29 | return -EINVAL; | 31 | return -EINVAL; |
30 | return 0; | 32 | return 0; |
31 | } | 33 | } |