Skip to content
Snippets Groups Projects
Commit 3f352c04 authored by Laura Abbott's avatar Laura Abbott Committed by Stephen Boyd
Browse files

msm: Completely remove memory from the memblock allocator


memblock_remove may not be sufficient to prevent placing
regions on top of each other. Call memblock_reserve and
memblock_free as well to completely remove the memory
from the allocator.

Change-Id: Iec481d7ce7a51c243e43a2d9be2fbfbf7b2717ed
Signed-off-by: default avatarLaura Abbott <lauraa@codeaurora.org>
parent e636c322
No related branches found
No related tags found
No related merge requests found
...@@ -189,6 +189,10 @@ static void __init reserve_memory_for_mempools(void) ...@@ -189,6 +189,10 @@ static void __init reserve_memory_for_mempools(void)
BUG_ON(mr_candidate == NULL); BUG_ON(mr_candidate == NULL);
/* bump mt up against the top of the region */ /* bump mt up against the top of the region */
mt->start = mr_candidate->base + mr_candidate->size - mt->size; mt->start = mr_candidate->base + mr_candidate->size - mt->size;
ret = memblock_reserve(mt->start, mt->size);
BUG_ON(ret);
ret = memblock_free(mt->start, mt->size);
BUG_ON(ret);
ret = memblock_remove(mt->start, mt->size); ret = memblock_remove(mt->start, mt->size);
BUG_ON(ret); BUG_ON(ret);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment