Commit 906b9f69 authored by Andrew Morton's avatar Andrew Morton Committed by Anton Blanchard

[PATCH] add bootmem failure warning

From: Dave Hansen <haveblue@us.ibm.com>

__alloc_bootmem_core() has a couple of BUG_ON()'s.  Since the handlers
aren't set up this early, if you hit it, you just get along stream of
"Unknown Interrupt" messages.  It would be very nice to have a little
bit more information when something has decided to BUG() out this
early.
parent b7eec9fb
......@@ -151,7 +151,11 @@ __alloc_bootmem_core(struct bootmem_data *bdata, unsigned long size,
unsigned long i, start = 0, incr, eidx;
void *ret;
BUG_ON(!size);
if(!size) {
printk("__alloc_bootmem_core(): zero-sized request\n");
dump_stack();
BUG();
}
BUG_ON(align & (align-1));
eidx = bdata->node_low_pfn - (bdata->node_boot_start >> PAGE_SHIFT);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment