aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/Makefile2
-rw-r--r--include/linux/memory.h4
-rw-r--r--mm/memory_hotplug.c2
3 files changed, 5 insertions, 3 deletions
diff --git a/drivers/base/Makefile b/drivers/base/Makefile
index b539e5e75b56..7bbb9eeda235 100644
--- a/drivers/base/Makefile
+++ b/drivers/base/Makefile
@@ -8,7 +8,7 @@ obj-y += power/
8obj-$(CONFIG_ISA) += isa.o 8obj-$(CONFIG_ISA) += isa.o
9obj-$(CONFIG_FW_LOADER) += firmware_class.o 9obj-$(CONFIG_FW_LOADER) += firmware_class.o
10obj-$(CONFIG_NUMA) += node.o 10obj-$(CONFIG_NUMA) += node.o
11obj-$(CONFIG_MEMORY_HOTPLUG) += memory.o 11obj-$(CONFIG_MEMORY_HOTPLUG_SPARSE) += memory.o
12obj-$(CONFIG_SMP) += topology.o 12obj-$(CONFIG_SMP) += topology.o
13obj-$(CONFIG_SYS_HYPERVISOR) += hypervisor.o 13obj-$(CONFIG_SYS_HYPERVISOR) += hypervisor.o
14 14
diff --git a/include/linux/memory.h b/include/linux/memory.h
index 8f04143ca363..654ef5544878 100644
--- a/include/linux/memory.h
+++ b/include/linux/memory.h
@@ -57,7 +57,7 @@ struct memory_block {
57struct notifier_block; 57struct notifier_block;
58struct mem_section; 58struct mem_section;
59 59
60#ifndef CONFIG_MEMORY_HOTPLUG 60#ifndef CONFIG_MEMORY_HOTPLUG_SPARSE
61static inline int memory_dev_init(void) 61static inline int memory_dev_init(void)
62{ 62{
63 return 0; 63 return 0;
@@ -78,7 +78,7 @@ extern int remove_memory_block(unsigned long, struct mem_section *, int);
78#define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT) 78#define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT)
79 79
80 80
81#endif /* CONFIG_MEMORY_HOTPLUG */ 81#endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */
82 82
83#define hotplug_memory_notifier(fn, pri) { \ 83#define hotplug_memory_notifier(fn, pri) { \
84 static struct notifier_block fn##_mem_nb = \ 84 static struct notifier_block fn##_mem_nb = \
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 63b14d4f68fb..7666dbd328df 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -26,6 +26,7 @@
26 26
27#include <asm/tlbflush.h> 27#include <asm/tlbflush.h>
28 28
29#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
29static int __add_zone(struct zone *zone, unsigned long phys_start_pfn) 30static int __add_zone(struct zone *zone, unsigned long phys_start_pfn)
30{ 31{
31 struct pglist_data *pgdat = zone->zone_pgdat; 32 struct pglist_data *pgdat = zone->zone_pgdat;
@@ -192,6 +193,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages)
192 writeback_set_ratelimit(); 193 writeback_set_ratelimit();
193 return 0; 194 return 0;
194} 195}
196#endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */
195 197
196static pg_data_t *hotadd_new_pgdat(int nid, u64 start) 198static pg_data_t *hotadd_new_pgdat(int nid, u64 start)
197{ 199{