--- b/arch/x86/include/asm/sparsemem.h | 4 ++++ 1 file changed, 4 insertions(+) diff -puN arch/x86/include/asm/sparsemem.h~static-sparsemem-0 arch/x86/include/asm/sparsemem.h --- a/arch/x86/include/asm/sparsemem.h~static-sparsemem-0 2025-05-16 08:05:19.006150139 -0700 +++ b/arch/x86/include/asm/sparsemem.h 2025-05-16 08:07:14.517189024 -0700 @@ -26,7 +26,11 @@ # endif #else /* CONFIG_X86_32 */ # define SECTION_SIZE_BITS 27 /* matt - 128 is convenient right now */ +#ifdef CONFIG_SPARSEMEM_VMEMMAP # define MAX_PHYSMEM_BITS (pgtable_l5_enabled() ? 52 : 46) +# else +# define MAX_PHYSMEM_BITS 46 +# endif #endif #endif /* CONFIG_SPARSEMEM */ _