Hello, a kernel configuration for ppc64 started failing to build between v5.1-rc1 and v5.1-rc2. Bisect led to commit 8bc086899816214fbc6047c9c7e15fcab49552bf Author: Ben Hutchings <ben@decadent.org.uk> Date: Sun Mar 17 01:17:56 2019 +0000 powerpc/mm: Only define MAX_PHYSMEM_BITS in SPARSEMEM configurations Syptoms: *Many* warnings like In file included from ./arch/powerpc/include/asm/book3s/64/mmu.h:39, from ./arch/powerpc/include/asm/mmu.h:360, from ./arch/powerpc/include/asm/lppaca.h:36, from ./arch/powerpc/include/asm/paca.h:21, from ./arch/powerpc/include/asm/current.h:16, from ./include/linux/thread_info.h:21, from ./include/asm-generic/preempt.h:5, from ./arch/powerpc/include/generated/asm/preempt.h:1, from ./include/linux/preempt.h:78, from ./include/linux/spinlock.h:51, from ./include/linux/seqlock.h:36, from ./include/linux/time.h:6, from ./include/linux/compat.h:10, from arch/powerpc/kernel/asm-offsets.c:18: ./arch/powerpc/include/asm/book3s/64/mmu-hash.h:584:6: warning: "MAX_PHYSMEM_BITS" is not defined, evaluates to 0 [-Wundef] #if (MAX_PHYSMEM_BITS > MAX_EA_BITS_PER_CONTEXT) ^~~~~~~~~~~~~~~~ ... and eventually abort with: arch/powerpc/mm/slb.c: In function 'slb_allocate_kernel': arch/powerpc/mm/slb.c:697:37: error: 'MAX_PHYSMEM_BITS' undeclared (first use in this function); did you mean 'SWP_TYPE_BITS'? if ((ea & ~REGION_MASK) > (1UL << MAX_PHYSMEM_BITS)) ^~~~~~~~~~~~~~~~ SWP_TYPE_BITS A ppc64 configuration is attached. FWIW, built was made using the cross compiler as provided in Debian buster. I can repeat this on native hardware upon request although I strongly doubt this makes any differences. Build command line was make ARCH=powerpc CROSS_COMPILE=powerpc64-linux-gnu- LDFLAGS= KCPPFLAGS=-fno-pic
Created attachment 282145 [details] .config, take 2
There are two alternate patches posted here: https://lore.kernel.org/linuxppc-dev/87zhp8pntq.fsf@linux.ibm.com/ https://lore.kernel.org/linuxppc-dev/20190409060324.16941-1-mpe@ellerman.id.au/
Was fixed in Subject: Powerpc/mm: Define MAX_PHYSMEM_BITS for all 64-bit configs Origin: v5.1-rc2-7-gcf7cf6977f53 Upstream-Author: Michael Ellerman <mpe@ellerman.id.au> Date: Tue Apr 9 15:43:11 2019 +1000 The recent commit 8bc086899816 ("powerpc/mm: Only define MAX_PHYSMEM_BITS in SPARSEMEM configurations") removed our definition of MAX_PHYSMEM_BITS when SPARSEMEM is disabled. Hence resolving.