diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ppc64/kernel/setup.c | 8 | ||||
-rw-r--r-- | arch/ppc64/xmon/start.c | 2 | ||||
-rw-r--r-- | arch/ppc64/xmon/xmon.c | 28 |
3 files changed, 25 insertions, 13 deletions
diff --git a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c index e9c24d2dbd91..b3ef8df12982 100644 --- a/arch/ppc64/kernel/setup.c +++ b/arch/ppc64/kernel/setup.c | |||
@@ -627,7 +627,7 @@ void __init setup_system(void) | |||
627 | * Initialize xmon | 627 | * Initialize xmon |
628 | */ | 628 | */ |
629 | #ifdef CONFIG_XMON_DEFAULT | 629 | #ifdef CONFIG_XMON_DEFAULT |
630 | xmon_init(); | 630 | xmon_init(1); |
631 | #endif | 631 | #endif |
632 | /* | 632 | /* |
633 | * Register early console | 633 | * Register early console |
@@ -1343,11 +1343,13 @@ static int __init early_xmon(char *p) | |||
1343 | /* ensure xmon is enabled */ | 1343 | /* ensure xmon is enabled */ |
1344 | if (p) { | 1344 | if (p) { |
1345 | if (strncmp(p, "on", 2) == 0) | 1345 | if (strncmp(p, "on", 2) == 0) |
1346 | xmon_init(); | 1346 | xmon_init(1); |
1347 | if (strncmp(p, "off", 3) == 0) | ||
1348 | xmon_init(0); | ||
1347 | if (strncmp(p, "early", 5) != 0) | 1349 | if (strncmp(p, "early", 5) != 0) |
1348 | return 0; | 1350 | return 0; |
1349 | } | 1351 | } |
1350 | xmon_init(); | 1352 | xmon_init(1); |
1351 | debugger(NULL); | 1353 | debugger(NULL); |
1352 | 1354 | ||
1353 | return 0; | 1355 | return 0; |
diff --git a/arch/ppc64/xmon/start.c b/arch/ppc64/xmon/start.c index a9265bcc79b2..f86b584acd76 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 05539439e6bc..45908b10acd3 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) |