aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-11-08 06:55:08 -0500
committerPaul Mackerras <paulus@samba.org>2005-11-08 06:55:08 -0500
commitfca5dcd4835ed09bb1a48a355344aff7a25c76e0 (patch)
treeb596fad4509d3208ef974b9e22b2326ecfd85b83 /arch/powerpc/kernel
parent3825ac0ee66b50cb0208ee74796fe65f3040e67c (diff)
powerpc: Simplify and clean up the xmon terminal I/O
This factors out the common bits of arch/powerpc/xmon/start_*.c into a new nonstdio.c, and removes some stuff that was supposed to make xmon's I/O routines somewhat stdio-like but was never used. It also makes the parsing of the xmon= command line option common, so that ppc32 can now use xmon={off,on,early} also. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/setup-common.c21
-rw-r--r--arch/powerpc/kernel/setup_32.c11
-rw-r--r--arch/powerpc/kernel/setup_64.c20
3 files changed, 24 insertions, 28 deletions
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index e22856ecb5a0..26bb1fe6384b 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -51,6 +51,7 @@
51#include <asm/page.h> 51#include <asm/page.h>
52#include <asm/mmu.h> 52#include <asm/mmu.h>
53#include <asm/lmb.h> 53#include <asm/lmb.h>
54#include <asm/xmon.h>
54 55
55#undef DEBUG 56#undef DEBUG
56 57
@@ -559,3 +560,23 @@ void __init smp_setup_cpu_maps(void)
559#endif /* CONFIG_PPC64 */ 560#endif /* CONFIG_PPC64 */
560} 561}
561#endif /* CONFIG_SMP */ 562#endif /* CONFIG_SMP */
563
564#ifdef CONFIG_XMON
565static int __init early_xmon(char *p)
566{
567 /* ensure xmon is enabled */
568 if (p) {
569 if (strncmp(p, "on", 2) == 0)
570 xmon_init(1);
571 if (strncmp(p, "off", 3) == 0)
572 xmon_init(0);
573 if (strncmp(p, "early", 5) != 0)
574 return 0;
575 }
576 xmon_init(1);
577 debugger(NULL);
578
579 return 0;
580}
581early_param("xmon", early_xmon);
582#endif
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 3af2631e3fab..0fbc73f7f828 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -303,14 +303,9 @@ void __init setup_arch(char **cmdline_p)
303 pmac_feature_init(); /* New cool way */ 303 pmac_feature_init(); /* New cool way */
304#endif 304#endif
305 305
306#ifdef CONFIG_XMON 306#ifdef CONFIG_XMON_DEFAULT
307 xmon_map_scc(); 307 xmon_init(1);
308 if (strstr(cmd_line, "xmon")) { 308#endif
309 xmon_init(1);
310 debugger(NULL);
311 }
312#endif /* CONFIG_XMON */
313 if ( ppc_md.progress ) ppc_md.progress("setup_arch: enter", 0x3eab);
314 309
315#if defined(CONFIG_KGDB) 310#if defined(CONFIG_KGDB)
316 if (ppc_md.kgdb_map_scc) 311 if (ppc_md.kgdb_map_scc)
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 0471e843b6c5..54c606f680b3 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -858,26 +858,6 @@ int check_legacy_ioport(unsigned long base_port)
858} 858}
859EXPORT_SYMBOL(check_legacy_ioport); 859EXPORT_SYMBOL(check_legacy_ioport);
860 860
861#ifdef CONFIG_XMON
862static int __init early_xmon(char *p)
863{
864 /* ensure xmon is enabled */
865 if (p) {
866 if (strncmp(p, "on", 2) == 0)
867 xmon_init(1);
868 if (strncmp(p, "off", 3) == 0)
869 xmon_init(0);
870 if (strncmp(p, "early", 5) != 0)
871 return 0;
872 }
873 xmon_init(1);
874 debugger(NULL);
875
876 return 0;
877}
878early_param("xmon", early_xmon);
879#endif
880
881void cpu_die(void) 861void cpu_die(void)
882{ 862{
883 if (ppc_md.cpu_die) 863 if (ppc_md.cpu_die)