diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ia64/mm/hugetlbpage.c | 7 | ||||
-rw-r--r-- | arch/powerpc/mm/hugetlbpage.c | 3 | ||||
-rw-r--r-- | arch/s390/mm/hugetlbpage.c | 3 | ||||
-rw-r--r-- | arch/sh/mm/hugetlbpage.c | 3 | ||||
-rw-r--r-- | arch/sparc64/mm/hugetlbpage.c | 5 | ||||
-rw-r--r-- | arch/x86/mm/hugetlbpage.c | 5 |
6 files changed, 16 insertions, 10 deletions
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c index cd49e2860eef..6170f097d255 100644 --- a/arch/ia64/mm/hugetlbpage.c +++ b/arch/ia64/mm/hugetlbpage.c | |||
@@ -24,7 +24,7 @@ | |||
24 | unsigned int hpage_shift=HPAGE_SHIFT_DEFAULT; | 24 | unsigned int hpage_shift=HPAGE_SHIFT_DEFAULT; |
25 | 25 | ||
26 | pte_t * | 26 | pte_t * |
27 | huge_pte_alloc (struct mm_struct *mm, unsigned long addr) | 27 | huge_pte_alloc(struct mm_struct *mm, unsigned long addr, unsigned long sz) |
28 | { | 28 | { |
29 | unsigned long taddr = htlbpage_to_page(addr); | 29 | unsigned long taddr = htlbpage_to_page(addr); |
30 | pgd_t *pgd; | 30 | pgd_t *pgd; |
@@ -75,7 +75,8 @@ int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep) | |||
75 | * Don't actually need to do any preparation, but need to make sure | 75 | * Don't actually need to do any preparation, but need to make sure |
76 | * the address is in the right region. | 76 | * the address is in the right region. |
77 | */ | 77 | */ |
78 | int prepare_hugepage_range(unsigned long addr, unsigned long len) | 78 | int prepare_hugepage_range(struct file *file, |
79 | unsigned long addr, unsigned long len) | ||
79 | { | 80 | { |
80 | if (len & ~HPAGE_MASK) | 81 | if (len & ~HPAGE_MASK) |
81 | return -EINVAL; | 82 | return -EINVAL; |
@@ -149,7 +150,7 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, u | |||
149 | 150 | ||
150 | /* Handle MAP_FIXED */ | 151 | /* Handle MAP_FIXED */ |
151 | if (flags & MAP_FIXED) { | 152 | if (flags & MAP_FIXED) { |
152 | if (prepare_hugepage_range(addr, len)) | 153 | if (prepare_hugepage_range(file, addr, len)) |
153 | return -EINVAL; | 154 | return -EINVAL; |
154 | return addr; | 155 | return addr; |
155 | } | 156 | } |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 1a96cc891cf5..c94dc71af989 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -128,7 +128,8 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | |||
128 | return NULL; | 128 | return NULL; |
129 | } | 129 | } |
130 | 130 | ||
131 | pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | 131 | pte_t *huge_pte_alloc(struct mm_struct *mm, |
132 | unsigned long addr, unsigned long sz) | ||
132 | { | 133 | { |
133 | pgd_t *pg; | 134 | pgd_t *pg; |
134 | pud_t *pu; | 135 | pud_t *pu; |
diff --git a/arch/s390/mm/hugetlbpage.c b/arch/s390/mm/hugetlbpage.c index f4b6124fdb75..9162dc84f77f 100644 --- a/arch/s390/mm/hugetlbpage.c +++ b/arch/s390/mm/hugetlbpage.c | |||
@@ -72,7 +72,8 @@ void arch_release_hugepage(struct page *page) | |||
72 | page[1].index = 0; | 72 | page[1].index = 0; |
73 | } | 73 | } |
74 | 74 | ||
75 | pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | 75 | pte_t *huge_pte_alloc(struct mm_struct *mm, |
76 | unsigned long addr, unsigned long sz) | ||
76 | { | 77 | { |
77 | pgd_t *pgdp; | 78 | pgd_t *pgdp; |
78 | pud_t *pudp; | 79 | pud_t *pudp; |
diff --git a/arch/sh/mm/hugetlbpage.c b/arch/sh/mm/hugetlbpage.c index ae8c321d6e2a..2f9dbe0ef4ac 100644 --- a/arch/sh/mm/hugetlbpage.c +++ b/arch/sh/mm/hugetlbpage.c | |||
@@ -22,7 +22,8 @@ | |||
22 | #include <asm/tlbflush.h> | 22 | #include <asm/tlbflush.h> |
23 | #include <asm/cacheflush.h> | 23 | #include <asm/cacheflush.h> |
24 | 24 | ||
25 | pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | 25 | pte_t *huge_pte_alloc(struct mm_struct *mm, |
26 | unsigned long addr, unsigned long sz) | ||
26 | { | 27 | { |
27 | pgd_t *pgd; | 28 | pgd_t *pgd; |
28 | pud_t *pud; | 29 | pud_t *pud; |
diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c index ebefd2a14375..1307b23f6a76 100644 --- a/arch/sparc64/mm/hugetlbpage.c +++ b/arch/sparc64/mm/hugetlbpage.c | |||
@@ -175,7 +175,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, | |||
175 | return -ENOMEM; | 175 | return -ENOMEM; |
176 | 176 | ||
177 | if (flags & MAP_FIXED) { | 177 | if (flags & MAP_FIXED) { |
178 | if (prepare_hugepage_range(addr, len)) | 178 | if (prepare_hugepage_range(file, addr, len)) |
179 | return -EINVAL; | 179 | return -EINVAL; |
180 | return addr; | 180 | return addr; |
181 | } | 181 | } |
@@ -195,7 +195,8 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, | |||
195 | pgoff, flags); | 195 | pgoff, flags); |
196 | } | 196 | } |
197 | 197 | ||
198 | pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | 198 | pte_t *huge_pte_alloc(struct mm_struct *mm, |
199 | unsigned long addr, unsigned long sz) | ||
199 | { | 200 | { |
200 | pgd_t *pgd; | 201 | pgd_t *pgd; |
201 | pud_t *pud; | 202 | pud_t *pud; |
diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c index 0b3d567e686d..52476fde8996 100644 --- a/arch/x86/mm/hugetlbpage.c +++ b/arch/x86/mm/hugetlbpage.c | |||
@@ -124,7 +124,8 @@ int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep) | |||
124 | return 1; | 124 | return 1; |
125 | } | 125 | } |
126 | 126 | ||
127 | pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | 127 | pte_t *huge_pte_alloc(struct mm_struct *mm, |
128 | unsigned long addr, unsigned long sz) | ||
128 | { | 129 | { |
129 | pgd_t *pgd; | 130 | pgd_t *pgd; |
130 | pud_t *pud; | 131 | pud_t *pud; |
@@ -368,7 +369,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, | |||
368 | return -ENOMEM; | 369 | return -ENOMEM; |
369 | 370 | ||
370 | if (flags & MAP_FIXED) { | 371 | if (flags & MAP_FIXED) { |
371 | if (prepare_hugepage_range(addr, len)) | 372 | if (prepare_hugepage_range(file, addr, len)) |
372 | return -EINVAL; | 373 | return -EINVAL; |
373 | return addr; | 374 | return addr; |
374 | } | 375 | } |