aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/memblock.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index 97480d392e40..2f52c8c492bd 100644
--- a/include/linux/memblock.h
+++ b/include/linux/memblock.h
@@ -47,6 +47,10 @@ struct memblock {
47 47
48extern struct memblock memblock; 48extern struct memblock memblock;
49extern int memblock_debug; 49extern int memblock_debug;
50#ifdef CONFIG_MOVABLE_NODE
51/* If movable_node boot option specified */
52extern bool movable_node_enabled;
53#endif /* CONFIG_MOVABLE_NODE */
50 54
51#define memblock_dbg(fmt, ...) \ 55#define memblock_dbg(fmt, ...) \
52 if (memblock_debug) printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) 56 if (memblock_debug) printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
@@ -65,6 +69,26 @@ int memblock_reserve(phys_addr_t base, phys_addr_t size);
65void memblock_trim_memory(phys_addr_t align); 69void memblock_trim_memory(phys_addr_t align);
66int memblock_mark_hotplug(phys_addr_t base, phys_addr_t size); 70int memblock_mark_hotplug(phys_addr_t base, phys_addr_t size);
67int memblock_clear_hotplug(phys_addr_t base, phys_addr_t size); 71int memblock_clear_hotplug(phys_addr_t base, phys_addr_t size);
72#ifdef CONFIG_MOVABLE_NODE
73static inline bool memblock_is_hotpluggable(struct memblock_region *m)
74{
75 return m->flags & MEMBLOCK_HOTPLUG;
76}
77
78static inline bool movable_node_is_enabled(void)
79{
80 return movable_node_enabled;
81}
82#else
83static inline bool memblock_is_hotpluggable(struct memblock_region *m)
84{
85 return false;
86}
87static inline bool movable_node_is_enabled(void)
88{
89 return false;
90}
91#endif
68 92
69#ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP 93#ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP
70int memblock_search_pfn_nid(unsigned long pfn, unsigned long *start_pfn, 94int memblock_search_pfn_nid(unsigned long pfn, unsigned long *start_pfn,