Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38484
b: refs/heads/master
c: 4767928
h: refs/heads/master
v: v3
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed Oct 4, 2006
1 parent b3b79c4 commit 6405fa0
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 41 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 23b8acb1cf49fea74a9d431de258787384951eac
refs/heads/master: 476792839467c08ddeedd8b44a7423d415b68259
25 changes: 0 additions & 25 deletions trunk/arch/powerpc/kernel/setup-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,31 +442,6 @@ void __init smp_setup_cpu_maps(void)
}
#endif /* CONFIG_SMP */

int __initdata do_early_xmon;
#ifdef CONFIG_XMON
extern int xmon_no_auto_backtrace;

static int __init early_xmon(char *p)
{
/* ensure xmon is enabled */
if (p) {
if (strncmp(p, "on", 2) == 0)
xmon_init(1);
if (strncmp(p, "off", 3) == 0)
xmon_init(0);
if (strncmp(p, "nobt", 4) == 0)
xmon_no_auto_backtrace = 1;
if (strncmp(p, "early", 5) != 0)
return 0;
}
xmon_init(1);
do_early_xmon = 1;

return 0;
}
early_param("xmon", early_xmon);
#endif

static __init int add_pcspkr(void)
{
struct device_node *np;
Expand Down
8 changes: 2 additions & 6 deletions trunk/arch/powerpc/kernel/setup_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,11 @@ void __init setup_arch(char **cmdline_p)

smp_setup_cpu_maps();

#ifdef CONFIG_XMON_DEFAULT
xmon_init(1);
#endif
/* Register early console */
register_early_udbg_console();

xmon_setup();

#if defined(CONFIG_KGDB)
if (ppc_md.kgdb_map_scc)
ppc_md.kgdb_map_scc();
Expand Down Expand Up @@ -280,9 +279,6 @@ void __init setup_arch(char **cmdline_p)
init_mm.end_data = (unsigned long) _edata;
init_mm.brk = klimit;

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
12 changes: 4 additions & 8 deletions trunk/arch/powerpc/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,19 +390,15 @@ void __init setup_system(void)
*/
find_legacy_serial_ports();

/*
* Initialize xmon
*/
#ifdef CONFIG_XMON_DEFAULT
xmon_init(1);
#endif
/*
* Register early console
*/
register_early_udbg_console();

if (do_early_xmon)
debugger(NULL);
/*
* Initialize xmon
*/
xmon_setup();

check_smt_enabled();
smp_setup_cpu_maps();
Expand Down
33 changes: 33 additions & 0 deletions trunk/arch/powerpc/xmon/xmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Routines providing a simple monitor for use on the PowerMac.
*
* Copyright (C) 1996-2005 Paul Mackerras.
* Copyright (C) 2001 PPC64 Team, IBM Corp
* Copyrignt (C) 2006 Michael Ellerman, IBM Corp
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -2597,3 +2599,34 @@ static int __init setup_xmon_sysrq(void)
}
__initcall(setup_xmon_sysrq);
#endif /* CONFIG_MAGIC_SYSRQ */

int __initdata xmon_early, xmon_off;

static int __init early_parse_xmon(char *p)
{
if (!p || strncmp(p, "early", 5) == 0) {
/* just "xmon" is equivalent to "xmon=early" */
xmon_init(1);
xmon_early = 1;
} else if (strncmp(p, "on", 2) == 0)
xmon_init(1);
else if (strncmp(p, "off", 3) == 0)
xmon_off = 1;
else if (strncmp(p, "nobt", 4) == 0)
xmon_no_auto_backtrace = 1;
else
return 1;

return 0;
}
early_param("xmon", early_parse_xmon);

void __init xmon_setup(void)
{
#ifdef CONFIG_XMON_DEFAULT
if (!xmon_off)
xmon_init(1);
#endif
if (xmon_early)
debugger(NULL);
}
6 changes: 5 additions & 1 deletion trunk/include/asm-powerpc/xmon.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@

#ifdef __KERNEL__

extern void xmon_init(int);
#ifdef CONFIG_XMON
extern void xmon_setup(void);
#else
static inline void xmon_setup(void) { };
#endif

#endif /* __KERNEL __ */
#endif /* __ASM_POWERPC_XMON_H */

0 comments on commit 6405fa0

Please sign in to comment.