Skip to contentSkip to conversation

powerpc/8xx: Build fix with Hugetlbfs enabled

PATCH Applied Aneesh Kumar K.V 2 participants 2 messages Apr 10, 2018 – Apr 11, 2018 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/8xx: Build fix with Hugetlbfs enabled

8xx use slice code when hugetlbfs is enabled. We missed a header include on 8xx which resulted in the below build failure.

config: mpc885_ads_defconfig + CONFIG_HUGETLBFS

CC arch/powerpc/mm/slice.o
arch/powerpc/mm/slice.c: In function 'slice_get_unmapped_area':
arch/powerpc/mm/slice.c:655:2: error: implicit declaration of function 'need_extra_context' [-Werror=implicit-function-declaration] arch/powerpc/mm/slice.c:656:3: error: implicit declaration of function 'alloc_extended_context' [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
make[1]: *** [arch/powerpc/mm/slice.o] Error 1
make: *** [arch/powerpc/mm] Error 2

on PPC64 the mmu_context.h was included via linux/pkeys.h

---
 arch/powerpc/mm/slice.c | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/mm/slice.c +1 -0
index 9cd87d11fe4e..205fe557ca10 100644
@@ -35,6 +35,7 @@
 #include <asm/mmu.h>
 #include <asm/copro.h>
 #include <asm/hugetlb.h>
+#include <asm/mmu_context.h>
 
 static DEFINE_SPINLOCK(slice_convert_lock);
 
Signature · 1 line
2.14.3
#1 lore raw
Quoted 13 lines · Aneesh Kumar K.V

8xx use slice code when hugetlbfs is enabled. We missed a header include on 8xx which resulted in the below build failure.

config: mpc885_ads_defconfig + CONFIG_HUGETLBFS

CC arch/powerpc/mm/slice.o
arch/powerpc/mm/slice.c: In function 'slice_get_unmapped_area':
arch/powerpc/mm/slice.c:655:2: error: implicit declaration of function 'need_extra_context' [-Werror=implicit-function-declaration] arch/powerpc/mm/slice.c:656:3: error: implicit declaration of function 'alloc_extended_context' [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
make[1]: *** [arch/powerpc/mm/slice.o] Error 1
make: *** [arch/powerpc/mm] Error 2

Quoted 4 lines

on PPC64 the mmu_context.h was included via linux/pkeys.h

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/032900e62c176d75923baf95ad880e

cheers