diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/memblock.h | 24 |
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 | ||
48 | extern struct memblock memblock; | 48 | extern struct memblock memblock; |
49 | extern int memblock_debug; | 49 | extern int memblock_debug; |
50 | #ifdef CONFIG_MOVABLE_NODE | ||
51 | /* If movable_node boot option specified */ | ||
52 | extern 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); | |||
65 | void memblock_trim_memory(phys_addr_t align); | 69 | void memblock_trim_memory(phys_addr_t align); |
66 | int memblock_mark_hotplug(phys_addr_t base, phys_addr_t size); | 70 | int memblock_mark_hotplug(phys_addr_t base, phys_addr_t size); |
67 | int memblock_clear_hotplug(phys_addr_t base, phys_addr_t size); | 71 | int memblock_clear_hotplug(phys_addr_t base, phys_addr_t size); |
72 | #ifdef CONFIG_MOVABLE_NODE | ||
73 | static inline bool memblock_is_hotpluggable(struct memblock_region *m) | ||
74 | { | ||
75 | return m->flags & MEMBLOCK_HOTPLUG; | ||
76 | } | ||
77 | |||
78 | static inline bool movable_node_is_enabled(void) | ||
79 | { | ||
80 | return movable_node_enabled; | ||
81 | } | ||
82 | #else | ||
83 | static inline bool memblock_is_hotpluggable(struct memblock_region *m) | ||
84 | { | ||
85 | return false; | ||
86 | } | ||
87 | static 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 |
70 | int memblock_search_pfn_nid(unsigned long pfn, unsigned long *start_pfn, | 94 | int memblock_search_pfn_nid(unsigned long pfn, unsigned long *start_pfn, |