Skip to content

Commit

Permalink
[PATCH] powerpc: Make early xmon logic immune to location of early pa…
Browse files Browse the repository at this point in the history
…rsing

Currently early_xmon() calls directly into debugger() if xmon=early is passed.
This ties the invocation of early xmon to the location of parse_early_param(),
which might change.

Tested on P5 LPAR and F50.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed May 19, 2006
1 parent 9dabbfb commit 480f6f3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/powerpc/kernel/setup-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ void __init smp_setup_cpu_maps(void)
}
#endif /* CONFIG_SMP */

int __initdata do_early_xmon;
#ifdef CONFIG_XMON
static int __init early_xmon(char *p)
{
Expand All @@ -456,7 +457,7 @@ static int __init early_xmon(char *p)
return 0;
}
xmon_init(1);
debugger(NULL);
do_early_xmon = 1;

return 0;
}
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/kernel/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
void check_for_initrd(void);
void do_init_bootmem(void);
void setup_panic(void);
extern int do_early_xmon;

#endif /* _POWERPC_KERNEL_SETUP_H */
3 changes: 3 additions & 0 deletions arch/powerpc/kernel/setup_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ void __init setup_arch(char **cmdline_p)

parse_early_param();

if (do_early_xmon)
debugger(NULL);

/* set up the bootmem stuff with available memory */
do_init_bootmem();
if ( ppc_md.progress ) ppc_md.progress("setup_arch: bootmem", 0x3eab);
Expand Down
3 changes: 3 additions & 0 deletions arch/powerpc/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,9 @@ void __init setup_system(void)

parse_early_param();

if (do_early_xmon)
debugger(NULL);

check_smt_enabled();
smp_setup_cpu_maps();

Expand Down

0 comments on commit 480f6f3

Please sign in to comment.