Commit b13cfd173f73c3f6f9a307b7b6e64d45fbd756b2
Committed by
Paul Mackerras
1 parent
bef5686229
Exists in
master
and in
4 other branches
[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>
Showing 4 changed files with 26 additions and 14 deletions Side-by-side Diff
arch/ppc64/kernel/setup.c
| ... | ... | @@ -627,7 +627,7 @@ |
| 627 | 627 | * Initialize xmon |
| 628 | 628 | */ |
| 629 | 629 | #ifdef CONFIG_XMON_DEFAULT |
| 630 | - xmon_init(); | |
| 630 | + xmon_init(1); | |
| 631 | 631 | #endif |
| 632 | 632 | /* |
| 633 | 633 | * Register early console |
| 634 | 634 | |
| ... | ... | @@ -1343,11 +1343,13 @@ |
| 1343 | 1343 | /* ensure xmon is enabled */ |
| 1344 | 1344 | if (p) { |
| 1345 | 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 | 1349 | if (strncmp(p, "early", 5) != 0) |
| 1348 | 1350 | return 0; |
| 1349 | 1351 | } |
| 1350 | - xmon_init(); | |
| 1352 | + xmon_init(1); | |
| 1351 | 1353 | debugger(NULL); |
| 1352 | 1354 | |
| 1353 | 1355 | return 0; |
arch/ppc64/xmon/start.c
arch/ppc64/xmon/xmon.c
| ... | ... | @@ -2496,15 +2496,25 @@ |
| 2496 | 2496 | } |
| 2497 | 2497 | } |
| 2498 | 2498 | |
| 2499 | -void xmon_init(void) | |
| 2499 | +void xmon_init(int enable) | |
| 2500 | 2500 | { |
| 2501 | - __debugger = xmon; | |
| 2502 | - __debugger_ipi = xmon_ipi; | |
| 2503 | - __debugger_bpt = xmon_bpt; | |
| 2504 | - __debugger_sstep = xmon_sstep; | |
| 2505 | - __debugger_iabr_match = xmon_iabr_match; | |
| 2506 | - __debugger_dabr_match = xmon_dabr_match; | |
| 2507 | - __debugger_fault_handler = xmon_fault_handler; | |
| 2501 | + if (enable) { | |
| 2502 | + __debugger = xmon; | |
| 2503 | + __debugger_ipi = xmon_ipi; | |
| 2504 | + __debugger_bpt = xmon_bpt; | |
| 2505 | + __debugger_sstep = xmon_sstep; | |
| 2506 | + __debugger_iabr_match = xmon_iabr_match; | |
| 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 | 2520 | void dump_segments(void) |