diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2006-05-17 04:00:41 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-05-19 01:02:12 -0400 |
commit | 480f6f35a149802a94ad5c1a2673ed6ec8d2c158 (patch) | |
tree | b0cded201abfbc7c6a1c5bfa316e6fecc1e2b507 /arch/powerpc/kernel | |
parent | 9dabbfbab312909782b26580d71e3977622fab6e (diff) |
[PATCH] powerpc: Make early xmon logic immune to location of early parsing
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>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/setup-common.c | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup.h | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_32.c | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 3 |
4 files changed, 9 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 88de557fe046..bd328123af75 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -443,6 +443,7 @@ void __init smp_setup_cpu_maps(void) | |||
443 | } | 443 | } |
444 | #endif /* CONFIG_SMP */ | 444 | #endif /* CONFIG_SMP */ |
445 | 445 | ||
446 | int __initdata do_early_xmon; | ||
446 | #ifdef CONFIG_XMON | 447 | #ifdef CONFIG_XMON |
447 | static int __init early_xmon(char *p) | 448 | static int __init early_xmon(char *p) |
448 | { | 449 | { |
@@ -456,7 +457,7 @@ static int __init early_xmon(char *p) | |||
456 | return 0; | 457 | return 0; |
457 | } | 458 | } |
458 | xmon_init(1); | 459 | xmon_init(1); |
459 | debugger(NULL); | 460 | do_early_xmon = 1; |
460 | 461 | ||
461 | return 0; | 462 | return 0; |
462 | } | 463 | } |
diff --git a/arch/powerpc/kernel/setup.h b/arch/powerpc/kernel/setup.h index e67066c1933e..4c67ad7fae08 100644 --- a/arch/powerpc/kernel/setup.h +++ b/arch/powerpc/kernel/setup.h | |||
@@ -4,5 +4,6 @@ | |||
4 | void check_for_initrd(void); | 4 | void check_for_initrd(void); |
5 | void do_init_bootmem(void); | 5 | void do_init_bootmem(void); |
6 | void setup_panic(void); | 6 | void setup_panic(void); |
7 | extern int do_early_xmon; | ||
7 | 8 | ||
8 | #endif /* _POWERPC_KERNEL_SETUP_H */ | 9 | #endif /* _POWERPC_KERNEL_SETUP_H */ |
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 88832b3ee661..2b6cacb6946f 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -297,6 +297,9 @@ void __init setup_arch(char **cmdline_p) | |||
297 | 297 | ||
298 | parse_early_param(); | 298 | parse_early_param(); |
299 | 299 | ||
300 | if (do_early_xmon) | ||
301 | debugger(NULL); | ||
302 | |||
300 | /* set up the bootmem stuff with available memory */ | 303 | /* set up the bootmem stuff with available memory */ |
301 | do_init_bootmem(); | 304 | do_init_bootmem(); |
302 | if ( ppc_md.progress ) ppc_md.progress("setup_arch: bootmem", 0x3eab); | 305 | if ( ppc_md.progress ) ppc_md.progress("setup_arch: bootmem", 0x3eab); |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index ab6ea37a77aa..a1923d917b30 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -419,6 +419,9 @@ void __init setup_system(void) | |||
419 | 419 | ||
420 | parse_early_param(); | 420 | parse_early_param(); |
421 | 421 | ||
422 | if (do_early_xmon) | ||
423 | debugger(NULL); | ||
424 | |||
422 | check_smt_enabled(); | 425 | check_smt_enabled(); |
423 | smp_setup_cpu_maps(); | 426 | smp_setup_cpu_maps(); |
424 | 427 | ||