Lines Matching refs:bp
50 int hw_breakpoint_arch_parse(struct perf_event *bp, in hw_breakpoint_arch_parse() argument
134 struct perf_event *bp) in alloc_slot() argument
140 slot[i] = bp; in alloc_slot()
147 static void set_ibreak_regs(int reg, struct perf_event *bp) in set_ibreak_regs() argument
149 struct arch_hw_breakpoint *info = counter_arch_bp(bp); in set_ibreak_regs()
157 static void set_dbreak_regs(int reg, struct perf_event *bp) in set_dbreak_regs() argument
159 struct arch_hw_breakpoint *info = counter_arch_bp(bp); in set_dbreak_regs()
171 int arch_install_hw_breakpoint(struct perf_event *bp) in arch_install_hw_breakpoint() argument
175 if (counter_arch_bp(bp)->type == XTENSA_BREAKPOINT_EXECUTE) { in arch_install_hw_breakpoint()
177 i = alloc_slot(this_cpu_ptr(bp_on_reg), XCHAL_NUM_IBREAK, bp); in arch_install_hw_breakpoint()
180 set_ibreak_regs(i, bp); in arch_install_hw_breakpoint()
184 i = alloc_slot(this_cpu_ptr(wp_on_reg), XCHAL_NUM_DBREAK, bp); in arch_install_hw_breakpoint()
187 set_dbreak_regs(i, bp); in arch_install_hw_breakpoint()
193 struct perf_event *bp) in free_slot() argument
198 if (slot[i] == bp) { in free_slot()
206 void arch_uninstall_hw_breakpoint(struct perf_event *bp) in arch_uninstall_hw_breakpoint() argument
208 struct arch_hw_breakpoint *info = counter_arch_bp(bp); in arch_uninstall_hw_breakpoint()
215 i = free_slot(this_cpu_ptr(bp_on_reg), XCHAL_NUM_IBREAK, bp); in arch_uninstall_hw_breakpoint()
223 i = free_slot(this_cpu_ptr(wp_on_reg), XCHAL_NUM_DBREAK, bp); in arch_uninstall_hw_breakpoint()
229 void hw_breakpoint_pmu_read(struct perf_event *bp) in hw_breakpoint_pmu_read() argument
268 struct perf_event *bp = this_cpu_ptr(wp_on_reg)[i]; in restore_dbreak() local
270 if (bp) in restore_dbreak()
271 set_dbreak_regs(i, bp); in restore_dbreak()
280 struct perf_event **bp = this_cpu_ptr(bp_on_reg); in check_hw_breakpoint() local
283 if (bp[i] && !bp[i]->attr.disabled && in check_hw_breakpoint()
284 regs->pc == bp[i]->attr.bp_addr) in check_hw_breakpoint()
285 perf_bp_event(bp[i], regs); in check_hw_breakpoint()
289 struct perf_event **bp = this_cpu_ptr(wp_on_reg); in check_hw_breakpoint() local
293 if (dbnum < XCHAL_NUM_DBREAK && bp[dbnum]) { in check_hw_breakpoint()
295 perf_bp_event(bp[dbnum], regs); in check_hw_breakpoint()