diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ia64/mm/hugetlbpage.c | 6 | ||||
-rw-r--r-- | arch/powerpc/mm/hugetlbpage.c | 5 | ||||
-rw-r--r-- | arch/s390/mm/hugetlbpage.c | 5 | ||||
-rw-r--r-- | arch/sh/mm/hugetlbpage.c | 5 | ||||
-rw-r--r-- | arch/sparc64/mm/hugetlbpage.c | 5 | ||||
-rw-r--r-- | arch/x86/mm/hugetlbpage.c | 25 |
6 files changed, 50 insertions, 1 deletions
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c index 6170f097d255..c45fc7f5a979 100644 --- a/arch/ia64/mm/hugetlbpage.c +++ b/arch/ia64/mm/hugetlbpage.c | |||
@@ -107,6 +107,12 @@ int pmd_huge(pmd_t pmd) | |||
107 | { | 107 | { |
108 | return 0; | 108 | return 0; |
109 | } | 109 | } |
110 | |||
111 | int pud_huge(pud_t pud) | ||
112 | { | ||
113 | return 0; | ||
114 | } | ||
115 | |||
110 | struct page * | 116 | struct page * |
111 | follow_huge_pmd(struct mm_struct *mm, unsigned long address, pmd_t *pmd, int write) | 117 | follow_huge_pmd(struct mm_struct *mm, unsigned long address, pmd_t *pmd, int write) |
112 | { | 118 | { |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index c94dc71af989..63db7adce717 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -369,6 +369,11 @@ int pmd_huge(pmd_t pmd) | |||
369 | return 0; | 369 | return 0; |
370 | } | 370 | } |
371 | 371 | ||
372 | int pud_huge(pud_t pud) | ||
373 | { | ||
374 | return 0; | ||
375 | } | ||
376 | |||
372 | struct page * | 377 | struct page * |
373 | follow_huge_pmd(struct mm_struct *mm, unsigned long address, | 378 | follow_huge_pmd(struct mm_struct *mm, unsigned long address, |
374 | pmd_t *pmd, int write) | 379 | pmd_t *pmd, int write) |
diff --git a/arch/s390/mm/hugetlbpage.c b/arch/s390/mm/hugetlbpage.c index 9162dc84f77f..f28c43d2f61d 100644 --- a/arch/s390/mm/hugetlbpage.c +++ b/arch/s390/mm/hugetlbpage.c | |||
@@ -120,6 +120,11 @@ int pmd_huge(pmd_t pmd) | |||
120 | return !!(pmd_val(pmd) & _SEGMENT_ENTRY_LARGE); | 120 | return !!(pmd_val(pmd) & _SEGMENT_ENTRY_LARGE); |
121 | } | 121 | } |
122 | 122 | ||
123 | int pud_huge(pud_t pud) | ||
124 | { | ||
125 | return 0; | ||
126 | } | ||
127 | |||
123 | struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, | 128 | struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, |
124 | pmd_t *pmdp, int write) | 129 | pmd_t *pmdp, int write) |
125 | { | 130 | { |
diff --git a/arch/sh/mm/hugetlbpage.c b/arch/sh/mm/hugetlbpage.c index 2f9dbe0ef4ac..9304117039c4 100644 --- a/arch/sh/mm/hugetlbpage.c +++ b/arch/sh/mm/hugetlbpage.c | |||
@@ -79,6 +79,11 @@ int pmd_huge(pmd_t pmd) | |||
79 | return 0; | 79 | return 0; |
80 | } | 80 | } |
81 | 81 | ||
82 | int pud_huge(pud_t pud) | ||
83 | { | ||
84 | return 0; | ||
85 | } | ||
86 | |||
82 | struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, | 87 | struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, |
83 | pmd_t *pmd, int write) | 88 | pmd_t *pmd, int write) |
84 | { | 89 | { |
diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c index 1307b23f6a76..f27d10369e0c 100644 --- a/arch/sparc64/mm/hugetlbpage.c +++ b/arch/sparc64/mm/hugetlbpage.c | |||
@@ -295,6 +295,11 @@ int pmd_huge(pmd_t pmd) | |||
295 | return 0; | 295 | return 0; |
296 | } | 296 | } |
297 | 297 | ||
298 | int pud_huge(pud_t pud) | ||
299 | { | ||
300 | return 0; | ||
301 | } | ||
302 | |||
298 | struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, | 303 | struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, |
299 | pmd_t *pmd, int write) | 304 | pmd_t *pmd, int write) |
300 | { | 305 | { |
diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c index 52476fde8996..a4789e87a315 100644 --- a/arch/x86/mm/hugetlbpage.c +++ b/arch/x86/mm/hugetlbpage.c | |||
@@ -189,6 +189,11 @@ int pmd_huge(pmd_t pmd) | |||
189 | return 0; | 189 | return 0; |
190 | } | 190 | } |
191 | 191 | ||
192 | int pud_huge(pud_t pud) | ||
193 | { | ||
194 | return 0; | ||
195 | } | ||
196 | |||
192 | struct page * | 197 | struct page * |
193 | follow_huge_pmd(struct mm_struct *mm, unsigned long address, | 198 | follow_huge_pmd(struct mm_struct *mm, unsigned long address, |
194 | pmd_t *pmd, int write) | 199 | pmd_t *pmd, int write) |
@@ -209,6 +214,11 @@ int pmd_huge(pmd_t pmd) | |||
209 | return !!(pmd_val(pmd) & _PAGE_PSE); | 214 | return !!(pmd_val(pmd) & _PAGE_PSE); |
210 | } | 215 | } |
211 | 216 | ||
217 | int pud_huge(pud_t pud) | ||
218 | { | ||
219 | return 0; | ||
220 | } | ||
221 | |||
212 | struct page * | 222 | struct page * |
213 | follow_huge_pmd(struct mm_struct *mm, unsigned long address, | 223 | follow_huge_pmd(struct mm_struct *mm, unsigned long address, |
214 | pmd_t *pmd, int write) | 224 | pmd_t *pmd, int write) |
@@ -217,9 +227,22 @@ follow_huge_pmd(struct mm_struct *mm, unsigned long address, | |||
217 | 227 | ||
218 | page = pte_page(*(pte_t *)pmd); | 228 | page = pte_page(*(pte_t *)pmd); |
219 | if (page) | 229 | if (page) |
220 | page += ((address & ~HPAGE_MASK) >> PAGE_SHIFT); | 230 | page += ((address & ~PMD_MASK) >> PAGE_SHIFT); |
221 | return page; | 231 | return page; |
222 | } | 232 | } |
233 | |||
234 | struct page * | ||
235 | follow_huge_pud(struct mm_struct *mm, unsigned long address, | ||
236 | pud_t *pud, int write) | ||
237 | { | ||
238 | struct page *page; | ||
239 | |||
240 | page = pte_page(*(pte_t *)pud); | ||
241 | if (page) | ||
242 | page += ((address & ~PUD_MASK) >> PAGE_SHIFT); | ||
243 | return page; | ||
244 | } | ||
245 | |||
223 | #endif | 246 | #endif |
224 | 247 | ||
225 | /* x86_64 also uses this file */ | 248 | /* x86_64 also uses this file */ |