Commit 3a9da7655d2d5b7f790a370328cf093440c80496
Committed by
Linus Torvalds
1 parent
5b505b90b2
Exists in
master
and in
20 other branches
[PATCH] create mm/Kconfig for arch-independent memory options
With sparsemem being introduced, we need a central place for new memory-related .config options: mm/Kconfig. This allows us to remove many of the duplicated arch-specific options. The new option, CONFIG_FLATMEM, is there to enable us to detangle NUMA and DISCONTIGMEM. This is a requirement for sparsemem because sparsemem uses the NUMA code without the presence of DISCONTIGMEM. The sparsemem patches use CONFIG_FLATMEM in generic code, so this patch is a requirement before applying them. Almost all places that used to do '#ifndef CONFIG_DISCONTIGMEM' should use '#ifdef CONFIG_FLATMEM' instead. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 1 changed file with 25 additions and 0 deletions Side-by-side Diff
mm/Kconfig
1 | +choice | |
2 | + prompt "Memory model" | |
3 | + default FLATMEM | |
4 | + default SPARSEMEM if ARCH_SPARSEMEM_DEFAULT | |
5 | + default DISCONTIGMEM if ARCH_DISCONTIGMEM_DEFAULT | |
6 | + | |
7 | +config FLATMEM | |
8 | + bool "Flat Memory" | |
9 | + depends on !ARCH_DISCONTIGMEM_ENABLE || ARCH_FLATMEM_ENABLE | |
10 | + help | |
11 | + This option allows you to change some of the ways that | |
12 | + Linux manages its memory internally. Most users will | |
13 | + only have one option here: FLATMEM. This is normal | |
14 | + and a correct option. | |
15 | + | |
16 | + If unsure, choose this option over any other. | |
17 | + | |
18 | +config DISCONTIGMEM | |
19 | + bool "Discontigious Memory" | |
20 | + depends on ARCH_DISCONTIGMEM_ENABLE | |
21 | + help | |
22 | + If unsure, choose "Flat Memory" over this option. | |
23 | + | |
24 | +endchoice |