]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
powerpc/64s: Only set HAVE_ARCH_UNMAPPED_AREA when CONFIG_PPC_64S_HASH_MMU is set
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 24 May 2022 05:42:05 +0000 (07:42 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 24 May 2022 10:44:48 +0000 (20:44 +1000)
When CONFIG_PPC_64S_HASH_MMU is not set, slice.c is not built and
arch_get_unmapped_area() and arch_get_unmapped_area_topdown() are
not provided because RADIX uses the generic ones.

Therefore, neither set HAVE_ARCH_UNMAPPED_AREA nor
HAVE_ARCH_UNMAPPED_AREA_TOPDOWN.

Fixes: ab57bd7570d4 ("powerpc/mm: Move get_unmapped_area functions to slice.c")
Reported-by: Laurent Dufour <ldufour@linux.ibm.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Tested-by: Laurent Dufour <ldufour@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/e438c6cc09f94085e56733ed2d6e84333c35292a.1653370913.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/book3s/64/slice.h

index b8eb4ad271b9928cb4542fba912694651480494d..5fbe18544cbd1b629640cd4d537739b1dd39d2e7 100644 (file)
@@ -4,11 +4,13 @@
 
 #ifndef __ASSEMBLY__
 
+#ifdef CONFIG_PPC_64S_HASH_MMU
 #ifdef CONFIG_HUGETLB_PAGE
 #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
 #endif
 #define HAVE_ARCH_UNMAPPED_AREA
 #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
+#endif
 
 #define SLICE_LOW_SHIFT                28
 #define SLICE_LOW_TOP          (0x100000000ul)