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.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 49b7053043ad..3a19b032c0eb 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -1,6 +1,8 @@
1#ifndef _LINUX_HUGETLB_H 1#ifndef _LINUX_HUGETLB_H
2#define _LINUX_HUGETLB_H 2#define _LINUX_HUGETLB_H
3 3
4#include <linux/fs.h>
5
4#ifdef CONFIG_HUGETLB_PAGE 6#ifdef CONFIG_HUGETLB_PAGE
5 7
6#include <linux/mempolicy.h> 8#include <linux/mempolicy.h>
@@ -64,11 +66,8 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb, unsigned long addr,
64 * If the arch doesn't supply something else, assume that hugepage 66 * If the arch doesn't supply something else, assume that hugepage
65 * size aligned regions are ok without further preparation. 67 * size aligned regions are ok without further preparation.
66 */ 68 */
67static inline int prepare_hugepage_range(unsigned long addr, unsigned long len, 69static inline int prepare_hugepage_range(unsigned long addr, unsigned long len)
68 pgoff_t pgoff)
69{ 70{
70 if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT))
71 return -EINVAL;
72 if (len & ~HPAGE_MASK) 71 if (len & ~HPAGE_MASK)
73 return -EINVAL; 72 return -EINVAL;
74 if (addr & ~HPAGE_MASK) 73 if (addr & ~HPAGE_MASK)
@@ -76,8 +75,7 @@ static inline int prepare_hugepage_range(unsigned long addr, unsigned long len,
76 return 0; 75 return 0;
77} 76}
78#else 77#else
79int prepare_hugepage_range(unsigned long addr, unsigned long len, 78int prepare_hugepage_range(unsigned long addr, unsigned long len);
80 pgoff_t pgoff);
81#endif 79#endif
82 80
83#ifndef ARCH_HAS_SETCLEAR_HUGE_PTE 81#ifndef ARCH_HAS_SETCLEAR_HUGE_PTE
@@ -115,7 +113,7 @@ static inline unsigned long hugetlb_total_pages(void)
115#define hugetlb_report_meminfo(buf) 0 113#define hugetlb_report_meminfo(buf) 0
116#define hugetlb_report_node_meminfo(n, buf) 0 114#define hugetlb_report_node_meminfo(n, buf) 0
117#define follow_huge_pmd(mm, addr, pmd, write) NULL 115#define follow_huge_pmd(mm, addr, pmd, write) NULL
118#define prepare_hugepage_range(addr,len,pgoff) (-EINVAL) 116#define prepare_hugepage_range(addr,len) (-EINVAL)
119#define pmd_huge(x) 0 117#define pmd_huge(x) 0
120#define is_hugepage_only_range(mm, addr, len) 0 118#define is_hugepage_only_range(mm, addr, len) 0
121#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) 119#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; })