aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2010-11-17 01:19:28 -0500
committerMike Frysinger <vapier@gentoo.org>2011-01-10 07:18:22 -0500
commit900de05182d520ff66378e74a7b18f7d9971a32d (patch)
tree98896918623213bef886c7e83f5bf7a537361466 /arch/blackfin
parent84e97c1014a2afe1a07beb1b6de5f2d867b368fd (diff)
Blackfin: kgdb: disable interrupt when single stepping in ADEOS
When ADEOS and kgdb are both enabled, single step in linux kernel may be scheduled to Xenomai core after return from interrupt handlers. This blocks gdb continue operation after a break point is hit. So, disable interrupt when running gdb single step. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/kernel/kgdb.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/blackfin/kernel/kgdb.c b/arch/blackfin/kernel/kgdb.c
index edae461b1c54..e89ef34f744f 100644
--- a/arch/blackfin/kernel/kgdb.c
+++ b/arch/blackfin/kernel/kgdb.c
@@ -345,6 +345,18 @@ void kgdb_roundup_cpu(int cpu, unsigned long flags)
345} 345}
346#endif 346#endif
347 347
348#ifdef CONFIG_IPIPE
349static unsigned long kgdb_arch_imask;
350
351void kgdb_post_primary_code(struct pt_regs *regs, int e_vector, int err_code)
352{
353 if (kgdb_arch_imask) {
354 cpu_pda[raw_smp_processor_id()].ex_imask = kgdb_arch_imask;
355 kgdb_arch_imask = 0;
356 }
357}
358#endif
359
348int kgdb_arch_handle_exception(int vector, int signo, 360int kgdb_arch_handle_exception(int vector, int signo,
349 int err_code, char *remcom_in_buffer, 361 int err_code, char *remcom_in_buffer,
350 char *remcom_out_buffer, 362 char *remcom_out_buffer,
@@ -388,6 +400,11 @@ int kgdb_arch_handle_exception(int vector, int signo,
388 * kgdb_single_step > 0 means in single step mode 400 * kgdb_single_step > 0 means in single step mode
389 */ 401 */
390 kgdb_single_step = i + 1; 402 kgdb_single_step = i + 1;
403
404#ifdef CONFIG_IPIPE
405 kgdb_arch_imask = cpu_pda[raw_smp_processor_id()].ex_imask;
406 cpu_pda[raw_smp_processor_id()].ex_imask = 0;
407#endif
391 } 408 }
392 409
393 bfin_correct_hw_break(); 410 bfin_correct_hw_break();
@@ -448,6 +465,9 @@ void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip)
448int kgdb_arch_init(void) 465int kgdb_arch_init(void)
449{ 466{
450 kgdb_single_step = 0; 467 kgdb_single_step = 0;
468#ifdef CONFIG_IPIPE
469 kgdb_arch_imask = 0;
470#endif
451 471
452 bfin_remove_all_hw_break(); 472 bfin_remove_all_hw_break();
453 return 0; 473 return 0;