• Home
  • Raw
  • Download

Lines Matching refs:thread

145 		tm_save_sprs(&(tsk->thread));  in flush_tmregs_to_thread()
209 return task->thread.regs->msr | task->thread.fpexc_mode; in get_user_msr()
214 task->thread.regs->msr &= ~MSR_DEBUGCHANGE; in set_user_msr()
215 task->thread.regs->msr |= msr & MSR_DEBUGCHANGE; in set_user_msr()
222 return task->thread.ckpt_regs.msr | task->thread.fpexc_mode; in get_user_ckpt_msr()
227 task->thread.ckpt_regs.msr &= ~MSR_DEBUGCHANGE; in set_user_ckpt_msr()
228 task->thread.ckpt_regs.msr |= msr & MSR_DEBUGCHANGE; in set_user_ckpt_msr()
234 task->thread.ckpt_regs.trap = trap & 0xfff0; in set_user_ckpt_trap()
242 *data = task->thread.dscr; in get_user_dscr()
248 task->thread.dscr = dscr; in set_user_dscr()
249 task->thread.dscr_inherit = 1; in set_user_dscr()
270 task->thread.regs->trap = trap & 0xfff0; in set_user_trap()
281 if ((task->thread.regs == NULL) || !data) in ptrace_get_reg()
307 *data = ((unsigned long *)task->thread.regs)[regno]; in ptrace_get_reg()
319 if (task->thread.regs == NULL) in ptrace_put_reg()
331 ((unsigned long *)task->thread.regs)[regno] = data; in ptrace_put_reg()
343 if (target->thread.regs == NULL) in gpr_get()
346 if (!FULL_REGS(target->thread.regs)) { in gpr_get()
349 target->thread.regs->gpr[i] = NV_REG_POISON; in gpr_get()
353 target->thread.regs, in gpr_get()
368 &target->thread.regs->orig_gpr3, in gpr_get()
385 if (target->thread.regs == NULL) in gpr_set()
388 CHECK_FULL_REGS(target->thread.regs); in gpr_set()
391 target->thread.regs, in gpr_set()
407 &target->thread.regs->orig_gpr3, in gpr_set()
457 buf[i] = target->thread.TS_FPR(i); in fpr_get()
458 buf[32] = target->thread.fp_state.fpscr; in fpr_get()
467 &target->thread.fp_state, 0, -1); in fpr_get()
495 buf[i] = target->thread.TS_FPR(i); in fpr_set()
496 buf[32] = target->thread.fp_state.fpscr; in fpr_set()
504 target->thread.TS_FPR(i) = buf[i]; in fpr_set()
505 target->thread.fp_state.fpscr = buf[32]; in fpr_set()
514 &target->thread.fp_state, 0, -1); in fpr_set()
536 return target->thread.used_vr ? regset->n : 0; in vr_active()
565 &target->thread.vr_state, 0, in vr_get()
578 vrsave.word = target->thread.vrsave; in vr_get()
615 &target->thread.vr_state, 0, in vr_set()
628 vrsave.word = target->thread.vrsave; in vr_set()
635 target->thread.vrsave = vrsave.word; in vr_set()
653 return target->thread.used_vsr ? regset->n : 0; in vsr_active()
681 buf[i] = target->thread.fp_state.fpr[i][TS_VSRLOWOFFSET]; in vsr_get()
714 buf[i] = target->thread.fp_state.fpr[i][TS_VSRLOWOFFSET]; in vsr_set()
720 target->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = buf[i]; in vsr_set()
742 return target->thread.used_spe ? regset->n : 0; in evr_active()
754 &target->thread.evr, in evr_get()
755 0, sizeof(target->thread.evr)); in evr_get()
762 &target->thread.acc, in evr_get()
763 sizeof(target->thread.evr), -1); in evr_get()
777 &target->thread.evr, in evr_set()
778 0, sizeof(target->thread.evr)); in evr_set()
785 &target->thread.acc, in evr_set()
786 sizeof(target->thread.evr), -1); in evr_set()
807 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cgpr_active()
843 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cgpr_get()
851 &target->thread.ckpt_regs, in tm_cgpr_get()
867 &target->thread.ckpt_regs.orig_gpr3, in tm_cgpr_get()
908 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cgpr_set()
916 &target->thread.ckpt_regs, in tm_cgpr_set()
932 &target->thread.ckpt_regs.orig_gpr3, in tm_cgpr_set()
972 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cfpr_active()
1010 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cfpr_get()
1019 buf[i] = target->thread.TS_CKFPR(i); in tm_cfpr_get()
1020 buf[32] = target->thread.ckfp_state.fpscr; in tm_cfpr_get()
1056 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cfpr_set()
1064 buf[i] = target->thread.TS_CKFPR(i); in tm_cfpr_set()
1065 buf[32] = target->thread.ckfp_state.fpscr; in tm_cfpr_set()
1072 target->thread.TS_CKFPR(i) = buf[i]; in tm_cfpr_set()
1073 target->thread.ckfp_state.fpscr = buf[32]; in tm_cfpr_set()
1091 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvmx_active()
1131 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvmx_get()
1140 &target->thread.ckvr_state, 0, in tm_cvmx_get()
1151 vrsave.word = target->thread.ckvrsave; in tm_cvmx_get()
1193 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvmx_set()
1201 &target->thread.ckvr_state, 0, in tm_cvmx_set()
1212 vrsave.word = target->thread.ckvrsave; in tm_cvmx_set()
1216 target->thread.ckvrsave = vrsave.word; in tm_cvmx_set()
1236 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvsx_active()
1240 return target->thread.used_vsr ? regset->n : 0; in tm_cvsx_active()
1274 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvsx_get()
1284 buf[i] = target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET]; in tm_cvsx_get()
1322 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_cvsx_set()
1332 buf[i] = target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET]; in tm_cvsx_set()
1338 target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET] = buf[i]; in tm_cvsx_set()
1400 &target->thread.tm_tfhar, 0, sizeof(u64)); in tm_spr_get()
1405 &target->thread.tm_texasr, sizeof(u64), in tm_spr_get()
1411 &target->thread.tm_tfiar, in tm_spr_get()
1456 &target->thread.tm_tfhar, 0, sizeof(u64)); in tm_spr_set()
1461 &target->thread.tm_texasr, sizeof(u64), in tm_spr_set()
1467 &target->thread.tm_tfiar, in tm_spr_set()
1478 if (MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_tar_active()
1494 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_tar_get()
1498 &target->thread.tm_tar, 0, sizeof(u64)); in tm_tar_get()
1512 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_tar_set()
1516 &target->thread.tm_tar, 0, sizeof(u64)); in tm_tar_set()
1526 if (MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_ppr_active()
1543 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_ppr_get()
1547 &target->thread.tm_ppr, 0, sizeof(u64)); in tm_ppr_get()
1561 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_ppr_set()
1565 &target->thread.tm_ppr, 0, sizeof(u64)); in tm_ppr_set()
1575 if (MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_dscr_active()
1591 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_dscr_get()
1595 &target->thread.tm_dscr, 0, sizeof(u64)); in tm_dscr_get()
1609 if (!MSR_TM_ACTIVE(target->thread.regs->msr)) in tm_dscr_set()
1613 &target->thread.tm_dscr, 0, sizeof(u64)); in tm_dscr_set()
1625 &target->thread.regs->ppr, 0, sizeof(u64)); in ppr_get()
1634 &target->thread.regs->ppr, 0, sizeof(u64)); in ppr_set()
1643 &target->thread.dscr, 0, sizeof(u64)); in dscr_get()
1651 &target->thread.dscr, 0, sizeof(u64)); in dscr_set()
1661 &target->thread.tar, 0, sizeof(u64)); in tar_get()
1669 &target->thread.tar, 0, sizeof(u64)); in tar_set()
1678 if (target->thread.used_ebb) in ebb_active()
1696 if (!target->thread.used_ebb) in ebb_get()
1700 &target->thread.ebbrr, 0, 3 * sizeof(unsigned long)); in ebb_get()
1717 if (target->thread.used_ebb) in ebb_set()
1721 &target->thread.ebbrr, 0, sizeof(unsigned long)); in ebb_set()
1725 &target->thread.ebbhr, sizeof(unsigned long), in ebb_set()
1730 &target->thread.bescr, in ebb_set()
1759 &target->thread.siar, 0, in pmu_get()
1780 &target->thread.siar, 0, in pmu_set()
1785 &target->thread.sdar, sizeof(unsigned long), in pmu_set()
1790 &target->thread.sier, 2 * sizeof(unsigned long), in pmu_set()
1795 &target->thread.mmcr2, 3 * sizeof(unsigned long), in pmu_set()
1800 &target->thread.mmcr0, 4 * sizeof(unsigned long), in pmu_set()
1828 &target->thread.amr, 0, in pkey_get()
1853 target->thread.amr = (new_amr & target->thread.uamor) | in pkey_set()
1854 (target->thread.amr & ~target->thread.uamor); in pkey_set()
2141 &target->thread.ckpt_regs.gpr[0]); in tm_cgpr32_get()
2150 &target->thread.ckpt_regs.gpr[0]); in tm_cgpr32_set()
2161 if (target->thread.regs == NULL) in gpr32_get()
2164 if (!FULL_REGS(target->thread.regs)) { in gpr32_get()
2170 target->thread.regs->gpr[i] = NV_REG_POISON; in gpr32_get()
2173 &target->thread.regs->gpr[0]); in gpr32_get()
2181 if (target->thread.regs == NULL) in gpr32_set()
2184 CHECK_FULL_REGS(target->thread.regs); in gpr32_set()
2186 &target->thread.regs->gpr[0]); in gpr32_set()
2304 struct pt_regs *regs = task->thread.regs; in user_enable_single_step()
2308 task->thread.debug.dbcr0 &= ~DBCR0_BT; in user_enable_single_step()
2309 task->thread.debug.dbcr0 |= DBCR0_IDM | DBCR0_IC; in user_enable_single_step()
2321 struct pt_regs *regs = task->thread.regs; in user_enable_block_step()
2325 task->thread.debug.dbcr0 &= ~DBCR0_IC; in user_enable_block_step()
2326 task->thread.debug.dbcr0 = DBCR0_IDM | DBCR0_BT; in user_enable_block_step()
2338 struct pt_regs *regs = task->thread.regs; in user_disable_single_step()
2348 task->thread.debug.dbcr0 &= ~(DBCR0_IC|DBCR0_BT); in user_disable_single_step()
2352 if (!DBCR_ACTIVE_EVENTS(task->thread.debug.dbcr0, in user_disable_single_step()
2353 task->thread.debug.dbcr1)) { in user_disable_single_step()
2357 task->thread.debug.dbcr0 &= ~DBCR0_IDM; in user_disable_single_step()
2390 struct thread_struct *thread = &(task->thread); in ptrace_set_debugreg() local
2431 bp = thread->ptrace_bps[0]; in ptrace_set_debugreg()
2435 thread->ptrace_bps[0] = NULL; in ptrace_set_debugreg()
2451 thread->ptrace_bps[0] = bp; in ptrace_set_debugreg()
2452 thread->hw_brk = hw_brk; in ptrace_set_debugreg()
2463 thread->ptrace_bps[0] = bp = register_user_hw_breakpoint(&attr, in ptrace_set_debugreg()
2466 thread->ptrace_bps[0] = NULL; in ptrace_set_debugreg()
2474 task->thread.hw_brk = hw_brk; in ptrace_set_debugreg()
2482 task->thread.debug.dac1 = data & ~0x3UL; in ptrace_set_debugreg()
2484 if (task->thread.debug.dac1 == 0) { in ptrace_set_debugreg()
2486 if (!DBCR_ACTIVE_EVENTS(task->thread.debug.dbcr0, in ptrace_set_debugreg()
2487 task->thread.debug.dbcr1)) { in ptrace_set_debugreg()
2488 task->thread.regs->msr &= ~MSR_DE; in ptrace_set_debugreg()
2489 task->thread.debug.dbcr0 &= ~DBCR0_IDM; in ptrace_set_debugreg()
2501 task->thread.debug.dbcr0 |= DBCR0_IDM; in ptrace_set_debugreg()
2510 task->thread.regs->msr |= MSR_DE; in ptrace_set_debugreg()
2531 int slot1_in_use = ((child->thread.debug.dbcr0 & DBCR0_IAC1) != 0); in set_instruction_bp()
2532 int slot2_in_use = ((child->thread.debug.dbcr0 & DBCR0_IAC2) != 0); in set_instruction_bp()
2533 int slot3_in_use = ((child->thread.debug.dbcr0 & DBCR0_IAC3) != 0); in set_instruction_bp()
2534 int slot4_in_use = ((child->thread.debug.dbcr0 & DBCR0_IAC4) != 0); in set_instruction_bp()
2553 child->thread.debug.iac1 = bp_info->addr; in set_instruction_bp()
2554 child->thread.debug.iac2 = bp_info->addr2; in set_instruction_bp()
2555 child->thread.debug.dbcr0 |= DBCR0_IAC1; in set_instruction_bp()
2564 child->thread.debug.iac3 = bp_info->addr; in set_instruction_bp()
2565 child->thread.debug.iac4 = bp_info->addr2; in set_instruction_bp()
2566 child->thread.debug.dbcr0 |= DBCR0_IAC3; in set_instruction_bp()
2586 child->thread.debug.iac1 = bp_info->addr; in set_instruction_bp()
2587 child->thread.debug.dbcr0 |= DBCR0_IAC1; in set_instruction_bp()
2593 child->thread.debug.iac2 = bp_info->addr; in set_instruction_bp()
2594 child->thread.debug.dbcr0 |= DBCR0_IAC2; in set_instruction_bp()
2598 child->thread.debug.iac3 = bp_info->addr; in set_instruction_bp()
2599 child->thread.debug.dbcr0 |= DBCR0_IAC3; in set_instruction_bp()
2602 child->thread.debug.iac4 = bp_info->addr; in set_instruction_bp()
2603 child->thread.debug.dbcr0 |= DBCR0_IAC4; in set_instruction_bp()
2609 child->thread.debug.dbcr0 |= DBCR0_IDM; in set_instruction_bp()
2610 child->thread.regs->msr |= MSR_DE; in set_instruction_bp()
2619 if ((child->thread.debug.dbcr0 & DBCR0_IAC1) == 0) in del_instruction_bp()
2624 child->thread.debug.iac2 = 0; in del_instruction_bp()
2627 child->thread.debug.iac1 = 0; in del_instruction_bp()
2628 child->thread.debug.dbcr0 &= ~DBCR0_IAC1; in del_instruction_bp()
2631 if ((child->thread.debug.dbcr0 & DBCR0_IAC2) == 0) in del_instruction_bp()
2637 child->thread.debug.iac2 = 0; in del_instruction_bp()
2638 child->thread.debug.dbcr0 &= ~DBCR0_IAC2; in del_instruction_bp()
2642 if ((child->thread.debug.dbcr0 & DBCR0_IAC3) == 0) in del_instruction_bp()
2647 child->thread.debug.iac4 = 0; in del_instruction_bp()
2650 child->thread.debug.iac3 = 0; in del_instruction_bp()
2651 child->thread.debug.dbcr0 &= ~DBCR0_IAC3; in del_instruction_bp()
2654 if ((child->thread.debug.dbcr0 & DBCR0_IAC4) == 0) in del_instruction_bp()
2660 child->thread.debug.iac4 = 0; in del_instruction_bp()
2661 child->thread.debug.dbcr0 &= ~DBCR0_IAC4; in del_instruction_bp()
2691 child->thread.debug.dac1 = (unsigned long)bp_info->addr; in set_dac()
2694 child->thread.debug.dvc1 = in set_dac()
2696 child->thread.debug.dbcr2 |= in set_dac()
2702 } else if (child->thread.debug.dbcr2 & DBCR2_DAC12MODE) { in set_dac()
2712 child->thread.debug.dac2 = (unsigned long)bp_info->addr; in set_dac()
2715 child->thread.debug.dvc2 = in set_dac()
2717 child->thread.debug.dbcr2 |= in set_dac()
2724 child->thread.debug.dbcr0 |= DBCR0_IDM; in set_dac()
2725 child->thread.regs->msr |= MSR_DE; in set_dac()
2736 child->thread.debug.dac1 = 0; in del_dac()
2739 if (child->thread.debug.dbcr2 & DBCR2_DAC12MODE) { in del_dac()
2740 child->thread.debug.dac2 = 0; in del_dac()
2741 child->thread.debug.dbcr2 &= ~DBCR2_DAC12MODE; in del_dac()
2743 child->thread.debug.dbcr2 &= ~(DBCR2_DVC1M | DBCR2_DVC1BE); in del_dac()
2746 child->thread.debug.dvc1 = 0; in del_dac()
2753 if (child->thread.debug.dbcr2 & DBCR2_DAC12MODE) in del_dac()
2756 child->thread.debug.dbcr2 &= ~(DBCR2_DVC2M | DBCR2_DVC2BE); in del_dac()
2759 child->thread.debug.dvc2 = 0; in del_dac()
2761 child->thread.debug.dac2 = 0; in del_dac()
2803 if (child->thread.debug.dbcr0 & in set_dac_range()
2808 child->thread.debug.dbcr0 |= (DBCR0_DAC1R | DBCR0_IDM); in set_dac_range()
2810 child->thread.debug.dbcr0 |= (DBCR0_DAC1W | DBCR0_IDM); in set_dac_range()
2811 child->thread.debug.dac1 = bp_info->addr; in set_dac_range()
2812 child->thread.debug.dac2 = bp_info->addr2; in set_dac_range()
2814 child->thread.debug.dbcr2 |= DBCR2_DAC12M; in set_dac_range()
2816 child->thread.debug.dbcr2 |= DBCR2_DAC12MX; in set_dac_range()
2818 child->thread.debug.dbcr2 |= DBCR2_DAC12MM; in set_dac_range()
2819 child->thread.regs->msr |= MSR_DE; in set_dac_range()
2830 struct thread_struct *thread = &(child->thread); in ppc_set_hwdebug() local
2901 bp = thread->ptrace_bps[0]; in ppc_set_hwdebug()
2911 thread->ptrace_bps[0] = bp = register_user_hw_breakpoint(&attr, in ppc_set_hwdebug()
2914 thread->ptrace_bps[0] = NULL; in ppc_set_hwdebug()
2924 if (child->thread.hw_brk.address) in ppc_set_hwdebug()
2930 child->thread.hw_brk = brk; in ppc_set_hwdebug()
2940 struct thread_struct *thread = &(child->thread); in ppc_del_hwdebug() local
2952 if (!DBCR_ACTIVE_EVENTS(child->thread.debug.dbcr0, in ppc_del_hwdebug()
2953 child->thread.debug.dbcr1)) { in ppc_del_hwdebug()
2954 child->thread.debug.dbcr0 &= ~DBCR0_IDM; in ppc_del_hwdebug()
2955 child->thread.regs->msr &= ~MSR_DE; in ppc_del_hwdebug()
2964 bp = thread->ptrace_bps[0]; in ppc_del_hwdebug()
2967 thread->ptrace_bps[0] = NULL; in ppc_del_hwdebug()
2972 if (child->thread.hw_brk.address == 0) in ppc_del_hwdebug()
2975 child->thread.hw_brk.address = 0; in ppc_del_hwdebug()
2976 child->thread.hw_brk.type = 0; in ppc_del_hwdebug()
3000 || (child->thread.regs == NULL)) in arch_ptrace()
3007 CHECK_FULL_REGS(child->thread.regs); in arch_ptrace()
3017 memcpy(&tmp, &child->thread.TS_FPR(fpidx), in arch_ptrace()
3020 tmp = child->thread.fp_state.fpscr; in arch_ptrace()
3035 || (child->thread.regs == NULL)) in arch_ptrace()
3042 CHECK_FULL_REGS(child->thread.regs); in arch_ptrace()
3050 memcpy(&child->thread.TS_FPR(fpidx), &data, in arch_ptrace()
3053 child->thread.fp_state.fpscr = data; in arch_ptrace()
3127 ret = put_user(child->thread.debug.dac1, datalp); in arch_ptrace()
3129 dabr_fake = ((child->thread.hw_brk.address & (~HW_BRK_TYPE_DABR)) | in arch_ptrace()
3130 (child->thread.hw_brk.type & HW_BRK_TYPE_DABR)); in arch_ptrace()