summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@cmpxchg.org>2009-01-06 14:40:32 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 15:59:10 -0800
commit594fe1a044325bb0a1a49ca7d086e3df4f1df59a (patch)
treedb3ed12346af4357d154637baad4fb224fbde639 /mm
parentdcd4a049b9751828c516c59709f3fdf50436df85 (diff)
downloadlinux-3.10-594fe1a044325bb0a1a49ca7d086e3df4f1df59a.tar.gz
linux-3.10-594fe1a044325bb0a1a49ca7d086e3df4f1df59a.tar.bz2
linux-3.10-594fe1a044325bb0a1a49ca7d086e3df4f1df59a.zip
bootmem: print request details before BUG_ON(them)
Moving the request details print-out before the sanity checks that might panic() enables us to analyse invalid requests without having access to the line information of the stack dump. Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/bootmem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/bootmem.c b/mm/bootmem.c
index ac5a891f142..51a0ccf61e0 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -435,6 +435,10 @@ static void * __init alloc_bootmem_core(struct bootmem_data *bdata,
unsigned long fallback = 0;
unsigned long min, max, start, sidx, midx, step;
+ bdebug("nid=%td size=%lx [%lu pages] align=%lx goal=%lx limit=%lx\n",
+ bdata - bootmem_node_data, size, PAGE_ALIGN(size) >> PAGE_SHIFT,
+ align, goal, limit);
+
BUG_ON(!size);
BUG_ON(align & (align - 1));
BUG_ON(limit && goal + size > limit);
@@ -442,10 +446,6 @@ static void * __init alloc_bootmem_core(struct bootmem_data *bdata,
if (!bdata->node_bootmem_map)
return NULL;
- bdebug("nid=%td size=%lx [%lu pages] align=%lx goal=%lx limit=%lx\n",
- bdata - bootmem_node_data, size, PAGE_ALIGN(size) >> PAGE_SHIFT,
- align, goal, limit);
-
min = bdata->node_min_pfn;
max = bdata->node_low_pfn;