diff options
Diffstat (limited to 'arch/mips/kernel/gdb-stub.c')
| -rw-r--r-- | arch/mips/kernel/gdb-stub.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/mips/kernel/gdb-stub.c b/arch/mips/kernel/gdb-stub.c index c33f6f22d86a..bd128fab4b36 100644 --- a/arch/mips/kernel/gdb-stub.c +++ b/arch/mips/kernel/gdb-stub.c | |||
| @@ -676,15 +676,18 @@ static void kgdb_wait(void *arg) | |||
| 676 | static int kgdb_smp_call_kgdb_wait(void) | 676 | static int kgdb_smp_call_kgdb_wait(void) |
| 677 | { | 677 | { |
| 678 | #ifdef CONFIG_SMP | 678 | #ifdef CONFIG_SMP |
| 679 | cpumask_t mask = cpu_online_map; | ||
| 679 | struct call_data_struct data; | 680 | struct call_data_struct data; |
| 680 | int i, cpus = num_online_cpus() - 1; | ||
| 681 | int cpu = smp_processor_id(); | 681 | int cpu = smp_processor_id(); |
| 682 | int cpus; | ||
| 682 | 683 | ||
| 683 | /* | 684 | /* |
| 684 | * Can die spectacularly if this CPU isn't yet marked online | 685 | * Can die spectacularly if this CPU isn't yet marked online |
| 685 | */ | 686 | */ |
| 686 | BUG_ON(!cpu_online(cpu)); | 687 | BUG_ON(!cpu_online(cpu)); |
| 687 | 688 | ||
| 689 | cpu_clear(cpu, mask); | ||
| 690 | cpus = cpus_weight(mask); | ||
| 688 | if (!cpus) | 691 | if (!cpus) |
| 689 | return 0; | 692 | return 0; |
| 690 | 693 | ||
| @@ -711,10 +714,7 @@ static int kgdb_smp_call_kgdb_wait(void) | |||
| 711 | call_data = &data; | 714 | call_data = &data; |
| 712 | mb(); | 715 | mb(); |
| 713 | 716 | ||
| 714 | /* Send a message to all other CPUs and wait for them to respond */ | 717 | core_send_ipi_mask(mask, SMP_CALL_FUNCTION); |
| 715 | for (i = 0; i < NR_CPUS; i++) | ||
| 716 | if (cpu_online(i) && i != cpu) | ||
| 717 | core_send_ipi(i, SMP_CALL_FUNCTION); | ||
| 718 | 718 | ||
| 719 | /* Wait for response */ | 719 | /* Wait for response */ |
| 720 | /* FIXME: lock-up detection, backtrace on lock-up */ | 720 | /* FIXME: lock-up detection, backtrace on lock-up */ |
