]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
dump_stack-serialize-the-output-from-dump_stack-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 19 Jun 2013 00:07:08 +0000 (10:07 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:26:58 +0000 (17:26 +1000)
- 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>
lib/dump_stack.c

index 710884b6a989b405625f222cf1ea981cd0e4e7fc..c03154173cc70cd2a240c137e55bb17f7d612434 100644 (file)
@@ -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);
-}