]> bbs.cooldavid.org Git - net-next-2.6.git/commit - mm/percpu.c
percpu: make pcpu_setup_first_chunk() failures more verbose
authorTejun Heo <tj@kernel.org>
Thu, 24 Sep 2009 00:43:11 +0000 (09:43 +0900)
committerTejun Heo <tj@kernel.org>
Tue, 29 Sep 2009 00:17:57 +0000 (09:17 +0900)
commit635b75fc18858d3522e481c043de764766db923c
tree0bd2dc916bac8d0188bdd3ba15d0a1b00aa86e48
parent6ea529a2037ce662fc6bfa572b46d47407d08805
percpu: make pcpu_setup_first_chunk() failures more verbose

The parameters to pcpu_setup_first_chunk() come from different sources
depending on architecture and can be quite complex.  The function runs
various sanity checks on the parameters and triggers BUG() if
something isn't right.  However, this is very early during the boot
and not reporting exactly what the problem is makes debugging even
harder.

Add PCPU_SETUP_BUG() macro which prints out enough information about
the parameters.  As the macro still puts separate BUG() for each
check, it won't lose any information even on the situations where only
the program counter can be retrieved.

While at it, also bump pcpu_dump_alloc_info() message to KERN_INFO so
that it's visible on the console if boot fails to complete.

Signed-off-by: Tejun Heo <tj@kernel.org>
mm/percpu.c