diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2013-06-07 10:08:38 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2013-06-17 18:17:53 +1000 |
commit | 830e95375887ff9ce058802f5b18c7068285c04f (patch) | |
tree | 42c7fe50e6a7e1290abccb18f77ee83768ac13df /lib | |
parent | 0340708c7975d18a41bc405e94295c2c9aec825c (diff) |
dump_stack-serialize-the-output-from-dump_stack-fix
- fix comment indenting
- avoid inclusion of <asm/> files - use <linux/> where possible
- fix uniprocessor build (__dump_stack undefined)
- remove unneeded ifdef around smp.h inclusion
Cc: Alex Thorlton <athorlton@sgi.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: Robin Holt <holt@sgi.com>
Cc: Russ Anderson <rja@sgi.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: athorlton@sgi.com
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dump_stack.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/lib/dump_stack.c b/lib/dump_stack.c index 710884b6a989..c03154173cc7 100644 --- a/lib/dump_stack.c +++ b/lib/dump_stack.c @@ -6,12 +6,14 @@ #include <linux/kernel.h> #include <linux/export.h> #include <linux/sched.h> -#include <asm/processor.h> -#include <asm/atomic.h> - -#ifdef CONFIG_SMP #include <linux/smp.h> -#endif +#include <linux/atomic.h> + +static void __dump_stack(void) +{ + dump_stack_print_info(KERN_DEFAULT); + show_stack(NULL, NULL); +} /** * dump_stack - dump the current task information and its stack trace @@ -27,10 +29,10 @@ void dump_stack(void) int old; int cpu; - /* - * Permit this cpu to perform nested stack dumps while serialising - * against other CPUs - */ + /* + * Permit this cpu to perform nested stack dumps while serialising + * against other CPUs + */ preempt_disable(); retry: @@ -59,9 +61,3 @@ void dump_stack(void) } #endif EXPORT_SYMBOL(dump_stack); - -static void __dump_stack(void) -{ - dump_stack_print_info(KERN_DEFAULT); - show_stack(NULL, NULL); -} |