]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
powerpc/mm: make hugetlbpage.c depend on CONFIG_HUGETLB_PAGE
authorChristophe Leroy <christophe.leroy@c-s.fr>
Fri, 26 Apr 2019 05:59:42 +0000 (05:59 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 2 May 2019 15:20:23 +0000 (01:20 +1000)
The only function in hugetlbpage.c which doesn't depend on
CONFIG_HUGETLB_PAGE is gup_hugepte(), and this function is
only called from gup_huge_pd() which depends on
CONFIG_HUGETLB_PAGE so all the content of hugetlbpage.c
depends on CONFIG_HUGETLB_PAGE.

This patch modifies Makefile to only compile hugetlbpage.c
when CONFIG_HUGETLB_PAGE is set.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/Makefile
arch/powerpc/mm/hugetlbpage.c

index 08557bae6fa16bc230912057570dcbe973e0ca5f..3daea8da0c7fdce310a88c37a1864a3f39f172c6 100644 (file)
@@ -15,7 +15,7 @@ obj-$(CONFIG_PPC_BOOK3S_64)   += pgtable-frag.o
 obj-$(CONFIG_PPC32)            += pgtable-frag.o
 obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o
 obj-$(CONFIG_PPC_MM_SLICES)    += slice.o
-obj-y                          += hugetlbpage.o
+obj-$(CONFIG_HUGETLB_PAGE)     += hugetlbpage.o
 obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o
 obj-$(CONFIG_HIGHMEM)          += highmem.o
 obj-$(CONFIG_PPC_COPRO_BASE)   += copro_fault.o
index 17915fc389ff101042d9587af5efce541f494303..9f69594f5d09e2f2035446ea8904b216601559b7 100644 (file)
@@ -26,9 +26,6 @@
 #include <asm/hugetlb.h>
 #include <asm/pte-walk.h>
 
-
-#ifdef CONFIG_HUGETLB_PAGE
-
 #define PAGE_SHIFT_64K 16
 #define PAGE_SHIFT_512K        19
 #define PAGE_SHIFT_8M  23
@@ -754,8 +751,6 @@ void flush_dcache_icache_hugepage(struct page *page)
        }
 }
 
-#endif /* CONFIG_HUGETLB_PAGE */
-
 int gup_hugepte(pte_t *ptep, unsigned long sz, unsigned long addr,
                unsigned long end, int write, struct page **pages, int *nr)
 {