mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
[PATCH] ppc64: allow xmon=off
If both CONFIG_XMON and CONFIG_XMON_DEFAULT is enabled in the .config, there is no way to disable xmon again. setup_system calls first xmon_init, later parse_early_param. So a new 'xmon=off' cmdline option will do the right thing. Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
parent
bef5686229
commit
b13cfd173f
4 changed files with 25 additions and 13 deletions
|
@ -627,7 +627,7 @@ void __init setup_system(void)
|
||||||
* Initialize xmon
|
* Initialize xmon
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_XMON_DEFAULT
|
#ifdef CONFIG_XMON_DEFAULT
|
||||||
xmon_init();
|
xmon_init(1);
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
* Register early console
|
* Register early console
|
||||||
|
@ -1343,11 +1343,13 @@ static int __init early_xmon(char *p)
|
||||||
/* ensure xmon is enabled */
|
/* ensure xmon is enabled */
|
||||||
if (p) {
|
if (p) {
|
||||||
if (strncmp(p, "on", 2) == 0)
|
if (strncmp(p, "on", 2) == 0)
|
||||||
xmon_init();
|
xmon_init(1);
|
||||||
|
if (strncmp(p, "off", 3) == 0)
|
||||||
|
xmon_init(0);
|
||||||
if (strncmp(p, "early", 5) != 0)
|
if (strncmp(p, "early", 5) != 0)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
xmon_init();
|
xmon_init(1);
|
||||||
debugger(NULL);
|
debugger(NULL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -27,7 +27,7 @@ static void sysrq_handle_xmon(int key, struct pt_regs *pt_regs,
|
||||||
struct tty_struct *tty)
|
struct tty_struct *tty)
|
||||||
{
|
{
|
||||||
/* ensure xmon is enabled */
|
/* ensure xmon is enabled */
|
||||||
xmon_init();
|
xmon_init(1);
|
||||||
debugger(pt_regs);
|
debugger(pt_regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2496,8 +2496,9 @@ static void dump_stab(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void xmon_init(void)
|
void xmon_init(int enable)
|
||||||
{
|
{
|
||||||
|
if (enable) {
|
||||||
__debugger = xmon;
|
__debugger = xmon;
|
||||||
__debugger_ipi = xmon_ipi;
|
__debugger_ipi = xmon_ipi;
|
||||||
__debugger_bpt = xmon_bpt;
|
__debugger_bpt = xmon_bpt;
|
||||||
|
@ -2505,6 +2506,15 @@ void xmon_init(void)
|
||||||
__debugger_iabr_match = xmon_iabr_match;
|
__debugger_iabr_match = xmon_iabr_match;
|
||||||
__debugger_dabr_match = xmon_dabr_match;
|
__debugger_dabr_match = xmon_dabr_match;
|
||||||
__debugger_fault_handler = xmon_fault_handler;
|
__debugger_fault_handler = xmon_fault_handler;
|
||||||
|
} else {
|
||||||
|
__debugger = NULL;
|
||||||
|
__debugger_ipi = NULL;
|
||||||
|
__debugger_bpt = NULL;
|
||||||
|
__debugger_sstep = NULL;
|
||||||
|
__debugger_iabr_match = NULL;
|
||||||
|
__debugger_dabr_match = NULL;
|
||||||
|
__debugger_fault_handler = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void dump_segments(void)
|
void dump_segments(void)
|
||||||
|
|
|
@ -88,7 +88,7 @@ DEBUGGER_BOILERPLATE(debugger_dabr_match)
|
||||||
DEBUGGER_BOILERPLATE(debugger_fault_handler)
|
DEBUGGER_BOILERPLATE(debugger_fault_handler)
|
||||||
|
|
||||||
#ifdef CONFIG_XMON
|
#ifdef CONFIG_XMON
|
||||||
extern void xmon_init(void);
|
extern void xmon_init(int enable);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Reference in a new issue