diff options
Diffstat (limited to 'kernel/debug/debug_core.c')
| -rw-r--r-- | kernel/debug/debug_core.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c index 26dbdc37d219..fec596da9bd0 100644 --- a/kernel/debug/debug_core.c +++ b/kernel/debug/debug_core.c | |||
| @@ -460,19 +460,6 @@ static int kgdb_reenter_check(struct kgdb_state *ks) | |||
| 460 | return 1; | 460 | return 1; |
| 461 | } | 461 | } |
| 462 | 462 | ||
| 463 | static void dbg_cpu_switch(int cpu, int next_cpu) | ||
| 464 | { | ||
| 465 | /* Mark the cpu we are switching away from as a slave when it | ||
| 466 | * holds the kgdb_active token. This must be done so that the | ||
| 467 | * that all the cpus wait in for the debug core will not enter | ||
| 468 | * again as the master. */ | ||
| 469 | if (cpu == atomic_read(&kgdb_active)) { | ||
| 470 | kgdb_info[cpu].exception_state |= DCPU_IS_SLAVE; | ||
| 471 | kgdb_info[cpu].exception_state &= ~DCPU_WANT_MASTER; | ||
| 472 | } | ||
| 473 | kgdb_info[next_cpu].exception_state |= DCPU_NEXT_MASTER; | ||
| 474 | } | ||
| 475 | |||
| 476 | static void dbg_touch_watchdogs(void) | 463 | static void dbg_touch_watchdogs(void) |
| 477 | { | 464 | { |
| 478 | touch_softlockup_watchdog_sync(); | 465 | touch_softlockup_watchdog_sync(); |
| @@ -638,7 +625,8 @@ cpu_master_loop: | |||
| 638 | if (error == DBG_PASS_EVENT) { | 625 | if (error == DBG_PASS_EVENT) { |
| 639 | dbg_kdb_mode = !dbg_kdb_mode; | 626 | dbg_kdb_mode = !dbg_kdb_mode; |
| 640 | } else if (error == DBG_SWITCH_CPU_EVENT) { | 627 | } else if (error == DBG_SWITCH_CPU_EVENT) { |
| 641 | dbg_cpu_switch(cpu, dbg_switch_cpu); | 628 | kgdb_info[dbg_switch_cpu].exception_state |= |
| 629 | DCPU_NEXT_MASTER; | ||
| 642 | goto cpu_loop; | 630 | goto cpu_loop; |
| 643 | } else { | 631 | } else { |
| 644 | kgdb_info[cpu].ret_state = error; | 632 | kgdb_info[cpu].ret_state = error; |
