From: Keith Mannthey Migate CONFIG_MEMORY_HOTPLUG to CONFIG_MEMORY_HOTPLUG_SPARSE where needed. Signed-off-by: Keith Mannthey Cc: KAMEZAWA Hiroyuki Cc: Andi Kleen Signed-off-by: Andrew Morton --- drivers/base/Makefile | 2 +- include/linux/memory.h | 4 ++-- mm/memory_hotplug.c | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff -puN drivers/base/Makefile~hot-add-mem-x86_64-use-config_memory_hotplug_sparse drivers/base/Makefile --- a/drivers/base/Makefile~hot-add-mem-x86_64-use-config_memory_hotplug_sparse +++ a/drivers/base/Makefile @@ -8,7 +8,7 @@ obj-y += power/ obj-$(CONFIG_ISA) += isa.o obj-$(CONFIG_FW_LOADER) += firmware_class.o obj-$(CONFIG_NUMA) += node.o -obj-$(CONFIG_MEMORY_HOTPLUG) += memory.o +obj-$(CONFIG_MEMORY_HOTPLUG_SPARSE) += memory.o obj-$(CONFIG_SMP) += topology.o obj-$(CONFIG_SYS_HYPERVISOR) += hypervisor.o diff -puN include/linux/memory.h~hot-add-mem-x86_64-use-config_memory_hotplug_sparse include/linux/memory.h --- a/include/linux/memory.h~hot-add-mem-x86_64-use-config_memory_hotplug_sparse +++ a/include/linux/memory.h @@ -57,7 +57,7 @@ struct memory_block { struct notifier_block; struct mem_section; -#ifndef CONFIG_MEMORY_HOTPLUG +#ifndef CONFIG_MEMORY_HOTPLUG_SPARSE static inline int memory_dev_init(void) { return 0; @@ -78,7 +78,7 @@ extern int remove_memory_block(unsigned #define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION< +#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE static int __add_zone(struct zone *zone, unsigned long phys_start_pfn) { struct pglist_data *pgdat = zone->zone_pgdat; @@ -189,6 +190,7 @@ int online_pages(unsigned long pfn, unsi vm_total_pages = nr_free_pagecache_pages(); return 0; } +#endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */ static pg_data_t *hotadd_new_pgdat(int nid, u64 start) { _