diff options
Diffstat (limited to 'include/linux/node.h')
| -rw-r--r-- | include/linux/node.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/node.h b/include/linux/node.h index 681a697b9a86..06292dac3eab 100644 --- a/include/linux/node.h +++ b/include/linux/node.h | |||
| @@ -21,13 +21,19 @@ | |||
| 21 | 21 | ||
| 22 | #include <linux/sysdev.h> | 22 | #include <linux/sysdev.h> |
| 23 | #include <linux/cpumask.h> | 23 | #include <linux/cpumask.h> |
| 24 | #include <linux/workqueue.h> | ||
| 24 | 25 | ||
| 25 | struct node { | 26 | struct node { |
| 26 | struct sys_device sysdev; | 27 | struct sys_device sysdev; |
| 28 | |||
| 29 | #if defined(CONFIG_MEMORY_HOTPLUG_SPARSE) && defined(CONFIG_HUGETLBFS) | ||
| 30 | struct work_struct node_work; | ||
| 31 | #endif | ||
| 27 | }; | 32 | }; |
| 28 | 33 | ||
| 29 | struct memory_block; | 34 | struct memory_block; |
| 30 | extern struct node node_devices[]; | 35 | extern struct node node_devices[]; |
| 36 | typedef void (*node_registration_func_t)(struct node *); | ||
| 31 | 37 | ||
| 32 | extern int register_node(struct node *, int, struct node *); | 38 | extern int register_node(struct node *, int, struct node *); |
| 33 | extern void unregister_node(struct node *node); | 39 | extern void unregister_node(struct node *node); |
| @@ -39,6 +45,11 @@ 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, | 45 | extern int register_mem_sect_under_node(struct memory_block *mem_blk, |
| 40 | int nid); | 46 | int nid); |
| 41 | extern int unregister_mem_sect_under_nodes(struct memory_block *mem_blk); | 47 | extern int unregister_mem_sect_under_nodes(struct memory_block *mem_blk); |
| 48 | |||
| 49 | #ifdef CONFIG_HUGETLBFS | ||
| 50 | extern void register_hugetlbfs_with_node(node_registration_func_t doregister, | ||
| 51 | node_registration_func_t unregister); | ||
| 52 | #endif | ||
| 42 | #else | 53 | #else |
| 43 | static inline int register_one_node(int nid) | 54 | static inline int register_one_node(int nid) |
| 44 | { | 55 | { |
| @@ -65,6 +76,11 @@ static inline int unregister_mem_sect_under_nodes(struct memory_block *mem_blk) | |||
| 65 | { | 76 | { |
| 66 | return 0; | 77 | return 0; |
| 67 | } | 78 | } |
| 79 | |||
| 80 | static inline void register_hugetlbfs_with_node(node_registration_func_t reg, | ||
| 81 | node_registration_func_t unreg) | ||
| 82 | { | ||
| 83 | } | ||
| 68 | #endif | 84 | #endif |
| 69 | 85 | ||
| 70 | #define to_node(sys_device) container_of(sys_device, struct node, sysdev) | 86 | #define to_node(sys_device) container_of(sys_device, struct node, sysdev) |
