Lines Matching refs:ctrl
231 enum dbg_active_el dbg_el = debug_exception_level(info->ctrl.privilege); in hw_breakpoint_control()
232 u32 ctrl; in hw_breakpoint_control() local
234 if (info->ctrl.type == ARM_BREAKPOINT_EXECUTE) { in hw_breakpoint_control()
268 ctrl = encode_ctrl_reg(info->ctrl); in hw_breakpoint_control()
270 reg_enable ? ctrl | 0x1 : ctrl & ~0x1); in hw_breakpoint_control()
343 len = get_hbp_len(hw->ctrl.len); in arch_check_bp_in_kernelspace()
353 int arch_bp_generic_fields(struct arch_hw_breakpoint_ctrl ctrl, in arch_bp_generic_fields() argument
357 switch (ctrl.type) { in arch_bp_generic_fields()
374 if (!ctrl.len) in arch_bp_generic_fields()
376 *offset = __ffs(ctrl.len); in arch_bp_generic_fields()
379 switch (ctrl.len >> *offset) { in arch_bp_generic_fields()
421 hw->ctrl.type = ARM_BREAKPOINT_EXECUTE; in arch_build_bp_info()
424 hw->ctrl.type = ARM_BREAKPOINT_LOAD; in arch_build_bp_info()
427 hw->ctrl.type = ARM_BREAKPOINT_STORE; in arch_build_bp_info()
430 hw->ctrl.type = ARM_BREAKPOINT_LOAD | ARM_BREAKPOINT_STORE; in arch_build_bp_info()
439 hw->ctrl.len = ARM_BREAKPOINT_LEN_1; in arch_build_bp_info()
442 hw->ctrl.len = ARM_BREAKPOINT_LEN_2; in arch_build_bp_info()
445 hw->ctrl.len = ARM_BREAKPOINT_LEN_3; in arch_build_bp_info()
448 hw->ctrl.len = ARM_BREAKPOINT_LEN_4; in arch_build_bp_info()
451 hw->ctrl.len = ARM_BREAKPOINT_LEN_5; in arch_build_bp_info()
454 hw->ctrl.len = ARM_BREAKPOINT_LEN_6; in arch_build_bp_info()
457 hw->ctrl.len = ARM_BREAKPOINT_LEN_7; in arch_build_bp_info()
460 hw->ctrl.len = ARM_BREAKPOINT_LEN_8; in arch_build_bp_info()
471 if (hw->ctrl.type == ARM_BREAKPOINT_EXECUTE) { in arch_build_bp_info()
473 if (hw->ctrl.len != ARM_BREAKPOINT_LEN_2 && in arch_build_bp_info()
474 hw->ctrl.len != ARM_BREAKPOINT_LEN_4) in arch_build_bp_info()
476 } else if (hw->ctrl.len != ARM_BREAKPOINT_LEN_4) { in arch_build_bp_info()
483 hw->ctrl.len = ARM_BREAKPOINT_LEN_4; in arch_build_bp_info()
496 hw->ctrl.privilege = AARCH64_BREAKPOINT_EL1; in arch_build_bp_info()
498 hw->ctrl.privilege = AARCH64_BREAKPOINT_EL0; in arch_build_bp_info()
501 hw->ctrl.enabled = !attr->disabled; in arch_build_bp_info()
531 if (hw->ctrl.len == ARM_BREAKPOINT_LEN_8) in hw_breakpoint_arch_parse()
543 if (hw->ctrl.len == ARM_BREAKPOINT_LEN_2) in hw_breakpoint_arch_parse()
549 if (hw->ctrl.len == ARM_BREAKPOINT_LEN_1) in hw_breakpoint_arch_parse()
557 if (hw->ctrl.type == ARM_BREAKPOINT_EXECUTE) in hw_breakpoint_arch_parse()
565 hw->ctrl.len <<= offset; in hw_breakpoint_arch_parse()
571 if (hw->ctrl.privilege == AARCH64_BREAKPOINT_EL1 && bp->hw.target) in hw_breakpoint_arch_parse()
585 u32 ctrl; in toggle_bp_registers() local
605 privilege = counter_arch_bp(slots[i])->ctrl.privilege; in toggle_bp_registers()
609 ctrl = read_wb_reg(reg, i); in toggle_bp_registers()
611 ctrl |= 0x1; in toggle_bp_registers()
613 ctrl &= ~0x1; in toggle_bp_registers()
614 write_wb_reg(reg, i, ctrl); in toggle_bp_registers()
629 struct arch_hw_breakpoint_ctrl ctrl; in do_breakpoint() local
650 decode_ctrl_reg(ctrl_reg, &ctrl); in do_breakpoint()
651 if (!((1 << (addr & 0x3)) & ctrl.len)) in do_breakpoint()
712 struct arch_hw_breakpoint_ctrl *ctrl) in get_distance_from_watchpoint() argument
719 lens = __ffs(ctrl->len); in get_distance_from_watchpoint()
720 lene = __fls(ctrl->len); in get_distance_from_watchpoint()
745 if (!user_mode(regs) && info->ctrl.privilege == AARCH64_BREAKPOINT_EL0) in watchpoint_report()
761 struct arch_hw_breakpoint_ctrl ctrl; in do_watchpoint() local
788 decode_ctrl_reg(ctrl_reg, &ctrl); in do_watchpoint()
789 dist = get_distance_from_watchpoint(addr, val, &ctrl); in do_watchpoint()