aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/memblock.h17
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
22struct memblock_region { 25struct 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);
60int memblock_free(phys_addr_t base, phys_addr_t size); 63int memblock_free(phys_addr_t base, phys_addr_t size);
61int memblock_reserve(phys_addr_t base, phys_addr_t size); 64int memblock_reserve(phys_addr_t base, phys_addr_t size);
62void memblock_trim_memory(phys_addr_t align); 65void memblock_trim_memory(phys_addr_t align);
66int memblock_mark_hotplug(phys_addr_t base, phys_addr_t size);
67int 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
65int memblock_search_pfn_nid(unsigned long pfn, unsigned long *start_pfn, 70int 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
130static inline void memblock_set_region_flags(struct memblock_region *r,
131 unsigned long flags)
132{
133 r->flags |= flags;
134}
135
136static 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
126int memblock_set_node(phys_addr_t base, phys_addr_t size, int nid); 143int memblock_set_node(phys_addr_t base, phys_addr_t size, int nid);
127 144