From: Aneesh Kumar K.V Date: Mon, 28 Nov 2016 06:16:58 +0000 (+0530) Subject: powerpc/mm: Rename hugetlb-radix.h to hugetlb.h X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bee8b3b56d1dfc4075254a61340ee3898a732e63;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git powerpc/mm: Rename hugetlb-radix.h to hugetlb.h We will start moving some book3s specific hugetlb functions there. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/include/asm/book3s/64/hugetlb-radix.h b/arch/powerpc/include/asm/book3s/64/hugetlb-radix.h deleted file mode 100644 index c45189aa7476..000000000000 --- a/arch/powerpc/include/asm/book3s/64/hugetlb-radix.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef _ASM_POWERPC_BOOK3S_64_HUGETLB_RADIX_H -#define _ASM_POWERPC_BOOK3S_64_HUGETLB_RADIX_H -/* - * For radix we want generic code to handle hugetlb. But then if we want - * both hash and radix to be enabled together we need to workaround the - * limitations. - */ -void radix__flush_hugetlb_page(struct vm_area_struct *vma, unsigned long vmaddr); -void radix__local_flush_hugetlb_page(struct vm_area_struct *vma, unsigned long vmaddr); -extern unsigned long -radix__hugetlb_get_unmapped_area(struct file *file, unsigned long addr, - unsigned long len, unsigned long pgoff, - unsigned long flags); - -static inline int hstate_get_psize(struct hstate *hstate) -{ - unsigned long shift; - - shift = huge_page_shift(hstate); - if (shift == mmu_psize_defs[MMU_PAGE_2M].shift) - return MMU_PAGE_2M; - else if (shift == mmu_psize_defs[MMU_PAGE_1G].shift) - return MMU_PAGE_1G; - else { - WARN(1, "Wrong huge page shift\n"); - return mmu_virtual_psize; - } -} -#endif diff --git a/arch/powerpc/include/asm/book3s/64/hugetlb.h b/arch/powerpc/include/asm/book3s/64/hugetlb.h new file mode 100644 index 000000000000..499268045306 --- /dev/null +++ b/arch/powerpc/include/asm/book3s/64/hugetlb.h @@ -0,0 +1,29 @@ +#ifndef _ASM_POWERPC_BOOK3S_64_HUGETLB_H +#define _ASM_POWERPC_BOOK3S_64_HUGETLB_H +/* + * For radix we want generic code to handle hugetlb. But then if we want + * both hash and radix to be enabled together we need to workaround the + * limitations. + */ +void radix__flush_hugetlb_page(struct vm_area_struct *vma, unsigned long vmaddr); +void radix__local_flush_hugetlb_page(struct vm_area_struct *vma, unsigned long vmaddr); +extern unsigned long +radix__hugetlb_get_unmapped_area(struct file *file, unsigned long addr, + unsigned long len, unsigned long pgoff, + unsigned long flags); + +static inline int hstate_get_psize(struct hstate *hstate) +{ + unsigned long shift; + + shift = huge_page_shift(hstate); + if (shift == mmu_psize_defs[MMU_PAGE_2M].shift) + return MMU_PAGE_2M; + else if (shift == mmu_psize_defs[MMU_PAGE_1G].shift) + return MMU_PAGE_1G; + else { + WARN(1, "Wrong huge page shift\n"); + return mmu_virtual_psize; + } +} +#endif diff --git a/arch/powerpc/include/asm/hugetlb.h b/arch/powerpc/include/asm/hugetlb.h index c5517f463ec7..c03e0a3dd4d8 100644 --- a/arch/powerpc/include/asm/hugetlb.h +++ b/arch/powerpc/include/asm/hugetlb.h @@ -9,7 +9,7 @@ extern struct kmem_cache *hugepte_cache; #ifdef CONFIG_PPC_BOOK3S_64 -#include +#include /* * This should work for other subarchs too. But right now we use the * new format only for 64bit book3s