aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memblock.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memblock.c')
-rw-r--r--mm/memblock.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/mm/memblock.c b/mm/memblock.c
index 400dc62697d7..4618fda975a0 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -137,8 +137,6 @@ static phys_addr_t __init_memblock memblock_find_base(phys_addr_t size,
137 137
138 BUG_ON(0 == size); 138 BUG_ON(0 == size);
139 139
140 size = memblock_align_up(size, align);
141
142 /* Pump up max_addr */ 140 /* Pump up max_addr */
143 if (end == MEMBLOCK_ALLOC_ACCESSIBLE) 141 if (end == MEMBLOCK_ALLOC_ACCESSIBLE)
144 end = memblock.current_limit; 142 end = memblock.current_limit;
@@ -683,13 +681,13 @@ int __init_memblock memblock_is_memory(phys_addr_t addr)
683 681
684int __init_memblock memblock_is_region_memory(phys_addr_t base, phys_addr_t size) 682int __init_memblock memblock_is_region_memory(phys_addr_t base, phys_addr_t size)
685{ 683{
686 int idx = memblock_search(&memblock.reserved, base); 684 int idx = memblock_search(&memblock.memory, base);
687 685
688 if (idx == -1) 686 if (idx == -1)
689 return 0; 687 return 0;
690 return memblock.reserved.regions[idx].base <= base && 688 return memblock.memory.regions[idx].base <= base &&
691 (memblock.reserved.regions[idx].base + 689 (memblock.memory.regions[idx].base +
692 memblock.reserved.regions[idx].size) >= (base + size); 690 memblock.memory.regions[idx].size) >= (base + size);
693} 691}
694 692
695int __init_memblock memblock_is_region_reserved(phys_addr_t base, phys_addr_t size) 693int __init_memblock memblock_is_region_reserved(phys_addr_t base, phys_addr_t size)