diff options
Diffstat (limited to 'include/linux/node.h')
| -rw-r--r-- | include/linux/node.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/linux/node.h b/include/linux/node.h index 6d336e38d155..257bb3d6d014 100644 --- a/include/linux/node.h +++ b/include/linux/node.h | |||
| @@ -33,10 +33,10 @@ typedef void (*node_registration_func_t)(struct node *); | |||
| 33 | 33 | ||
| 34 | #if defined(CONFIG_MEMORY_HOTPLUG_SPARSE) && defined(CONFIG_NUMA) | 34 | #if defined(CONFIG_MEMORY_HOTPLUG_SPARSE) && defined(CONFIG_NUMA) |
| 35 | extern int link_mem_sections(int nid, unsigned long start_pfn, | 35 | extern int link_mem_sections(int nid, unsigned long start_pfn, |
| 36 | unsigned long nr_pages, bool check_nid); | 36 | unsigned long end_pfn); |
| 37 | #else | 37 | #else |
| 38 | static inline int link_mem_sections(int nid, unsigned long start_pfn, | 38 | static inline int link_mem_sections(int nid, unsigned long start_pfn, |
| 39 | unsigned long nr_pages, bool check_nid) | 39 | unsigned long end_pfn) |
| 40 | { | 40 | { |
| 41 | return 0; | 41 | return 0; |
| 42 | } | 42 | } |
| @@ -54,12 +54,14 @@ static inline int register_one_node(int nid) | |||
| 54 | 54 | ||
| 55 | if (node_online(nid)) { | 55 | if (node_online(nid)) { |
| 56 | struct pglist_data *pgdat = NODE_DATA(nid); | 56 | struct pglist_data *pgdat = NODE_DATA(nid); |
| 57 | unsigned long start_pfn = pgdat->node_start_pfn; | ||
| 58 | unsigned long end_pfn = start_pfn + pgdat->node_spanned_pages; | ||
| 57 | 59 | ||
| 58 | error = __register_one_node(nid); | 60 | error = __register_one_node(nid); |
| 59 | if (error) | 61 | if (error) |
| 60 | return error; | 62 | return error; |
| 61 | /* link memory sections under this node */ | 63 | /* link memory sections under this node */ |
| 62 | error = link_mem_sections(nid, pgdat->node_start_pfn, pgdat->node_spanned_pages, true); | 64 | error = link_mem_sections(nid, start_pfn, end_pfn); |
| 63 | } | 65 | } |
| 64 | 66 | ||
| 65 | return error; | 67 | return error; |
| @@ -69,7 +71,7 @@ extern void unregister_one_node(int nid); | |||
| 69 | extern int register_cpu_under_node(unsigned int cpu, unsigned int nid); | 71 | extern int register_cpu_under_node(unsigned int cpu, unsigned int nid); |
| 70 | extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid); | 72 | extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid); |
| 71 | extern int register_mem_sect_under_node(struct memory_block *mem_blk, | 73 | extern int register_mem_sect_under_node(struct memory_block *mem_blk, |
| 72 | int nid, bool check_nid); | 74 | void *arg); |
| 73 | extern int unregister_mem_sect_under_nodes(struct memory_block *mem_blk, | 75 | extern int unregister_mem_sect_under_nodes(struct memory_block *mem_blk, |
| 74 | unsigned long phys_index); | 76 | unsigned long phys_index); |
| 75 | 77 | ||
| @@ -99,7 +101,7 @@ static inline int unregister_cpu_under_node(unsigned int cpu, unsigned int nid) | |||
| 99 | return 0; | 101 | return 0; |
| 100 | } | 102 | } |
| 101 | static inline int register_mem_sect_under_node(struct memory_block *mem_blk, | 103 | static inline int register_mem_sect_under_node(struct memory_block *mem_blk, |
| 102 | int nid, bool check_nid) | 104 | void *arg) |
| 103 | { | 105 | { |
| 104 | return 0; | 106 | return 0; |
| 105 | } | 107 | } |
