]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite04993859c9b71048f60e7c03fc8c8aa2505fe65
tree0bd2dc916bac8d0188bdd3ba15d0a1b00aa86e48
parent28bc8793487f4a12134431b9262f993628fac909
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