diff options
-rw-r--r-- | include/linux/memblock.h | 24 | ||||
-rw-r--r-- | mm/memblock.c | 14 |
2 files changed, 19 insertions, 19 deletions
diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 7d285271130d..5096458c7535 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h | |||
@@ -51,39 +51,39 @@ u64 memblock_find_in_range(u64 start, u64 end, u64 size, u64 align); | |||
51 | int memblock_free_reserved_regions(void); | 51 | int memblock_free_reserved_regions(void); |
52 | int memblock_reserve_reserved_regions(void); | 52 | int memblock_reserve_reserved_regions(void); |
53 | 53 | ||
54 | extern void __init memblock_init(void); | 54 | extern void memblock_init(void); |
55 | extern void __init memblock_analyze(void); | 55 | extern void memblock_analyze(void); |
56 | extern long memblock_add(phys_addr_t base, phys_addr_t size); | 56 | extern long memblock_add(phys_addr_t base, phys_addr_t size); |
57 | extern long memblock_remove(phys_addr_t base, phys_addr_t size); | 57 | extern long memblock_remove(phys_addr_t base, phys_addr_t size); |
58 | extern long __init memblock_free(phys_addr_t base, phys_addr_t size); | 58 | extern long memblock_free(phys_addr_t base, phys_addr_t size); |
59 | extern long __init memblock_reserve(phys_addr_t base, phys_addr_t size); | 59 | extern long memblock_reserve(phys_addr_t base, phys_addr_t size); |
60 | 60 | ||
61 | /* The numa aware allocator is only available if | 61 | /* The numa aware allocator is only available if |
62 | * CONFIG_ARCH_POPULATES_NODE_MAP is set | 62 | * CONFIG_ARCH_POPULATES_NODE_MAP is set |
63 | */ | 63 | */ |
64 | extern phys_addr_t __init memblock_alloc_nid(phys_addr_t size, phys_addr_t align, | 64 | extern phys_addr_t memblock_alloc_nid(phys_addr_t size, phys_addr_t align, |
65 | int nid); | 65 | int nid); |
66 | extern phys_addr_t __init memblock_alloc_try_nid(phys_addr_t size, phys_addr_t align, | 66 | extern phys_addr_t memblock_alloc_try_nid(phys_addr_t size, phys_addr_t align, |
67 | int nid); | 67 | int nid); |
68 | 68 | ||
69 | extern phys_addr_t __init memblock_alloc(phys_addr_t size, phys_addr_t align); | 69 | extern phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t align); |
70 | 70 | ||
71 | /* Flags for memblock_alloc_base() amd __memblock_alloc_base() */ | 71 | /* Flags for memblock_alloc_base() amd __memblock_alloc_base() */ |
72 | #define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0) | 72 | #define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0) |
73 | #define MEMBLOCK_ALLOC_ACCESSIBLE 0 | 73 | #define MEMBLOCK_ALLOC_ACCESSIBLE 0 |
74 | 74 | ||
75 | extern phys_addr_t __init memblock_alloc_base(phys_addr_t size, | 75 | extern phys_addr_t memblock_alloc_base(phys_addr_t size, |
76 | phys_addr_t align, | 76 | phys_addr_t align, |
77 | phys_addr_t max_addr); | 77 | phys_addr_t max_addr); |
78 | extern phys_addr_t __init __memblock_alloc_base(phys_addr_t size, | 78 | extern phys_addr_t __memblock_alloc_base(phys_addr_t size, |
79 | phys_addr_t align, | 79 | phys_addr_t align, |
80 | phys_addr_t max_addr); | 80 | phys_addr_t max_addr); |
81 | extern phys_addr_t __init memblock_phys_mem_size(void); | 81 | extern phys_addr_t memblock_phys_mem_size(void); |
82 | extern phys_addr_t memblock_end_of_DRAM(void); | 82 | extern phys_addr_t memblock_end_of_DRAM(void); |
83 | extern void __init memblock_enforce_memory_limit(phys_addr_t memory_limit); | 83 | extern void memblock_enforce_memory_limit(phys_addr_t memory_limit); |
84 | extern int memblock_is_memory(phys_addr_t addr); | 84 | extern int memblock_is_memory(phys_addr_t addr); |
85 | extern int memblock_is_region_memory(phys_addr_t base, phys_addr_t size); | 85 | extern int memblock_is_region_memory(phys_addr_t base, phys_addr_t size); |
86 | extern int __init memblock_is_reserved(phys_addr_t addr); | 86 | extern int memblock_is_reserved(phys_addr_t addr); |
87 | extern int memblock_is_region_reserved(phys_addr_t base, phys_addr_t size); | 87 | extern int memblock_is_region_reserved(phys_addr_t base, phys_addr_t size); |
88 | 88 | ||
89 | extern void memblock_dump_all(void); | 89 | extern void memblock_dump_all(void); |
diff --git a/mm/memblock.c b/mm/memblock.c index 65e3ba8d09fb..d5d63ac1fd83 100644 --- a/mm/memblock.c +++ b/mm/memblock.c | |||
@@ -125,8 +125,8 @@ static phys_addr_t __init memblock_find_region(phys_addr_t start, phys_addr_t en | |||
125 | return MEMBLOCK_ERROR; | 125 | return MEMBLOCK_ERROR; |
126 | } | 126 | } |
127 | 127 | ||
128 | static phys_addr_t __init memblock_find_base(phys_addr_t size, phys_addr_t align, | 128 | static phys_addr_t __init_memblock memblock_find_base(phys_addr_t size, |
129 | phys_addr_t start, phys_addr_t end) | 129 | phys_addr_t align, phys_addr_t start, phys_addr_t end) |
130 | { | 130 | { |
131 | long i; | 131 | long i; |
132 | 132 | ||
@@ -439,12 +439,12 @@ long __init_memblock memblock_remove(phys_addr_t base, phys_addr_t size) | |||
439 | return __memblock_remove(&memblock.memory, base, size); | 439 | return __memblock_remove(&memblock.memory, base, size); |
440 | } | 440 | } |
441 | 441 | ||
442 | long __init memblock_free(phys_addr_t base, phys_addr_t size) | 442 | long __init_memblock memblock_free(phys_addr_t base, phys_addr_t size) |
443 | { | 443 | { |
444 | return __memblock_remove(&memblock.reserved, base, size); | 444 | return __memblock_remove(&memblock.reserved, base, size); |
445 | } | 445 | } |
446 | 446 | ||
447 | long __init memblock_reserve(phys_addr_t base, phys_addr_t size) | 447 | long __init_memblock memblock_reserve(phys_addr_t base, phys_addr_t size) |
448 | { | 448 | { |
449 | struct memblock_type *_rgn = &memblock.reserved; | 449 | struct memblock_type *_rgn = &memblock.reserved; |
450 | 450 | ||
@@ -671,12 +671,12 @@ int __init memblock_is_reserved(phys_addr_t addr) | |||
671 | return memblock_search(&memblock.reserved, addr) != -1; | 671 | return memblock_search(&memblock.reserved, addr) != -1; |
672 | } | 672 | } |
673 | 673 | ||
674 | int memblock_is_memory(phys_addr_t addr) | 674 | int __init_memblock memblock_is_memory(phys_addr_t addr) |
675 | { | 675 | { |
676 | return memblock_search(&memblock.memory, addr) != -1; | 676 | return memblock_search(&memblock.memory, addr) != -1; |
677 | } | 677 | } |
678 | 678 | ||
679 | int memblock_is_region_memory(phys_addr_t base, phys_addr_t size) | 679 | int __init_memblock memblock_is_region_memory(phys_addr_t base, phys_addr_t size) |
680 | { | 680 | { |
681 | int idx = memblock_search(&memblock.reserved, base); | 681 | int idx = memblock_search(&memblock.reserved, base); |
682 | 682 | ||
@@ -693,7 +693,7 @@ int __init_memblock memblock_is_region_reserved(phys_addr_t base, phys_addr_t si | |||
693 | } | 693 | } |
694 | 694 | ||
695 | 695 | ||
696 | void __init memblock_set_current_limit(phys_addr_t limit) | 696 | void __init_memblock memblock_set_current_limit(phys_addr_t limit) |
697 | { | 697 | { |
698 | memblock.current_limit = limit; | 698 | memblock.current_limit = limit; |
699 | } | 699 | } |