Skip to content

Commit

Permalink
powerpc/mm:: Cleanup careful_allocation(): bootmem already panics
Browse files Browse the repository at this point in the history
If we fail a bootmem allocation, the bootmem code itself
panics.  No need to redo it here.

Also change the wording of the other panic.  We don't
strictly have to allocate memory on the specified node.
It is just a hint and that node may not even *have* any
memory on it.  In that case we can and do fall back to
other nodes.

Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Dave Hansen authored and Benjamin Herrenschmidt committed Jan 8, 2009
1 parent c555e52 commit 5d21ea2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions arch/powerpc/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ static void __init *careful_allocation(int nid, unsigned long size,
ret = __lmb_alloc_base(size, align, lmb_end_of_DRAM());

if (!ret)
panic("numa.c: cannot allocate %lu bytes on node %d",
panic("numa.c: cannot allocate %lu bytes for node %d",
size, nid);

/*
Expand All @@ -856,10 +856,6 @@ static void __init *careful_allocation(int nid, unsigned long size,
ret = (unsigned long)__alloc_bootmem_node(NODE_DATA(new_nid),
size, align, 0);

if (!ret)
panic("numa.c: cannot allocate %lu bytes on node %d",
size, new_nid);

ret = __pa(ret);

dbg("alloc_bootmem %lx %lx\n", ret, size);
Expand Down

0 comments on commit 5d21ea2

Please sign in to comment.