sparsemem: make SPARSEMEM_VMEMMAP selectable

SPARSEMEM_VMEMMAP needs to be a selectable config option to support
building the kernel both with and without sparsemem vmemmap support. This
selection is desirable for platforms which could be configured one way for
platform specific builds and the other for multi-platform builds.

Signed-off-by: Miguel Botón <mboton@gmail.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Geoff Levand and committed by
Linus Torvalds
a5ee6daa 2e12a7fb

+7 -8
+7 -8
mm/Kconfig
··· 112 112 def_bool y 113 113 depends on SPARSEMEM && !SPARSEMEM_STATIC 114 114 115 - # 116 - # SPARSEMEM_VMEMMAP uses a virtually mapped mem_map to optimise pfn_to_page 117 - # and page_to_pfn. The most efficient option where kernel virtual space is 118 - # not under pressure. 119 - # 120 115 config SPARSEMEM_VMEMMAP_ENABLE 121 116 def_bool n 122 117 123 118 config SPARSEMEM_VMEMMAP 124 - bool 125 - depends on SPARSEMEM 126 - default y if (SPARSEMEM_VMEMMAP_ENABLE) 119 + bool "Sparse Memory virtual memmap" 120 + depends on SPARSEMEM && SPARSEMEM_VMEMMAP_ENABLE 121 + default y 122 + help 123 + SPARSEMEM_VMEMMAP uses a virtually mapped memmap to optimise 124 + pfn_to_page and page_to_pfn operations. This is the most 125 + efficient option when sufficient kernel resources are available. 127 126 128 127 # eventually, we can have this option just 'select SPARSEMEM' 129 128 config MEMORY_HOTPLUG