aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/blackfin/kernel/kgdb.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/blackfin/kernel/kgdb.c b/arch/blackfin/kernel/kgdb.c
index 9b80b152435e..b882ce22c347 100644
--- a/arch/blackfin/kernel/kgdb.c
+++ b/arch/blackfin/kernel/kgdb.c
@@ -329,6 +329,9 @@ static void bfin_disable_hw_debug(struct pt_regs *regs)
329} 329}
330 330
331#ifdef CONFIG_SMP 331#ifdef CONFIG_SMP
332extern void generic_exec_single(int cpu, struct call_single_data *data, int wait);
333static struct call_single_data kgdb_smp_ipi_data[NR_CPUS];
334
332void kgdb_passive_cpu_callback(void *info) 335void kgdb_passive_cpu_callback(void *info)
333{ 336{
334 kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs()); 337 kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs());
@@ -336,12 +339,18 @@ void kgdb_passive_cpu_callback(void *info)
336 339
337void kgdb_roundup_cpus(unsigned long flags) 340void kgdb_roundup_cpus(unsigned long flags)
338{ 341{
339 smp_call_function(kgdb_passive_cpu_callback, NULL, 0); 342 unsigned int cpu;
343
344 for (cpu = cpumask_first(cpu_online_mask); cpu < nr_cpu_ids;
345 cpu = cpumask_next(cpu, cpu_online_mask)) {
346 kgdb_smp_ipi_data[cpu].func = kgdb_passive_cpu_callback;
347 generic_exec_single(cpu, &kgdb_smp_ipi_data[cpu], 0);
348 }
340} 349}
341 350
342void kgdb_roundup_cpu(int cpu, unsigned long flags) 351void kgdb_roundup_cpu(int cpu, unsigned long flags)
343{ 352{
344 smp_call_function_single(cpu, kgdb_passive_cpu_callback, NULL, 0); 353 generic_exec_single(cpu, &kgdb_smp_ipi_data[cpu], 0);
345} 354}
346#endif 355#endif
347 356