diff options
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/hugetlb.h | 1 | ||||
-rw-r--r-- | arch/powerpc/include/asm/mmu-hash64.h | 14 | ||||
-rw-r--r-- | arch/powerpc/include/asm/page.h | 14 | ||||
-rw-r--r-- | arch/powerpc/include/asm/pgtable-ppc64.h | 13 | ||||
-rw-r--r-- | arch/powerpc/include/asm/pgtable.h | 3 |
5 files changed, 32 insertions, 13 deletions
diff --git a/arch/powerpc/include/asm/hugetlb.h b/arch/powerpc/include/asm/hugetlb.h index b1dafb6a974..a4f08f10fe1 100644 --- a/arch/powerpc/include/asm/hugetlb.h +++ b/arch/powerpc/include/asm/hugetlb.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #include <asm/page.h> | 4 | #include <asm/page.h> |
5 | 5 | ||
6 | |||
7 | int is_hugepage_only_range(struct mm_struct *mm, unsigned long addr, | 6 | int is_hugepage_only_range(struct mm_struct *mm, unsigned long addr, |
8 | unsigned long len); | 7 | unsigned long len); |
9 | 8 | ||
diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h index bebe31c2e90..dd50ea15e64 100644 --- a/arch/powerpc/include/asm/mmu-hash64.h +++ b/arch/powerpc/include/asm/mmu-hash64.h | |||
@@ -173,14 +173,6 @@ extern unsigned long tce_alloc_start, tce_alloc_end; | |||
173 | */ | 173 | */ |
174 | extern int mmu_ci_restrictions; | 174 | extern int mmu_ci_restrictions; |
175 | 175 | ||
176 | #ifdef CONFIG_HUGETLB_PAGE | ||
177 | /* | ||
178 | * The page size indexes of the huge pages for use by hugetlbfs | ||
179 | */ | ||
180 | extern unsigned int mmu_huge_psizes[MMU_PAGE_COUNT]; | ||
181 | |||
182 | #endif /* CONFIG_HUGETLB_PAGE */ | ||
183 | |||
184 | /* | 176 | /* |
185 | * This function sets the AVPN and L fields of the HPTE appropriately | 177 | * This function sets the AVPN and L fields of the HPTE appropriately |
186 | * for the page size | 178 | * for the page size |
@@ -254,9 +246,9 @@ extern int __hash_page_64K(unsigned long ea, unsigned long access, | |||
254 | unsigned int local, int ssize); | 246 | unsigned int local, int ssize); |
255 | struct mm_struct; | 247 | struct mm_struct; |
256 | extern int hash_page(unsigned long ea, unsigned long access, unsigned long trap); | 248 | extern int hash_page(unsigned long ea, unsigned long access, unsigned long trap); |
257 | extern int hash_huge_page(struct mm_struct *mm, unsigned long access, | 249 | int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid, |
258 | unsigned long ea, unsigned long vsid, int local, | 250 | pte_t *ptep, unsigned long trap, int local, int ssize, |
259 | unsigned long trap); | 251 | unsigned int shift, unsigned int mmu_psize); |
260 | 252 | ||
261 | extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | 253 | extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend, |
262 | unsigned long pstart, unsigned long prot, | 254 | unsigned long pstart, unsigned long prot, |
diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h index ff24254990e..e96d52a516b 100644 --- a/arch/powerpc/include/asm/page.h +++ b/arch/powerpc/include/asm/page.h | |||
@@ -229,6 +229,20 @@ typedef unsigned long pgprot_t; | |||
229 | 229 | ||
230 | #endif | 230 | #endif |
231 | 231 | ||
232 | typedef struct { signed long pd; } hugepd_t; | ||
233 | #define HUGEPD_SHIFT_MASK 0x3f | ||
234 | |||
235 | #ifdef CONFIG_HUGETLB_PAGE | ||
236 | static inline int hugepd_ok(hugepd_t hpd) | ||
237 | { | ||
238 | return (hpd.pd > 0); | ||
239 | } | ||
240 | |||
241 | #define is_hugepd(pdep) (hugepd_ok(*((hugepd_t *)(pdep)))) | ||
242 | #else /* CONFIG_HUGETLB_PAGE */ | ||
243 | #define is_hugepd(pdep) 0 | ||
244 | #endif /* CONFIG_HUGETLB_PAGE */ | ||
245 | |||
232 | struct page; | 246 | struct page; |
233 | extern void clear_user_page(void *page, unsigned long vaddr, struct page *pg); | 247 | extern void clear_user_page(void *page, unsigned long vaddr, struct page *pg); |
234 | extern void copy_user_page(void *to, void *from, unsigned long vaddr, | 248 | extern void copy_user_page(void *to, void *from, unsigned long vaddr, |
diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h index 8697d655509..49865045d56 100644 --- a/arch/powerpc/include/asm/pgtable-ppc64.h +++ b/arch/powerpc/include/asm/pgtable-ppc64.h | |||
@@ -379,7 +379,18 @@ void pgtable_cache_init(void); | |||
379 | return pt; | 379 | return pt; |
380 | } | 380 | } |
381 | 381 | ||
382 | pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long address); | 382 | #ifdef CONFIG_HUGETLB_PAGE |
383 | pte_t *find_linux_pte_or_hugepte(pgd_t *pgdir, unsigned long ea, | ||
384 | unsigned *shift); | ||
385 | #else | ||
386 | static inline pte_t *find_linux_pte_or_hugepte(pgd_t *pgdir, unsigned long ea, | ||
387 | unsigned *shift) | ||
388 | { | ||
389 | if (shift) | ||
390 | *shift = 0; | ||
391 | return find_linux_pte(pgdir, ea); | ||
392 | } | ||
393 | #endif /* !CONFIG_HUGETLB_PAGE */ | ||
383 | 394 | ||
384 | #endif /* __ASSEMBLY__ */ | 395 | #endif /* __ASSEMBLY__ */ |
385 | 396 | ||
diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h index 2a5da069714..21207e54825 100644 --- a/arch/powerpc/include/asm/pgtable.h +++ b/arch/powerpc/include/asm/pgtable.h | |||
@@ -211,6 +211,9 @@ extern void paging_init(void); | |||
211 | */ | 211 | */ |
212 | extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); | 212 | extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); |
213 | 213 | ||
214 | extern int gup_hugepd(hugepd_t *hugepd, unsigned pdshift, unsigned long addr, | ||
215 | unsigned long end, int write, struct page **pages, int *nr); | ||
216 | |||
214 | #endif /* __ASSEMBLY__ */ | 217 | #endif /* __ASSEMBLY__ */ |
215 | 218 | ||
216 | #endif /* __KERNEL__ */ | 219 | #endif /* __KERNEL__ */ |