Lines Matching refs:ctrl

189 	u32 ctrl, privilege;  in hw_breakpoint_control()  local
204 if (info->ctrl.type == LOONGARCH_BREAKPOINT_EXECUTE) { in hw_breakpoint_control()
222 if (info->ctrl.type == LOONGARCH_BREAKPOINT_EXECUTE) { in hw_breakpoint_control()
231 ctrl = encode_ctrl_reg(info->ctrl); in hw_breakpoint_control()
232 write_wb_reg(CSR_CFG_CTRL, i, 1, ctrl | privilege); in hw_breakpoint_control()
241 if (info->ctrl.type == LOONGARCH_BREAKPOINT_EXECUTE) { in hw_breakpoint_control()
304 len = get_hbp_len(hw->ctrl.len); in arch_check_bp_in_kernelspace()
314 int arch_bp_generic_fields(struct arch_hw_breakpoint_ctrl ctrl, in arch_bp_generic_fields() argument
318 switch (ctrl.type) { in arch_bp_generic_fields()
336 switch (ctrl.len) { in arch_bp_generic_fields()
366 hw->ctrl.type = LOONGARCH_BREAKPOINT_EXECUTE; in arch_build_bp_info()
369 hw->ctrl.type = LOONGARCH_BREAKPOINT_LOAD; in arch_build_bp_info()
372 hw->ctrl.type = LOONGARCH_BREAKPOINT_STORE; in arch_build_bp_info()
375 hw->ctrl.type = LOONGARCH_BREAKPOINT_LOAD | LOONGARCH_BREAKPOINT_STORE; in arch_build_bp_info()
384 hw->ctrl.len = LOONGARCH_BREAKPOINT_LEN_1; in arch_build_bp_info()
387 hw->ctrl.len = LOONGARCH_BREAKPOINT_LEN_2; in arch_build_bp_info()
390 hw->ctrl.len = LOONGARCH_BREAKPOINT_LEN_4; in arch_build_bp_info()
393 hw->ctrl.len = LOONGARCH_BREAKPOINT_LEN_8; in arch_build_bp_info()
420 if (hw->ctrl.type == LOONGARCH_BREAKPOINT_EXECUTE) { in hw_breakpoint_arch_parse()
430 u32 ctrl; in update_bp_registers() local
454 if ((info->ctrl.type == LOONGARCH_BREAKPOINT_EXECUTE) && (type == 0)) { in update_bp_registers()
458 ctrl = read_wb_reg(CSR_CFG_CTRL, i, 1); in update_bp_registers()
459 if (info->ctrl.type == LOONGARCH_BREAKPOINT_LOAD) in update_bp_registers()
460 ctrl |= 0x1 << MWPnCFG3_LoadEn; in update_bp_registers()
461 if (info->ctrl.type == LOONGARCH_BREAKPOINT_STORE) in update_bp_registers()
462 ctrl |= 0x1 << MWPnCFG3_StoreEn; in update_bp_registers()
463 write_wb_reg(CSR_CFG_CTRL, i, 1, ctrl); in update_bp_registers()
467 if ((info->ctrl.type == LOONGARCH_BREAKPOINT_EXECUTE) && (type == 0)) { in update_bp_registers()
470 ctrl = read_wb_reg(CSR_CFG_CTRL, i, 1); in update_bp_registers()
471 if (info->ctrl.type == LOONGARCH_BREAKPOINT_LOAD) in update_bp_registers()
472 ctrl &= ~0x1 << MWPnCFG3_LoadEn; in update_bp_registers()
473 if (info->ctrl.type == LOONGARCH_BREAKPOINT_STORE) in update_bp_registers()
474 ctrl &= ~0x1 << MWPnCFG3_StoreEn; in update_bp_registers()
475 write_wb_reg(CSR_CFG_CTRL, i, 1, ctrl); in update_bp_registers()