diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/memory.h | 6 | ||||
-rw-r--r-- | include/linux/memory_hotplug.h | 2 | ||||
-rw-r--r-- | include/linux/node.h | 13 |
3 files changed, 17 insertions, 4 deletions
diff --git a/include/linux/memory.h b/include/linux/memory.h index 36c82c9e6ea7..3fdc10806d31 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
@@ -79,14 +79,14 @@ static inline int memory_notify(unsigned long val, void *v) | |||
79 | #else | 79 | #else |
80 | extern int register_memory_notifier(struct notifier_block *nb); | 80 | extern int register_memory_notifier(struct notifier_block *nb); |
81 | extern void unregister_memory_notifier(struct notifier_block *nb); | 81 | extern void unregister_memory_notifier(struct notifier_block *nb); |
82 | extern int register_new_memory(struct mem_section *); | 82 | extern int register_new_memory(int, struct mem_section *); |
83 | extern int unregister_memory_section(struct mem_section *); | 83 | extern int unregister_memory_section(struct mem_section *); |
84 | extern int memory_dev_init(void); | 84 | extern int memory_dev_init(void); |
85 | extern int remove_memory_block(unsigned long, struct mem_section *, int); | 85 | extern int remove_memory_block(unsigned long, struct mem_section *, int); |
86 | extern int memory_notify(unsigned long val, void *v); | 86 | extern int memory_notify(unsigned long val, void *v); |
87 | extern struct memory_block *find_memory_block(struct mem_section *); | ||
87 | #define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT) | 88 | #define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT) |
88 | 89 | enum mem_add_context { BOOT, HOTPLUG }; | |
89 | |||
90 | #endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */ | 90 | #endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */ |
91 | 91 | ||
92 | #ifdef CONFIG_MEMORY_HOTPLUG | 92 | #ifdef CONFIG_MEMORY_HOTPLUG |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 763ba81fc0f0..d95f72e79b82 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -72,7 +72,7 @@ extern void __offline_isolated_pages(unsigned long, unsigned long); | |||
72 | extern int offline_pages(unsigned long, unsigned long, unsigned long); | 72 | extern int offline_pages(unsigned long, unsigned long, unsigned long); |
73 | 73 | ||
74 | /* reasonably generic interface to expand the physical pages in a zone */ | 74 | /* reasonably generic interface to expand the physical pages in a zone */ |
75 | extern int __add_pages(struct zone *zone, unsigned long start_pfn, | 75 | extern int __add_pages(int nid, struct zone *zone, unsigned long start_pfn, |
76 | unsigned long nr_pages); | 76 | unsigned long nr_pages); |
77 | extern int __remove_pages(struct zone *zone, unsigned long start_pfn, | 77 | extern int __remove_pages(struct zone *zone, unsigned long start_pfn, |
78 | unsigned long nr_pages); | 78 | unsigned long nr_pages); |
diff --git a/include/linux/node.h b/include/linux/node.h index bc001bc225c3..681a697b9a86 100644 --- a/include/linux/node.h +++ b/include/linux/node.h | |||
@@ -26,6 +26,7 @@ struct node { | |||
26 | struct sys_device sysdev; | 26 | struct sys_device sysdev; |
27 | }; | 27 | }; |
28 | 28 | ||
29 | struct memory_block; | ||
29 | extern struct node node_devices[]; | 30 | extern struct node node_devices[]; |
30 | 31 | ||
31 | extern int register_node(struct node *, int, struct node *); | 32 | extern int register_node(struct node *, int, struct node *); |
@@ -35,6 +36,9 @@ extern int register_one_node(int nid); | |||
35 | extern void unregister_one_node(int nid); | 36 | extern void unregister_one_node(int nid); |
36 | extern int register_cpu_under_node(unsigned int cpu, unsigned int nid); | 37 | extern int register_cpu_under_node(unsigned int cpu, unsigned int nid); |
37 | extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid); | 38 | extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid); |
39 | extern int register_mem_sect_under_node(struct memory_block *mem_blk, | ||
40 | int nid); | ||
41 | extern int unregister_mem_sect_under_nodes(struct memory_block *mem_blk); | ||
38 | #else | 42 | #else |
39 | static inline int register_one_node(int nid) | 43 | static inline int register_one_node(int nid) |
40 | { | 44 | { |
@@ -52,6 +56,15 @@ static inline int unregister_cpu_under_node(unsigned int cpu, unsigned int nid) | |||
52 | { | 56 | { |
53 | return 0; | 57 | return 0; |
54 | } | 58 | } |
59 | static inline int register_mem_sect_under_node(struct memory_block *mem_blk, | ||
60 | int nid) | ||
61 | { | ||
62 | return 0; | ||
63 | } | ||
64 | static inline int unregister_mem_sect_under_nodes(struct memory_block *mem_blk) | ||
65 | { | ||
66 | return 0; | ||
67 | } | ||
55 | #endif | 68 | #endif |
56 | 69 | ||
57 | #define to_node(sys_device) container_of(sys_device, struct node, sysdev) | 70 | #define to_node(sys_device) container_of(sys_device, struct node, sysdev) |