diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2022-05-28 02:40:01 +0300 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2022-05-28 02:40:01 +0300 |
| commit | 690e179059e7e89040d1cd564e39761567a8d5dc (patch) | |
| tree | b6a64fc5ca4fd862e17559c46676258ae17c87d5 /include/linux/node.h | |
| parent | 5f76955ab1e43e5795a9631b22ca4f918a0ae986 (diff) | |
| parent | 4b0986a3613c92f4ec1bdc7f60ec66fea135991f (diff) | |
| download | linux-690e179059e7e89040d1cd564e39761567a8d5dc.tar.xz | |
Merge tag 'v5.18' into next
Sync up with mainline to get updates to OMAP4 keypad driver and other
upstream goodies.
Diffstat (limited to 'include/linux/node.h')
| -rw-r--r-- | include/linux/node.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/include/linux/node.h b/include/linux/node.h index bb21fd631b16..40d641a8bfb0 100644 --- a/include/linux/node.h +++ b/include/linux/node.h @@ -99,19 +99,20 @@ extern struct node *node_devices[]; typedef void (*node_registration_func_t)(struct node *); #if defined(CONFIG_MEMORY_HOTPLUG) && defined(CONFIG_NUMA) -void link_mem_sections(int nid, unsigned long start_pfn, - unsigned long end_pfn, - enum meminit_context context); +void register_memory_blocks_under_node(int nid, unsigned long start_pfn, + unsigned long end_pfn, + enum meminit_context context); #else -static inline void link_mem_sections(int nid, unsigned long start_pfn, - unsigned long end_pfn, - enum meminit_context context) +static inline void register_memory_blocks_under_node(int nid, unsigned long start_pfn, + unsigned long end_pfn, + enum meminit_context context) { } #endif extern void unregister_node(struct node *node); #ifdef CONFIG_NUMA +extern void node_dev_init(void); /* Core of the node registration - only memory hotplug should use this */ extern int __register_one_node(int nid); @@ -128,8 +129,8 @@ static inline int register_one_node(int nid) error = __register_one_node(nid); if (error) return error; - /* link memory sections under this node */ - link_mem_sections(nid, start_pfn, end_pfn, MEMINIT_EARLY); + register_memory_blocks_under_node(nid, start_pfn, end_pfn, + MEMINIT_EARLY); } return error; @@ -149,6 +150,9 @@ extern void register_hugetlbfs_with_node(node_registration_func_t doregister, node_registration_func_t unregister); #endif #else +static inline void node_dev_init(void) +{ +} static inline int __register_one_node(int nid) { return 0; @@ -181,4 +185,9 @@ static inline void register_hugetlbfs_with_node(node_registration_func_t reg, #define to_node(device) container_of(device, struct node, dev) +static inline bool node_is_toptier(int node) +{ + return node_state(node, N_CPU); +} + #endif /* _LINUX_NODE_H_ */ |
