diff options
Diffstat (limited to 'arch/blackfin/kernel/kgdb.c')
-rw-r--r-- | arch/blackfin/kernel/kgdb.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/blackfin/kernel/kgdb.c b/arch/blackfin/kernel/kgdb.c index edae461b1c54..eb92592fd80c 100644 --- a/arch/blackfin/kernel/kgdb.c +++ b/arch/blackfin/kernel/kgdb.c | |||
@@ -345,6 +345,23 @@ void kgdb_roundup_cpu(int cpu, unsigned long flags) | |||
345 | } | 345 | } |
346 | #endif | 346 | #endif |
347 | 347 | ||
348 | #ifdef CONFIG_IPIPE | ||
349 | static unsigned long kgdb_arch_imask; | ||
350 | #endif | ||
351 | |||
352 | void kgdb_post_primary_code(struct pt_regs *regs, int e_vector, int err_code) | ||
353 | { | ||
354 | if (kgdb_single_step) | ||
355 | preempt_enable(); | ||
356 | |||
357 | #ifdef CONFIG_IPIPE | ||
358 | if (kgdb_arch_imask) { | ||
359 | cpu_pda[raw_smp_processor_id()].ex_imask = kgdb_arch_imask; | ||
360 | kgdb_arch_imask = 0; | ||
361 | } | ||
362 | #endif | ||
363 | } | ||
364 | |||
348 | int kgdb_arch_handle_exception(int vector, int signo, | 365 | int kgdb_arch_handle_exception(int vector, int signo, |
349 | int err_code, char *remcom_in_buffer, | 366 | int err_code, char *remcom_in_buffer, |
350 | char *remcom_out_buffer, | 367 | char *remcom_out_buffer, |
@@ -388,6 +405,12 @@ int kgdb_arch_handle_exception(int vector, int signo, | |||
388 | * kgdb_single_step > 0 means in single step mode | 405 | * kgdb_single_step > 0 means in single step mode |
389 | */ | 406 | */ |
390 | kgdb_single_step = i + 1; | 407 | kgdb_single_step = i + 1; |
408 | |||
409 | preempt_disable(); | ||
410 | #ifdef CONFIG_IPIPE | ||
411 | kgdb_arch_imask = cpu_pda[raw_smp_processor_id()].ex_imask; | ||
412 | cpu_pda[raw_smp_processor_id()].ex_imask = 0; | ||
413 | #endif | ||
391 | } | 414 | } |
392 | 415 | ||
393 | bfin_correct_hw_break(); | 416 | bfin_correct_hw_break(); |
@@ -448,6 +471,9 @@ void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip) | |||
448 | int kgdb_arch_init(void) | 471 | int kgdb_arch_init(void) |
449 | { | 472 | { |
450 | kgdb_single_step = 0; | 473 | kgdb_single_step = 0; |
474 | #ifdef CONFIG_IPIPE | ||
475 | kgdb_arch_imask = 0; | ||
476 | #endif | ||
451 | 477 | ||
452 | bfin_remove_all_hw_break(); | 478 | bfin_remove_all_hw_break(); |
453 | return 0; | 479 | return 0; |