git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mm/memblock: allocate boot time data structures from mirrored memory
[pandora-kernel.git]
/
mm
/
nobootmem.c
diff --git
a/mm/nobootmem.c
b/mm/nobootmem.c
index
ad3641d
..
5258386
100644
(file)
--- a/
mm/nobootmem.c
+++ b/
mm/nobootmem.c
@@
-37,12
+37,20
@@
static void * __init __alloc_memory_core_early(int nid, u64 size, u64 align,
{
void *ptr;
u64 addr;
{
void *ptr;
u64 addr;
+ ulong flags = choose_memblock_flags();
if (limit > memblock.current_limit)
limit = memblock.current_limit;
if (limit > memblock.current_limit)
limit = memblock.current_limit;
+again:
addr = memblock_find_in_range_node(size, align, goal, limit, nid,
addr = memblock_find_in_range_node(size, align, goal, limit, nid,
- MEMBLOCK_NONE);
+ flags);
+ if (!addr && (flags & MEMBLOCK_MIRROR)) {
+ flags &= ~MEMBLOCK_MIRROR;
+ pr_warn("Could not allocate %pap bytes of mirrored memory\n",
+ &size);
+ goto again;
+ }
if (!addr)
return NULL;
if (!addr)
return NULL;