• Home
  • Raw
  • Download

Lines Matching refs:thread

141 		tm_save_sprs(&(tsk->thread));  in flush_tmregs_to_thread()
205 return task->thread.regs->msr | task->thread.fpexc_mode; in get_user_msr()
210 task->thread.regs->msr &= ~MSR_DEBUGCHANGE; in set_user_msr()
211 task->thread.regs->msr |= msr & MSR_DEBUGCHANGE; in set_user_msr()
218 return task->thread.ckpt_regs.msr | task->thread.fpexc_mode; in get_user_ckpt_msr()
223 task->thread.ckpt_regs.msr &= ~MSR_DEBUGCHANGE; in set_user_ckpt_msr()
224 task->thread.ckpt_regs.msr |= msr & MSR_DEBUGCHANGE; in set_user_ckpt_msr()
230 task->thread.ckpt_regs.trap = trap & 0xfff0; in set_user_ckpt_trap()
238 *data = task->thread.dscr; in get_user_dscr()
244 task->thread.dscr = dscr; in set_user_dscr()
245 task->thread.dscr_inherit = 1; in set_user_dscr()
266 task->thread.regs->trap = trap & 0xfff0; in set_user_trap()
275 if ((task->thread.regs == NULL) || !data) in ptrace_get_reg()
287 *data = ((unsigned long *)task->thread.regs)[regno]; in ptrace_get_reg()
299 if (task->thread.regs == NULL) in ptrace_put_reg()
310 ((unsigned long *)task->thread.regs)[regno] = data; in ptrace_put_reg()
322 if (target->thread.regs == NULL) in gpr_get()
325 if (!FULL_REGS(target->thread.regs)) { in gpr_get()
328 target->thread.regs->gpr[i] = NV_REG_POISON; in gpr_get()
332 target->thread.regs, in gpr_get()
347 &target->thread.regs->orig_gpr3, in gpr_get()
364 if (target->thread.regs == NULL) in gpr_set()
367 CHECK_FULL_REGS(target->thread.regs); in gpr_set()
370 target->thread.regs, in gpr_set()
386 &target->thread.regs->orig_gpr3, in gpr_set()
436 buf[i] = target->thread.TS_FPR(i); in fpr_get()
437 buf[32] = target->thread.fp_state.fpscr; in fpr_get()
446 &target->thread.fp_state, 0, -1); in fpr_get()
474 buf[i] = target->thread.TS_FPR(i); in fpr_set()
475 buf[32] = target->thread.fp_state.fpscr; in fpr_set()
483 target->thread.TS_FPR(i) = buf[i]; in fpr_set()
484 target->thread.fp_state.fpscr = buf[32]; in fpr_set()
493 &target->thread.fp_state, 0, -1); in fpr_set()
515 return target->thread.used_vr ? regset->n : 0; in vr_active()
544 &target->thread.vr_state, 0, in vr_get()
556 vrsave.word = target->thread.vrsave; in vr_get()
591 &target->thread.vr_state, 0, in vr_set()
603 vrsave.word = target->thread.vrsave; in vr_set()
608 target->thread.vrsave = vrsave.word; in vr_set()
626 return target->thread.used_vsr ? regset->n : 0; in vsr_active()
654 buf[i] = target->thread.fp_state.fpr[i][TS_VSRLOWOFFSET]; in vsr_get()
687 buf[i] = target->thread.fp_state.fpr[i][TS_VSRLOWOFFSET]; in vsr_set()
693 target->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = buf[i]; in vsr_set()
715 return target->thread.used_spe ? regset->n : 0; in evr_active()
727 &target->thread.evr, in evr_get()
728 0, sizeof(target->thread.evr)); in evr_get()
735 &target->thread.acc, in evr_get()
736 sizeof(target->thread.evr), -1); in evr_get()
750 &target->thread.evr, in evr_set()
751 0, sizeof(target->thread.evr)); in evr_set()
758 &target->thread.acc, in evr_set()
759 sizeof(target->thread.evr), -1); in evr_set()
780 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cgpr_active()
816 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cgpr_get()
824 &target->thread.ckpt_regs, in tm_cgpr_get()
840 &target->thread.ckpt_regs.orig_gpr3, in tm_cgpr_get()
881 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cgpr_set()
889 &target->thread.ckpt_regs, in tm_cgpr_set()
905 &target->thread.ckpt_regs.orig_gpr3, in tm_cgpr_set()
945 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cfpr_active()
983 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cfpr_get()
992 buf[i] = target->thread.TS_CKFPR(i); in tm_cfpr_get()
993 buf[32] = target->thread.ckfp_state.fpscr; in tm_cfpr_get()
1029 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cfpr_set()
1037 buf[i] = target->thread.TS_CKFPR(i); in tm_cfpr_set()
1038 buf[32] = target->thread.ckfp_state.fpscr; in tm_cfpr_set()
1045 target->thread.TS_CKFPR(i) = buf[i]; in tm_cfpr_set()
1046 target->thread.ckfp_state.fpscr = buf[32]; in tm_cfpr_set()
1064 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvmx_active()
1104 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvmx_get()
1113 &target->thread.ckvr_state, 0, in tm_cvmx_get()
1124 vrsave.word = target->thread.ckvrsave; in tm_cvmx_get()
1166 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvmx_set()
1174 &target->thread.ckvr_state, 0, in tm_cvmx_set()
1185 vrsave.word = target->thread.ckvrsave; in tm_cvmx_set()
1189 target->thread.ckvrsave = vrsave.word; in tm_cvmx_set()
1209 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvsx_active()
1213 return target->thread.used_vsr ? regset->n : 0; in tm_cvsx_active()
1247 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvsx_get()
1257 buf[i] = target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET]; in tm_cvsx_get()
1295 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvsx_set()
1305 buf[i] = target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET]; in tm_cvsx_set()
1311 target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET] = buf[i]; in tm_cvsx_set()
1373 &target->thread.tm_tfhar, 0, sizeof(u64)); in tm_spr_get()
1378 &target->thread.tm_texasr, sizeof(u64), in tm_spr_get()
1384 &target->thread.tm_tfiar, in tm_spr_get()
1429 &target->thread.tm_tfhar, 0, sizeof(u64)); in tm_spr_set()
1434 &target->thread.tm_texasr, sizeof(u64), in tm_spr_set()
1440 &target->thread.tm_tfiar, in tm_spr_set()
1451 if (MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_tar_active()
1467 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_tar_get()
1471 &target->thread.tm_tar, 0, sizeof(u64)); in tm_tar_get()
1485 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_tar_set()
1489 &target->thread.tm_tar, 0, sizeof(u64)); in tm_tar_set()
1499 if (MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_ppr_active()
1516 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_ppr_get()
1520 &target->thread.tm_ppr, 0, sizeof(u64)); in tm_ppr_get()
1534 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_ppr_set()
1538 &target->thread.tm_ppr, 0, sizeof(u64)); in tm_ppr_set()
1548 if (MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_dscr_active()
1564 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_dscr_get()
1568 &target->thread.tm_dscr, 0, sizeof(u64)); in tm_dscr_get()
1582 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_dscr_set()
1586 &target->thread.tm_dscr, 0, sizeof(u64)); in tm_dscr_set()
1600 &target->thread.ppr, 0, sizeof(u64)); in ppr_get()
1612 &target->thread.ppr, 0, sizeof(u64)); in ppr_set()
1624 &target->thread.dscr, 0, sizeof(u64)); in dscr_get()
1635 &target->thread.dscr, 0, sizeof(u64)); in dscr_set()
1648 &target->thread.tar, 0, sizeof(u64)); in tar_get()
1659 &target->thread.tar, 0, sizeof(u64)); in tar_set()
1669 if (target->thread.used_ebb) in ebb_active()
1687 if (!target->thread.used_ebb) in ebb_get()
1691 &target->thread.ebbrr, 0, 3 * sizeof(unsigned long)); in ebb_get()
1708 if (target->thread.used_ebb) in ebb_set()
1712 &target->thread.ebbrr, 0, sizeof(unsigned long)); in ebb_set()
1716 &target->thread.ebbhr, sizeof(unsigned long), in ebb_set()
1721 &target->thread.bescr, in ebb_set()
1750 &target->thread.siar, 0, in pmu_get()
1771 &target->thread.siar, 0, in pmu_set()
1776 &target->thread.sdar, sizeof(unsigned long), in pmu_set()
1781 &target->thread.sier, 2 * sizeof(unsigned long), in pmu_set()
1786 &target->thread.mmcr2, 3 * sizeof(unsigned long), in pmu_set()
1791 &target->thread.mmcr0, 4 * sizeof(unsigned long), in pmu_set()
2067 &target->thread.ckpt_regs.gpr[0]); in tm_cgpr32_get()
2076 &target->thread.ckpt_regs.gpr[0]); in tm_cgpr32_set()
2087 if (target->thread.regs == NULL) in gpr32_get()
2090 if (!FULL_REGS(target->thread.regs)) { in gpr32_get()
2096 target->thread.regs->gpr[i] = NV_REG_POISON; in gpr32_get()
2099 &target->thread.regs->gpr[0]); in gpr32_get()
2107 if (target->thread.regs == NULL) in gpr32_set()
2110 CHECK_FULL_REGS(target->thread.regs); in gpr32_set()
2112 &target->thread.regs->gpr[0]); in gpr32_set()
2230 struct pt_regs *regs = task->thread.regs; in user_enable_single_step()
2234 task->thread.debug.dbcr0 &= ~DBCR0_BT; in user_enable_single_step()
2235 task->thread.debug.dbcr0 |= DBCR0_IDM | DBCR0_IC; in user_enable_single_step()
2247 struct pt_regs *regs = task->thread.regs; in user_enable_block_step()
2251 task->thread.debug.dbcr0 &= ~DBCR0_IC; in user_enable_block_step()
2252 task->thread.debug.dbcr0 = DBCR0_IDM | DBCR0_BT; in user_enable_block_step()
2264 struct pt_regs *regs = task->thread.regs; in user_disable_single_step()
2274 task->thread.debug.dbcr0 &= ~(DBCR0_IC|DBCR0_BT); in user_disable_single_step()
2278 if (!DBCR_ACTIVE_EVENTS(task->thread.debug.dbcr0, in user_disable_single_step()
2279 task->thread.debug.dbcr1)) { in user_disable_single_step()
2283 task->thread.debug.dbcr0 &= ~DBCR0_IDM; in user_disable_single_step()
2316 struct thread_struct *thread = &(task->thread); in ptrace_set_debugreg() local
2355 bp = thread->ptrace_bps[0]; in ptrace_set_debugreg()
2359 thread->ptrace_bps[0] = NULL; in ptrace_set_debugreg()
2375 thread->ptrace_bps[0] = bp; in ptrace_set_debugreg()
2376 thread->hw_brk = hw_brk; in ptrace_set_debugreg()
2386 thread->ptrace_bps[0] = bp = register_user_hw_breakpoint(&attr, in ptrace_set_debugreg()
2389 thread->ptrace_bps[0] = NULL; in ptrace_set_debugreg()
2394 task->thread.hw_brk = hw_brk; in ptrace_set_debugreg()
2402 task->thread.debug.dac1 = data & ~0x3UL; in ptrace_set_debugreg()
2404 if (task->thread.debug.dac1 == 0) { in ptrace_set_debugreg()
2406 if (!DBCR_ACTIVE_EVENTS(task->thread.debug.dbcr0, in ptrace_set_debugreg()
2407 task->thread.debug.dbcr1)) { in ptrace_set_debugreg()
2408 task->thread.regs->msr &= ~MSR_DE; in ptrace_set_debugreg()
2409 task->thread.debug.dbcr0 &= ~DBCR0_IDM; in ptrace_set_debugreg()
2421 task->thread.debug.dbcr0 |= DBCR0_IDM; in ptrace_set_debugreg()
2430 task->thread.regs->msr |= MSR_DE; in ptrace_set_debugreg()
2451 int slot1_in_use = ((child->thread.debug.dbcr0 & DBCR0_IAC1) != 0); in set_instruction_bp()
2452 int slot2_in_use = ((child->thread.debug.dbcr0 & DBCR0_IAC2) != 0); in set_instruction_bp()
2453 int slot3_in_use = ((child->thread.debug.dbcr0 & DBCR0_IAC3) != 0); in set_instruction_bp()
2454 int slot4_in_use = ((child->thread.debug.dbcr0 & DBCR0_IAC4) != 0); in set_instruction_bp()
2473 child->thread.debug.iac1 = bp_info->addr; in set_instruction_bp()
2474 child->thread.debug.iac2 = bp_info->addr2; in set_instruction_bp()
2475 child->thread.debug.dbcr0 |= DBCR0_IAC1; in set_instruction_bp()
2484 child->thread.debug.iac3 = bp_info->addr; in set_instruction_bp()
2485 child->thread.debug.iac4 = bp_info->addr2; in set_instruction_bp()
2486 child->thread.debug.dbcr0 |= DBCR0_IAC3; in set_instruction_bp()
2506 child->thread.debug.iac1 = bp_info->addr; in set_instruction_bp()
2507 child->thread.debug.dbcr0 |= DBCR0_IAC1; in set_instruction_bp()
2513 child->thread.debug.iac2 = bp_info->addr; in set_instruction_bp()
2514 child->thread.debug.dbcr0 |= DBCR0_IAC2; in set_instruction_bp()
2518 child->thread.debug.iac3 = bp_info->addr; in set_instruction_bp()
2519 child->thread.debug.dbcr0 |= DBCR0_IAC3; in set_instruction_bp()
2522 child->thread.debug.iac4 = bp_info->addr; in set_instruction_bp()
2523 child->thread.debug.dbcr0 |= DBCR0_IAC4; in set_instruction_bp()
2529 child->thread.debug.dbcr0 |= DBCR0_IDM; in set_instruction_bp()
2530 child->thread.regs->msr |= MSR_DE; in set_instruction_bp()
2539 if ((child->thread.debug.dbcr0 & DBCR0_IAC1) == 0) in del_instruction_bp()
2544 child->thread.debug.iac2 = 0; in del_instruction_bp()
2547 child->thread.debug.iac1 = 0; in del_instruction_bp()
2548 child->thread.debug.dbcr0 &= ~DBCR0_IAC1; in del_instruction_bp()
2551 if ((child->thread.debug.dbcr0 & DBCR0_IAC2) == 0) in del_instruction_bp()
2557 child->thread.debug.iac2 = 0; in del_instruction_bp()
2558 child->thread.debug.dbcr0 &= ~DBCR0_IAC2; in del_instruction_bp()
2562 if ((child->thread.debug.dbcr0 & DBCR0_IAC3) == 0) in del_instruction_bp()
2567 child->thread.debug.iac4 = 0; in del_instruction_bp()
2570 child->thread.debug.iac3 = 0; in del_instruction_bp()
2571 child->thread.debug.dbcr0 &= ~DBCR0_IAC3; in del_instruction_bp()
2574 if ((child->thread.debug.dbcr0 & DBCR0_IAC4) == 0) in del_instruction_bp()
2580 child->thread.debug.iac4 = 0; in del_instruction_bp()
2581 child->thread.debug.dbcr0 &= ~DBCR0_IAC4; in del_instruction_bp()
2611 child->thread.debug.dac1 = (unsigned long)bp_info->addr; in set_dac()
2614 child->thread.debug.dvc1 = in set_dac()
2616 child->thread.debug.dbcr2 |= in set_dac()
2622 } else if (child->thread.debug.dbcr2 & DBCR2_DAC12MODE) { in set_dac()
2632 child->thread.debug.dac2 = (unsigned long)bp_info->addr; in set_dac()
2635 child->thread.debug.dvc2 = in set_dac()
2637 child->thread.debug.dbcr2 |= in set_dac()
2644 child->thread.debug.dbcr0 |= DBCR0_IDM; in set_dac()
2645 child->thread.regs->msr |= MSR_DE; in set_dac()
2656 child->thread.debug.dac1 = 0; in del_dac()
2659 if (child->thread.debug.dbcr2 & DBCR2_DAC12MODE) { in del_dac()
2660 child->thread.debug.dac2 = 0; in del_dac()
2661 child->thread.debug.dbcr2 &= ~DBCR2_DAC12MODE; in del_dac()
2663 child->thread.debug.dbcr2 &= ~(DBCR2_DVC1M | DBCR2_DVC1BE); in del_dac()
2666 child->thread.debug.dvc1 = 0; in del_dac()
2673 if (child->thread.debug.dbcr2 & DBCR2_DAC12MODE) in del_dac()
2676 child->thread.debug.dbcr2 &= ~(DBCR2_DVC2M | DBCR2_DVC2BE); in del_dac()
2679 child->thread.debug.dvc2 = 0; in del_dac()
2681 child->thread.debug.dac2 = 0; in del_dac()
2723 if (child->thread.debug.dbcr0 & in set_dac_range()
2728 child->thread.debug.dbcr0 |= (DBCR0_DAC1R | DBCR0_IDM); in set_dac_range()
2730 child->thread.debug.dbcr0 |= (DBCR0_DAC1W | DBCR0_IDM); in set_dac_range()
2731 child->thread.debug.dac1 = bp_info->addr; in set_dac_range()
2732 child->thread.debug.dac2 = bp_info->addr2; in set_dac_range()
2734 child->thread.debug.dbcr2 |= DBCR2_DAC12M; in set_dac_range()
2736 child->thread.debug.dbcr2 |= DBCR2_DAC12MX; in set_dac_range()
2738 child->thread.debug.dbcr2 |= DBCR2_DAC12MM; in set_dac_range()
2739 child->thread.regs->msr |= MSR_DE; in set_dac_range()
2750 struct thread_struct *thread = &(child->thread); in ppc_set_hwdebug() local
2821 bp = thread->ptrace_bps[0]; in ppc_set_hwdebug()
2831 thread->ptrace_bps[0] = bp = register_user_hw_breakpoint(&attr, in ppc_set_hwdebug()
2834 thread->ptrace_bps[0] = NULL; in ppc_set_hwdebug()
2844 if (child->thread.hw_brk.address) in ppc_set_hwdebug()
2847 child->thread.hw_brk = brk; in ppc_set_hwdebug()
2857 struct thread_struct *thread = &(child->thread); in ppc_del_hwdebug() local
2869 if (!DBCR_ACTIVE_EVENTS(child->thread.debug.dbcr0, in ppc_del_hwdebug()
2870 child->thread.debug.dbcr1)) { in ppc_del_hwdebug()
2871 child->thread.debug.dbcr0 &= ~DBCR0_IDM; in ppc_del_hwdebug()
2872 child->thread.regs->msr &= ~MSR_DE; in ppc_del_hwdebug()
2881 bp = thread->ptrace_bps[0]; in ppc_del_hwdebug()
2884 thread->ptrace_bps[0] = NULL; in ppc_del_hwdebug()
2889 if (child->thread.hw_brk.address == 0) in ppc_del_hwdebug()
2892 child->thread.hw_brk.address = 0; in ppc_del_hwdebug()
2893 child->thread.hw_brk.type = 0; in ppc_del_hwdebug()
2917 || (child->thread.regs == NULL)) in arch_ptrace()
2924 CHECK_FULL_REGS(child->thread.regs); in arch_ptrace()
2934 memcpy(&tmp, &child->thread.TS_FPR(fpidx), in arch_ptrace()
2937 tmp = child->thread.fp_state.fpscr; in arch_ptrace()
2952 || (child->thread.regs == NULL)) in arch_ptrace()
2959 CHECK_FULL_REGS(child->thread.regs); in arch_ptrace()
2967 memcpy(&child->thread.TS_FPR(fpidx), &data, in arch_ptrace()
2970 child->thread.fp_state.fpscr = data; in arch_ptrace()
3049 ret = put_user(child->thread.debug.dac1, datalp); in arch_ptrace()
3051 dabr_fake = ((child->thread.hw_brk.address & (~HW_BRK_TYPE_DABR)) | in arch_ptrace()
3052 (child->thread.hw_brk.type & HW_BRK_TYPE_DABR)); in arch_ptrace()