diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/Kconfig | 8 | ||||
-rw-r--r-- | mm/page_alloc.c | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/mm/Kconfig b/mm/Kconfig index 69caa9d8674e..15c131393639 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -23,3 +23,11 @@ config DISCONTIGMEM endchoice +# +# Both the NUMA code and DISCONTIGMEM use arrays of pg_data_t's +# to represent different areas of memory. This variable allows +# those dependencies to exist individually. +# +config NEED_MULTIPLE_NODES + def_bool y + depends on DISCONTIGMEM || NUMA diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 1958358e29b0..20e239599db0 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1972,18 +1972,18 @@ void __init free_area_init_node(int nid, struct pglist_data *pgdat, free_area_init_core(pgdat, zones_size, zholes_size); } -#ifndef CONFIG_DISCONTIGMEM +#ifndef CONFIG_NEED_MULTIPLE_NODES static bootmem_data_t contig_bootmem_data; struct pglist_data contig_page_data = { .bdata = &contig_bootmem_data }; EXPORT_SYMBOL(contig_page_data); +#endif void __init free_area_init(unsigned long *zones_size) { - free_area_init_node(0, &contig_page_data, zones_size, + free_area_init_node(0, NODE_DATA(0), zones_size, __pa(PAGE_OFFSET) >> PAGE_SHIFT, NULL); } -#endif #ifdef CONFIG_PROC_FS |