diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2012-05-08 19:35:37 +0200 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2012-05-08 19:35:37 +0200 |
commit | 7b96c686223a5c902d6a59c7d178f3904f0ab757 (patch) | |
tree | fe328ed56ad3719de3cfebad72ef74e34f1ed92b /mm/nobootmem.c | |
parent | gpio: Move DT support code into drivers/gpio (diff) | |
parent | Linux 3.4-rc6 (diff) | |
download | linux-7b96c686223a5c902d6a59c7d178f3904f0ab757.tar.xz linux-7b96c686223a5c902d6a59c7d178f3904f0ab757.zip |
Merge tag 'v3.4-rc6' into gpio/next
Linux 3.4-rc6
Diffstat (limited to 'mm/nobootmem.c')
-rw-r--r-- | mm/nobootmem.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mm/nobootmem.c b/mm/nobootmem.c index 24f0fc1a56d6..e53bb8a256b1 100644 --- a/mm/nobootmem.c +++ b/mm/nobootmem.c @@ -298,13 +298,19 @@ void * __init __alloc_bootmem_node(pg_data_t *pgdat, unsigned long size, if (WARN_ON_ONCE(slab_is_available())) return kzalloc_node(size, GFP_NOWAIT, pgdat->node_id); +again: ptr = __alloc_memory_core_early(pgdat->node_id, size, align, goal, -1ULL); if (ptr) return ptr; - return __alloc_memory_core_early(MAX_NUMNODES, size, align, - goal, -1ULL); + ptr = __alloc_memory_core_early(MAX_NUMNODES, size, align, + goal, -1ULL); + if (!ptr && goal) { + goal = 0; + goto again; + } + return ptr; } void * __init __alloc_bootmem_node_high(pg_data_t *pgdat, unsigned long size, |