Skip to content

Commit

Permalink
[PATCH] create mm/Kconfig for arch-independent memory options
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Dave Hansen <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
hansendc authored and Linus Torvalds committed Jun 23, 2005
1 parent 5b505b9 commit 3a9da76
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions mm/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
choice
prompt "Memory model"
default FLATMEM
default SPARSEMEM if ARCH_SPARSEMEM_DEFAULT
default DISCONTIGMEM if ARCH_DISCONTIGMEM_DEFAULT

config FLATMEM
bool "Flat Memory"
depends on !ARCH_DISCONTIGMEM_ENABLE || ARCH_FLATMEM_ENABLE
help
This option allows you to change some of the ways that
Linux manages its memory internally. Most users will
only have one option here: FLATMEM. This is normal
and a correct option.

If unsure, choose this option over any other.

config DISCONTIGMEM
bool "Discontigious Memory"
depends on ARCH_DISCONTIGMEM_ENABLE
help
If unsure, choose "Flat Memory" over this option.

endchoice

0 comments on commit 3a9da76

Please sign in to comment.