Commit | Line | Data |
---|---|---|
bee8b3b5 AK |
1 | #ifndef _ASM_POWERPC_BOOK3S_64_HUGETLB_H |
2 | #define _ASM_POWERPC_BOOK3S_64_HUGETLB_H | |
48483760 AK |
3 | /* |
4 | * For radix we want generic code to handle hugetlb. But then if we want | |
5 | * both hash and radix to be enabled together we need to workaround the | |
6 | * limitations. | |
7 | */ | |
8 | void radix__flush_hugetlb_page(struct vm_area_struct *vma, unsigned long vmaddr); | |
9 | void radix__local_flush_hugetlb_page(struct vm_area_struct *vma, unsigned long vmaddr); | |
10 | extern unsigned long | |
11 | radix__hugetlb_get_unmapped_area(struct file *file, unsigned long addr, | |
12 | unsigned long len, unsigned long pgoff, | |
13 | unsigned long flags); | |
fbfa26d8 AK |
14 | |
15 | static inline int hstate_get_psize(struct hstate *hstate) | |
16 | { | |
17 | unsigned long shift; | |
18 | ||
19 | shift = huge_page_shift(hstate); | |
20 | if (shift == mmu_psize_defs[MMU_PAGE_2M].shift) | |
21 | return MMU_PAGE_2M; | |
22 | else if (shift == mmu_psize_defs[MMU_PAGE_1G].shift) | |
23 | return MMU_PAGE_1G; | |
24 | else { | |
25 | WARN(1, "Wrong huge page shift\n"); | |
26 | return mmu_virtual_psize; | |
27 | } | |
28 | } | |
48483760 | 29 | #endif |