Skip to content

Commit

Permalink
x86-32, numa: Make init_alloc_remap() less panicky
Browse files Browse the repository at this point in the history
Remap allocator failure isn't fatal.  The callers are required to fall
back to regular early memory allocation mechanisms on failure anyway,
so there's no reason to panic on remap init failure.  Whining and
returning are enough.

Signed-off-by: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/r/1301955840-7246-9-git-send-email-tj@kernel.org
Acked-by: Yinghai Lu <yinghai@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
  • Loading branch information
Tejun Heo authored and H. Peter Anvin committed Apr 7, 2011
1 parent 7210cf9 commit 82044c3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions arch/x86/mm/numa_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,11 @@ static __init unsigned long init_alloc_remap(int nid, unsigned long offset)
node_pa = memblock_find_in_range(node_start_pfn[nid] << PAGE_SHIFT,
(u64)node_end_pfn[nid] << PAGE_SHIFT,
size, LARGE_PAGE_BYTES);
if (node_pa == MEMBLOCK_ERROR)
panic("Can not get kva ram\n");
if (node_pa == MEMBLOCK_ERROR) {
pr_warning("remap_alloc: failed to allocate %lu bytes for node %d\n",
size, nid);
return 0;
}

node_remap_size[nid] = size >> PAGE_SHIFT;
node_remap_offset[nid] = offset;
Expand Down

0 comments on commit 82044c3

Please sign in to comment.