]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] powerpc: Make early xmon logic immune to location of early parsing
authorMichael Ellerman <michael@ellerman.id.au>
Wed, 17 May 2006 08:00:41 +0000 (18:00 +1000)
committerPaul Mackerras <paulus@samba.org>
Fri, 19 May 2006 05:02:12 +0000 (15:02 +1000)
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>
arch/powerpc/kernel/setup-common.c
arch/powerpc/kernel/setup.h
arch/powerpc/kernel/setup_32.c
arch/powerpc/kernel/setup_64.c

index 88de557fe046bda9337e86776c33a065bec6abaf..bd328123af7550ab032a0fe1f48d11cce0262624 100644 (file)
@@ -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)
 {
@@ -456,7 +457,7 @@ static int __init early_xmon(char *p)
                        return 0;
        }
        xmon_init(1);
-       debugger(NULL);
+       do_early_xmon = 1;
 
        return 0;
 }
index e67066c1933ee8a37a0f6176cbe85f6096a7c607..4c67ad7fae085d2cc170c13d24f6cac27448705f 100644 (file)
@@ -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 */
index 88832b3ee6616fdb72d6a2e081a0ce46aba2f8b0..2b6cacb6946fe0ca962c3aad3299e1406513e506 100644 (file)
@@ -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);
index ab6ea37a77aa6a24371a4ce80a059c9aa0505779..a1923d917b30205c1b88313f57089ca7ebcef15c 100644 (file)
@@ -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();