diff options
author | Olaf Hering <olh@suse.de> | 2005-08-04 13:26:42 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-08-28 20:53:37 -0400 |
commit | b13cfd173f73c3f6f9a307b7b6e64d45fbd756b2 (patch) | |
tree | 47d9a6ab54c4b068e3300d026c4402c14f53d384 /arch/ppc64/xmon | |
parent | bef5686229810709091fb6e505071f4aa41e3760 (diff) |
[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>
Diffstat (limited to 'arch/ppc64/xmon')
-rw-r--r-- | arch/ppc64/xmon/start.c | 2 | ||||
-rw-r--r-- | arch/ppc64/xmon/xmon.c | 28 |
2 files changed, 20 insertions, 10 deletions
diff --git a/arch/ppc64/xmon/start.c b/arch/ppc64/xmon/start.c index a9265bcc79b..f86b584acd7 100644 --- a/arch/ppc64/xmon/start.c +++ b/arch/ppc64/xmon/start.c | |||
@@ -27,7 +27,7 @@ static void sysrq_handle_xmon(int key, struct pt_regs *pt_regs, | |||
27 | struct tty_struct *tty) | 27 | struct tty_struct *tty) |
28 | { | 28 | { |
29 | /* ensure xmon is enabled */ | 29 | /* ensure xmon is enabled */ |
30 | xmon_init(); | 30 | xmon_init(1); |
31 | debugger(pt_regs); | 31 | debugger(pt_regs); |
32 | } | 32 | } |
33 | 33 | ||
diff --git a/arch/ppc64/xmon/xmon.c b/arch/ppc64/xmon/xmon.c index 05539439e6b..45908b10acd 100644 --- a/arch/ppc64/xmon/xmon.c +++ b/arch/ppc64/xmon/xmon.c | |||
@@ -2496,15 +2496,25 @@ static void dump_stab(void) | |||
2496 | } | 2496 | } |
2497 | } | 2497 | } |
2498 | 2498 | ||
2499 | void xmon_init(void) | 2499 | void xmon_init(int enable) |
2500 | { | 2500 | { |
2501 | __debugger = xmon; | 2501 | if (enable) { |
2502 | __debugger_ipi = xmon_ipi; | 2502 | __debugger = xmon; |
2503 | __debugger_bpt = xmon_bpt; | 2503 | __debugger_ipi = xmon_ipi; |
2504 | __debugger_sstep = xmon_sstep; | 2504 | __debugger_bpt = xmon_bpt; |
2505 | __debugger_iabr_match = xmon_iabr_match; | 2505 | __debugger_sstep = xmon_sstep; |
2506 | __debugger_dabr_match = xmon_dabr_match; | 2506 | __debugger_iabr_match = xmon_iabr_match; |
2507 | __debugger_fault_handler = xmon_fault_handler; | 2507 | __debugger_dabr_match = xmon_dabr_match; |
2508 | __debugger_fault_handler = xmon_fault_handler; | ||
2509 | } else { | ||
2510 | __debugger = NULL; | ||
2511 | __debugger_ipi = NULL; | ||
2512 | __debugger_bpt = NULL; | ||
2513 | __debugger_sstep = NULL; | ||
2514 | __debugger_iabr_match = NULL; | ||
2515 | __debugger_dabr_match = NULL; | ||
2516 | __debugger_fault_handler = NULL; | ||
2517 | } | ||
2508 | } | 2518 | } |
2509 | 2519 | ||
2510 | void dump_segments(void) | 2520 | void dump_segments(void) |