Lines Matching refs:i

137 	size_t i;  in alloc_slot()  local
139 for (i = 0; i < n; ++i) { in alloc_slot()
140 if (!slot[i]) { in alloc_slot()
141 slot[i] = bp; in alloc_slot()
142 return i; in alloc_slot()
174 int i; in arch_install_hw_breakpoint() local
178 i = alloc_slot(this_cpu_ptr(bp_on_reg), XCHAL_NUM_IBREAK, bp); in arch_install_hw_breakpoint()
179 if (i < 0) in arch_install_hw_breakpoint()
180 return i; in arch_install_hw_breakpoint()
181 set_ibreak_regs(i, bp); in arch_install_hw_breakpoint()
185 i = alloc_slot(this_cpu_ptr(wp_on_reg), XCHAL_NUM_DBREAK, bp); in arch_install_hw_breakpoint()
186 if (i < 0) in arch_install_hw_breakpoint()
187 return i; in arch_install_hw_breakpoint()
188 set_dbreak_regs(i, bp); in arch_install_hw_breakpoint()
196 size_t i; in free_slot() local
198 for (i = 0; i < n; ++i) { in free_slot()
199 if (slot[i] == bp) { in free_slot()
200 slot[i] = NULL; in free_slot()
201 return i; in free_slot()
210 int i; in arch_uninstall_hw_breakpoint() local
216 i = free_slot(this_cpu_ptr(bp_on_reg), XCHAL_NUM_IBREAK, bp); in arch_uninstall_hw_breakpoint()
217 if (i >= 0) { in arch_uninstall_hw_breakpoint()
219 xtensa_set_sr(ibreakenable & ~(1 << i), in arch_uninstall_hw_breakpoint()
224 i = free_slot(this_cpu_ptr(wp_on_reg), XCHAL_NUM_DBREAK, bp); in arch_uninstall_hw_breakpoint()
225 if (i >= 0) in arch_uninstall_hw_breakpoint()
226 xtensa_wsr(0, SREG_DBREAKC + i); in arch_uninstall_hw_breakpoint()
236 int i; in flush_ptrace_hw_breakpoint() local
239 for (i = 0; i < XCHAL_NUM_IBREAK; ++i) { in flush_ptrace_hw_breakpoint()
240 if (t->ptrace_bp[i]) { in flush_ptrace_hw_breakpoint()
241 unregister_hw_breakpoint(t->ptrace_bp[i]); in flush_ptrace_hw_breakpoint()
242 t->ptrace_bp[i] = NULL; in flush_ptrace_hw_breakpoint()
245 for (i = 0; i < XCHAL_NUM_DBREAK; ++i) { in flush_ptrace_hw_breakpoint()
246 if (t->ptrace_wp[i]) { in flush_ptrace_hw_breakpoint()
247 unregister_hw_breakpoint(t->ptrace_wp[i]); in flush_ptrace_hw_breakpoint()
248 t->ptrace_wp[i] = NULL; in flush_ptrace_hw_breakpoint()
266 int i; in restore_dbreak() local
268 for (i = 0; i < XCHAL_NUM_DBREAK; ++i) { in restore_dbreak()
269 struct perf_event *bp = this_cpu_ptr(wp_on_reg)[i]; in restore_dbreak()
272 set_dbreak_regs(i, bp); in restore_dbreak()
280 int i; in check_hw_breakpoint() local
283 for (i = 0; i < XCHAL_NUM_IBREAK; ++i) { in check_hw_breakpoint()
284 if (bp[i] && !bp[i]->attr.disabled && in check_hw_breakpoint()
285 regs->pc == bp[i]->attr.bp_addr) in check_hw_breakpoint()
286 perf_bp_event(bp[i], regs); in check_hw_breakpoint()