diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/memblock.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 3cf3304e901d..c4f6e53264ed 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h | |||
@@ -34,6 +34,7 @@ struct memblock_type { | |||
34 | struct memblock { | 34 | struct memblock { |
35 | unsigned long debug; | 35 | unsigned long debug; |
36 | u64 rmo_size; | 36 | u64 rmo_size; |
37 | u64 current_limit; | ||
37 | struct memblock_type memory; | 38 | struct memblock_type memory; |
38 | struct memblock_type reserved; | 39 | struct memblock_type reserved; |
39 | }; | 40 | }; |
@@ -46,11 +47,16 @@ extern long memblock_add(u64 base, u64 size); | |||
46 | extern long memblock_remove(u64 base, u64 size); | 47 | extern long memblock_remove(u64 base, u64 size); |
47 | extern long __init memblock_free(u64 base, u64 size); | 48 | extern long __init memblock_free(u64 base, u64 size); |
48 | extern long __init memblock_reserve(u64 base, u64 size); | 49 | extern long __init memblock_reserve(u64 base, u64 size); |
50 | |||
49 | extern u64 __init memblock_alloc_nid(u64 size, u64 align, int nid); | 51 | extern u64 __init memblock_alloc_nid(u64 size, u64 align, int nid); |
50 | extern u64 __init memblock_alloc(u64 size, u64 align); | 52 | extern u64 __init memblock_alloc(u64 size, u64 align); |
53 | |||
54 | /* Flags for memblock_alloc_base() amd __memblock_alloc_base() */ | ||
55 | #define MEMBLOCK_ALLOC_ANYWHERE (~(u64)0) | ||
56 | #define MEMBLOCK_ALLOC_ACCESSIBLE 0 | ||
57 | |||
51 | extern u64 __init memblock_alloc_base(u64 size, | 58 | extern u64 __init memblock_alloc_base(u64 size, |
52 | u64, u64 max_addr); | 59 | u64, u64 max_addr); |
53 | #define MEMBLOCK_ALLOC_ANYWHERE 0 | ||
54 | extern u64 __init __memblock_alloc_base(u64 size, | 60 | extern u64 __init __memblock_alloc_base(u64 size, |
55 | u64 align, u64 max_addr); | 61 | u64 align, u64 max_addr); |
56 | extern u64 __init memblock_phys_mem_size(void); | 62 | extern u64 __init memblock_phys_mem_size(void); |
@@ -66,6 +72,14 @@ extern void memblock_dump_all(void); | |||
66 | /* Provided by the architecture */ | 72 | /* Provided by the architecture */ |
67 | extern u64 memblock_nid_range(u64 start, u64 end, int *nid); | 73 | extern u64 memblock_nid_range(u64 start, u64 end, int *nid); |
68 | 74 | ||
75 | /** | ||
76 | * memblock_set_current_limit - Set the current allocation limit to allow | ||
77 | * limiting allocations to what is currently | ||
78 | * accessible during boot | ||
79 | * @limit: New limit value (physical address) | ||
80 | */ | ||
81 | extern void memblock_set_current_limit(u64 limit); | ||
82 | |||
69 | 83 | ||
70 | /* | 84 | /* |
71 | * pfn conversion functions | 85 | * pfn conversion functions |