diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/memblock.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 9a805ec6e794..b788faa71563 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h | |||
@@ -19,6 +19,9 @@ | |||
19 | 19 | ||
20 | #define INIT_MEMBLOCK_REGIONS 128 | 20 | #define INIT_MEMBLOCK_REGIONS 128 |
21 | 21 | ||
22 | /* Definition of memblock flags. */ | ||
23 | #define MEMBLOCK_HOTPLUG 0x1 /* hotpluggable region */ | ||
24 | |||
22 | struct memblock_region { | 25 | struct memblock_region { |
23 | phys_addr_t base; | 26 | phys_addr_t base; |
24 | phys_addr_t size; | 27 | phys_addr_t size; |
@@ -60,6 +63,8 @@ int memblock_remove(phys_addr_t base, phys_addr_t size); | |||
60 | int memblock_free(phys_addr_t base, phys_addr_t size); | 63 | int memblock_free(phys_addr_t base, phys_addr_t size); |
61 | int memblock_reserve(phys_addr_t base, phys_addr_t size); | 64 | int memblock_reserve(phys_addr_t base, phys_addr_t size); |
62 | void memblock_trim_memory(phys_addr_t align); | 65 | void memblock_trim_memory(phys_addr_t align); |
66 | 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); | ||
63 | 68 | ||
64 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP | 69 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP |
65 | int memblock_search_pfn_nid(unsigned long pfn, unsigned long *start_pfn, | 70 | int memblock_search_pfn_nid(unsigned long pfn, unsigned long *start_pfn, |
@@ -122,6 +127,18 @@ void __next_free_mem_range_rev(u64 *idx, int nid, phys_addr_t *out_start, | |||
122 | i != (u64)ULLONG_MAX; \ | 127 | i != (u64)ULLONG_MAX; \ |
123 | __next_free_mem_range_rev(&i, nid, p_start, p_end, p_nid)) | 128 | __next_free_mem_range_rev(&i, nid, p_start, p_end, p_nid)) |
124 | 129 | ||
130 | static inline void memblock_set_region_flags(struct memblock_region *r, | ||
131 | unsigned long flags) | ||
132 | { | ||
133 | r->flags |= flags; | ||
134 | } | ||
135 | |||
136 | static inline void memblock_clear_region_flags(struct memblock_region *r, | ||
137 | unsigned long flags) | ||
138 | { | ||
139 | r->flags &= ~flags; | ||
140 | } | ||
141 | |||
125 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP | 142 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP |
126 | int memblock_set_node(phys_addr_t base, phys_addr_t size, int nid); | 143 | int memblock_set_node(phys_addr_t base, phys_addr_t size, int nid); |
127 | 144 | ||