Lines Matching refs:i
47 int i; in single_step_pending() local
49 for (i = 0; i < nr_wp_slots(); i++) { in single_step_pending()
50 if (current->thread.last_hit_ubp[i]) in single_step_pending()
69 int i; in arch_install_hw_breakpoint() local
71 for (i = 0; i < nr_wp_slots(); i++) { in arch_install_hw_breakpoint()
72 slot = this_cpu_ptr(&bp_per_reg[i]); in arch_install_hw_breakpoint()
79 if (WARN_ONCE(i == nr_wp_slots(), "Can't find any breakpoint slot")) in arch_install_hw_breakpoint()
87 __set_breakpoint(i, info); in arch_install_hw_breakpoint()
105 int i; in arch_uninstall_hw_breakpoint() local
107 for (i = 0; i < nr_wp_slots(); i++) { in arch_uninstall_hw_breakpoint()
108 slot = this_cpu_ptr(&bp_per_reg[i]); in arch_uninstall_hw_breakpoint()
115 if (WARN_ONCE(i == nr_wp_slots(), "Can't find any breakpoint slot")) in arch_uninstall_hw_breakpoint()
118 __set_breakpoint(i, &null_brk); in arch_uninstall_hw_breakpoint()
231 int i = 0; in cpu_bps_add() local
238 for (i = 0; i < nr_wp_slots(); i++) { in cpu_bps_add()
239 if (!cpu_bp[i]) { in cpu_bps_add()
240 cpu_bp[i] = tmp; in cpu_bps_add()
250 int i = 0; in cpu_bps_remove() local
253 for (i = 0; i < nr_wp_slots(); i++) { in cpu_bps_remove()
254 if (!cpu_bp[i]) in cpu_bps_remove()
257 if (cpu_bp[i]->bp == bp) { in cpu_bps_remove()
258 kfree(cpu_bp[i]); in cpu_bps_remove()
259 cpu_bp[i] = NULL; in cpu_bps_remove()
268 int i; in cpu_bps_check() local
271 for (i = 0; i < nr_wp_slots(); i++) { in cpu_bps_check()
272 if (cpu_bp[i] && !can_co_exist(cpu_bp[i], bp)) in cpu_bps_check()
360 int i; in arch_unregister_hw_breakpoint() local
362 for (i = 0; i < nr_wp_slots(); i++) { in arch_unregister_hw_breakpoint()
363 if (bp->ctx->task->thread.last_hit_ubp[i] == bp) in arch_unregister_hw_breakpoint()
364 bp->ctx->task->thread.last_hit_ubp[i] = NULL; in arch_unregister_hw_breakpoint()
479 int i; in thread_change_pc() local
481 for (i = 0; i < nr_wp_slots(); i++) { in thread_change_pc()
482 if (unlikely(tsk->thread.last_hit_ubp[i])) in thread_change_pc()
489 for (i = 0; i < nr_wp_slots(); i++) { in thread_change_pc()
490 info = counter_arch_bp(__this_cpu_read(bp_per_reg[i])); in thread_change_pc()
491 __set_breakpoint(i, info); in thread_change_pc()
492 tsk->thread.last_hit_ubp[i] = NULL; in thread_change_pc()
528 int i; in stepping_handler() local
533 for (i = 0; i < nr_wp_slots(); i++) { in stepping_handler()
534 if (!hit[i]) in stepping_handler()
536 current->thread.last_hit_ubp[i] = bp[i]; in stepping_handler()
537 info[i] = NULL; in stepping_handler()
545 for (i = 0; i < nr_wp_slots(); i++) { in stepping_handler()
546 if (!hit[i]) in stepping_handler()
548 handler_error(bp[i], info[i]); in stepping_handler()
549 info[i] = NULL; in stepping_handler()
559 int i; in handle_p10dd1_spurious_exception() local
567 for (i = 0; i < nr_wp_slots(); i++) { in handle_p10dd1_spurious_exception()
568 if (!info[i]) in handle_p10dd1_spurious_exception()
571 hw_end_addr = ALIGN(info[i]->address + info[i]->len, HW_BREAKPOINT_SIZE); in handle_p10dd1_spurious_exception()
597 if (i == nr_wp_slots()) in handle_p10dd1_spurious_exception()
600 for (i = 0; i < nr_wp_slots(); i++) { in handle_p10dd1_spurious_exception()
601 if (info[i]) { in handle_p10dd1_spurious_exception()
602 hit[i] = 1; in handle_p10dd1_spurious_exception()
603 info[i]->type |= HW_BRK_TYPE_EXTRANEOUS_IRQ; in handle_p10dd1_spurious_exception()
615 int i; in hw_breakpoint_handler() local
638 for (i = 0; i < nr_wp_slots(); i++) { in hw_breakpoint_handler()
639 bp[i] = __this_cpu_read(bp_per_reg[i]); in hw_breakpoint_handler()
640 if (!bp[i]) in hw_breakpoint_handler()
643 info[i] = counter_arch_bp(bp[i]); in hw_breakpoint_handler()
644 info[i]->type &= ~HW_BRK_TYPE_EXTRANEOUS_IRQ; in hw_breakpoint_handler()
646 if (wp_check_constraints(regs, instr, ea, type, size, info[i])) { in hw_breakpoint_handler()
649 handler_error(bp[i], info[i]); in hw_breakpoint_handler()
650 info[i] = NULL; in hw_breakpoint_handler()
655 if (is_ptrace_bp(bp[i])) in hw_breakpoint_handler()
657 hit[i] = 1; in hw_breakpoint_handler()
683 for (i = 0; i < nr_wp_slots(); i++) { in hw_breakpoint_handler()
684 if (!hit[i]) in hw_breakpoint_handler()
686 perf_bp_event(bp[i], regs); in hw_breakpoint_handler()
687 info[i] = NULL; in hw_breakpoint_handler()
695 for (i = 0; i < nr_wp_slots(); i++) { in hw_breakpoint_handler()
696 if (!hit[i]) in hw_breakpoint_handler()
698 larx_stcx_err(bp[i], info[i]); in hw_breakpoint_handler()
699 info[i] = NULL; in hw_breakpoint_handler()
712 for (i = 0; i < nr_wp_slots(); i++) { in hw_breakpoint_handler()
713 if (!hit[i]) in hw_breakpoint_handler()
715 if (!(info[i]->type & HW_BRK_TYPE_EXTRANEOUS_IRQ)) in hw_breakpoint_handler()
716 perf_bp_event(bp[i], regs); in hw_breakpoint_handler()
720 for (i = 0; i < nr_wp_slots(); i++) { in hw_breakpoint_handler()
721 if (!info[i]) in hw_breakpoint_handler()
723 __set_breakpoint(i, info[i]); in hw_breakpoint_handler()
740 int i; in single_step_dabr_instruction() local
747 for (i = 0; i < nr_wp_slots(); i++) { in single_step_dabr_instruction()
748 bp = current->thread.last_hit_ubp[i]; in single_step_dabr_instruction()
763 current->thread.last_hit_ubp[i] = NULL; in single_step_dabr_instruction()
769 for (i = 0; i < nr_wp_slots(); i++) { in single_step_dabr_instruction()
770 bp = __this_cpu_read(bp_per_reg[i]); in single_step_dabr_instruction()
775 __set_breakpoint(i, info); in single_step_dabr_instruction()
815 int i; in flush_ptrace_hw_breakpoint() local
818 for (i = 0; i < nr_wp_slots(); i++) { in flush_ptrace_hw_breakpoint()
819 unregister_hw_breakpoint(t->ptrace_bps[i]); in flush_ptrace_hw_breakpoint()
820 t->ptrace_bps[i] = NULL; in flush_ptrace_hw_breakpoint()