Skip to content

Commit f0514ae

Browse files
jejbKyle McMartin
authored andcommitted
parisc: initialize unwinder much earlier
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>
1 parent 0be7d1f commit f0514ae

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎arch/parisc/include/asm/unwind.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,6 @@ void unwind_frame_init_running(struct unwind_frame_info *info, struct pt_regs *r
7474
int unwind_once(struct unwind_frame_info *info);
7575
int unwind_to_user(struct unwind_frame_info *info);
7676

77+
int unwind_init(void);
78+
7779
#endif

‎arch/parisc/kernel/setup.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#include <asm/pdc_chassis.h>
4545
#include <asm/io.h>
4646
#include <asm/setup.h>
47+
#include <asm/unwind.h>
4748

4849
static char __initdata command_line[COMMAND_LINE_SIZE];
4950

@@ -123,6 +124,7 @@ void __init setup_arch(char **cmdline_p)
123124
#ifdef CONFIG_64BIT
124125
extern int parisc_narrow_firmware;
125126
#endif
127+
unwind_init();
126128

127129
init_per_cpu(smp_processor_id()); /* Set Modes & Enable FP */
128130

‎arch/parisc/kernel/unwind.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ void unwind_table_remove(struct unwind_table *table)
170170
}
171171

172172
/* Called from setup_arch to import the kernel unwind info */
173-
static int unwind_init(void)
173+
int unwind_init(void)
174174
{
175175
long start, stop;
176176
register unsigned long gp __asm__ ("r27");
@@ -417,5 +417,3 @@ int unwind_to_user(struct unwind_frame_info *info)
417417

418418
return ret;
419419
}
420-
421-
module_init(unwind_init);

0 commit comments

Comments
 (0)