Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[POWERPC] Fix MAX_ORDER config problem

The allyesconfig (among others) build was giving this:

In file included from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from include/linux/percpu.h:5,
from include2/asm/time.h:18,
from include2/asm/cputime.h:26,
from include/linux/sched.h:67,
from
arch/powerpc/kernel/asm-offsets.c:17:
include/linux/mmzone.h:791:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE

Kconfig options are order depenendent, so move the setting of
FORCE_MAX_ZONEORDER to after the setting of PPC_64K_PAGES. Also add an
explicit !PPC_64K_PAGES.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

Stephen Rothwell and committed by
Paul Mackerras
53bcddb9 320787c7

+20 -20
+20 -20
arch/powerpc/Kconfig
··· 211 211 source kernel/Kconfig.preempt 212 212 source "fs/Kconfig.binfmt" 213 213 214 - config FORCE_MAX_ZONEORDER 215 - int "Maximum zone order" 216 - default "9" if PPC_64K_PAGES 217 - default "13" if PPC64 218 - default "11" 219 - help 220 - The kernel memory allocator divides physically contiguous memory 221 - blocks into "zones", where each zone is a power of two number of 222 - pages. This option selects the largest power of two that the kernel 223 - keeps in the memory allocator. If you need to allocate very large 224 - blocks of physically contiguous memory, then you may need to 225 - increase this value. 226 - 227 - This config option is actually maximum order plus one. For example, 228 - a value of 11 means that the largest free memory block is 2^10 pages. 229 - 230 - The page size is not necessarily 4KB. For example, on 64-bit 231 - systems, 64KB pages can be enabled via CONFIG_PPC_64K_PAGES. Keep 232 - this in mind when choosing a value for this option. 233 - 234 214 config HUGETLB_PAGE_SIZE_VARIABLE 235 215 bool 236 216 depends on HUGETLB_PAGE ··· 382 402 them by loading each individual 4k page on demand transparently, 383 403 while on hardware with such support, it will be used to map 384 404 normal application pages. 405 + 406 + config FORCE_MAX_ZONEORDER 407 + int "Maximum zone order" 408 + default "9" if PPC_64K_PAGES 409 + default "13" if PPC64 && !PPC_64K_PAGES 410 + default "11" 411 + help 412 + The kernel memory allocator divides physically contiguous memory 413 + blocks into "zones", where each zone is a power of two number of 414 + pages. This option selects the largest power of two that the kernel 415 + keeps in the memory allocator. If you need to allocate very large 416 + blocks of physically contiguous memory, then you may need to 417 + increase this value. 418 + 419 + This config option is actually maximum order plus one. For example, 420 + a value of 11 means that the largest free memory block is 2^10 pages. 421 + 422 + The page size is not necessarily 4KB. For example, on 64-bit 423 + systems, 64KB pages can be enabled via CONFIG_PPC_64K_PAGES. Keep 424 + this in mind when choosing a value for this option. 385 425 386 426 config PPC_SUBPAGE_PROT 387 427 bool "Support setting protections for 4k subpages"