]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
parisc: initialize unwinder much earlier
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Thu, 11 Sep 2008 14:17:23 +0000 (10:17 -0400)
committerKyle McMartin <kyle@hera.kernel.org>
Fri, 10 Oct 2008 16:32:30 +0000 (16:32 +0000)
The unwinder was being initialized way too late to be any use
debugging early boot crashes. Instead of relying on module_init
initcalls to initialize it, let's do it explicitly as early as
we can.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
arch/parisc/include/asm/unwind.h
arch/parisc/kernel/setup.c
arch/parisc/kernel/unwind.c

index 2f7e6e50a1580de34d23216018cc015d1bf7780f..52482e4fc20d1f11407243915968523160839fbb 100644 (file)
@@ -74,4 +74,6 @@ void unwind_frame_init_running(struct unwind_frame_info *info, struct pt_regs *r
 int unwind_once(struct unwind_frame_info *info);
 int unwind_to_user(struct unwind_frame_info *info);
 
+int unwind_init(void);
+
 #endif
index a59b71efdbe56215ab297b6ad65c9c45ada3ae3c..7d27853ff8c8b6233ec4a0e1f2fe3747fbbf88aa 100644 (file)
@@ -44,6 +44,7 @@
 #include <asm/pdc_chassis.h>
 #include <asm/io.h>
 #include <asm/setup.h>
+#include <asm/unwind.h>
 
 static char __initdata command_line[COMMAND_LINE_SIZE];
 
@@ -123,6 +124,7 @@ void __init setup_arch(char **cmdline_p)
 #ifdef CONFIG_64BIT
        extern int parisc_narrow_firmware;
 #endif
+       unwind_init();
 
        init_per_cpu(smp_processor_id());       /* Set Modes & Enable FP */
 
index 701b2d2d88823f55fb2d18a2c03c1e91b2b3f2a9..6773c582e457a15b3e9ddb5006e462754bddd06e 100644 (file)
@@ -170,7 +170,7 @@ void unwind_table_remove(struct unwind_table *table)
 }
 
 /* Called from setup_arch to import the kernel unwind info */
-static int unwind_init(void)
+int unwind_init(void)
 {
        long start, stop;
        register unsigned long gp __asm__ ("r27");
@@ -417,5 +417,3 @@ int unwind_to_user(struct unwind_frame_info *info)
 
        return ret;
 }
-
-module_init(unwind_init);