ppc64 4kB: MAX_PHYSMEM_BITS undefined

Hugh Dickins hughd at google.com
Tue Apr 9 06:23:10 AEST 2019


Hi Ben,

5.1-rc's 8bc086899816 ("powerpc/mm: Only define MAX_PHYSMEM_BITS in
SPARSEMEM configurations") has sadly broken the build for my config
on the G5, which has (amongst a few other options):

CONFIG_PPC_BOOK3S_64=y
CONFIG_PPC_BOOK3S=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_DEFAULT=y
CONFIG_PPC_4K_PAGES=y
# CONFIG_PPC_64K_PAGES is not set
# CONFIG_SPARSEMEM_MANUAL is not set
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y

Easily enough worked around for me by...

--- 5.1-rc4/arch/powerpc/include/asm/mmu.h	2019-03-24 15:40:26.833378215 -0700
+++ linux/arch/powerpc/include/asm/mmu.h	2019-04-07 19:51:11.419295089 -0700
@@ -352,7 +352,7 @@ static inline bool strict_kernel_rwx_ena
 #if defined(CONFIG_SPARSEMEM_VMEMMAP) && defined(CONFIG_SPARSEMEM_EXTREME) &&	\
 	defined (CONFIG_PPC_64K_PAGES)
 #define MAX_PHYSMEM_BITS        51
-#elif defined(CONFIG_SPARSEMEM)
+#else
 #define MAX_PHYSMEM_BITS        46
 #endif

...but I don't suppose that's what you want to do.

I wonder if there was a momentary mixup between 64 bits and 64kB pages -
I'm a non-conformist using 4kB pages on ppc64.

Hugh


More information about the Linuxppc-dev mailing list