| /linux/arch/loongarch/kernel/ |
| H A D | signal.c | 89 uint32_t __user *fcsr = &ctx->fcsr; in copy_fpu_to_sigcontext() local 97 err |= __put_user(current->thread.fpu.fcsr, fcsr); in copy_fpu_to_sigcontext() 109 uint32_t __user *fcsr = &ctx->fcsr; in copy_fpu_from_sigcontext() local 116 err |= __get_user(current->thread.fpu.fcsr, fcsr); in copy_fpu_from_sigcontext() 127 uint32_t __user *fcsr = &ctx->fcsr; in copy_lsx_to_sigcontext() local 136 err |= __put_user(current->thread.fpu.fcsr, fcsr); in copy_lsx_to_sigcontext() 148 uint32_t __user *fcsr = &ctx->fcsr; in copy_lsx_from_sigcontext() local 157 err |= __get_user(current->thread.fpu.fcsr, fcsr); in copy_lsx_from_sigcontext() 168 uint32_t __user *fcsr = &ctx->fcsr; in copy_lasx_to_sigcontext() local 181 err |= __put_user(current->thread.fpu.fcsr, fcsr); in copy_lasx_to_sigcontext() [all …]
|
| H A D | traps.c | 454 static void force_fcsr_sig(unsigned long fcsr, in force_fcsr_sig() argument 459 if (fcsr & FPU_CSR_INV_X) in force_fcsr_sig() 461 else if (fcsr & FPU_CSR_DIV_X) in force_fcsr_sig() 463 else if (fcsr & FPU_CSR_OVF_X) in force_fcsr_sig() 465 else if (fcsr & FPU_CSR_UDF_X) in force_fcsr_sig() 467 else if (fcsr & FPU_CSR_INE_X) in force_fcsr_sig() 473 static int process_fpemu_return(int sig, void __user *fault_addr, unsigned long fcsr) in process_fpemu_return() argument 482 force_fcsr_sig(fcsr, fault_addr, current); in process_fpemu_return() 508 asmlinkage void noinstr do_fpe(struct pt_regs *regs, unsigned long fcsr) in do_fpe() argument 519 write_fcsr(LOONGARCH_FCSR0, fcsr & ~mask_fcsr_x(fcsr)); in do_fpe() [all …]
|
| H A D | genex.S | 97 BUILD_HANDLER fpe fpe fcsr
|
| H A D | asm-offsets.c | 170 OFFSET(THREAD_FCSR, loongarch_fpu, fcsr); in output_thread_fpu_defines() 290 OFFSET(VCPU_FCSR0, kvm_vcpu_arch, fpu.fcsr); in output_kvm_defines()
|
| H A D | ptrace.c | 159 r = membuf_write(&to, &target->thread.fpu.fcsr, sizeof(target->thread.fpu.fcsr)); in fpr_get() 223 &target->thread.fpu.fcsr, fcsr_start, in fpr_set()
|
| H A D | process.c | 92 current->thread.fpu.fcsr = boot_cpu_data.fpu_csr0; in start_thread()
|
| /linux/arch/mips/kernel/ |
| H A D | fpu-probe.c | 51 unsigned long sr, mask, fcsr, fcsr0, fcsr1; in cpu_set_fpu_fcsr_mask() local 53 fcsr = c->fpu_csr31; in cpu_set_fpu_fcsr_mask() 59 fcsr0 = fcsr & mask; in cpu_set_fpu_fcsr_mask() 63 fcsr1 = fcsr | ~mask; in cpu_set_fpu_fcsr_mask() 67 write_32bit_cp1_register(CP1_STATUS, fcsr); in cpu_set_fpu_fcsr_mask() 84 unsigned long sr, fir, fcsr, fcsr0, fcsr1; in cpu_set_fpu_2008() local 91 fcsr = read_32bit_cp1_register(CP1_STATUS); in cpu_set_fpu_2008() 98 fcsr0 = fcsr & ~(FPU_CSR_ABS2008 | FPU_CSR_NAN2008 | in cpu_set_fpu_2008() 103 fcsr1 = fcsr | FPU_CSR_ABS2008 | FPU_CSR_NAN2008; in cpu_set_fpu_2008() 107 write_32bit_cp1_register(CP1_STATUS, fcsr); in cpu_set_fpu_2008() [all …]
|
| H A D | ptrace.c | 597 unsigned int fcsr; member 629 .fcsr = target->thread.fpu.fcr31, in msa_get() 686 target->thread.fpu.fcr31 = ctrl_regs.fcsr & ~FPU_CSR_ALL_X; in msa_set()
|
| /linux/arch/loongarch/include/asm/ |
| H A D | fpu.h | 39 asmlinkage int _save_lsx_context(void __user *fpregs, void __user *fcc, void __user *fcsr); 40 asmlinkage int _restore_lsx_context(void __user *fpregs, void __user *fcc, void __user *fcsr); 46 asmlinkage int _save_lasx_context(void __user *fpregs, void __user *fcc, void __user *fcsr); 47 asmlinkage int _restore_lasx_context(void __user *fpregs, void __user *fcc, void __user *fcsr); 63 static inline unsigned long mask_fcsr_x(unsigned long fcsr) in mask_fcsr_x() argument 65 return fcsr & ((fcsr & FPU_CSR_ALL_E) << in mask_fcsr_x() 165 unsigned int fcsr = current->thread.fpu.fcsr; in init_fpu() local 168 _init_fpu(fcsr); in init_fpu()
|
| H A D | processor.h | 84 uint32_t fcsr; member 181 .fcsr = 0, \
|
| H A D | exception.h | 20 asmlinkage void noinstr do_fpe(struct pt_regs *regs, unsigned long fcsr);
|
| /linux/arch/riscv/kvm/ |
| H A D | vcpu_fp.c | 93 if (reg_num == KVM_REG_RISCV_FP_F_REG(fcsr)) in kvm_riscv_vcpu_get_reg_fp() 94 reg_val = &cntx->fp.f.fcsr; in kvm_riscv_vcpu_get_reg_fp() 102 if (reg_num == KVM_REG_RISCV_FP_D_REG(fcsr)) { in kvm_riscv_vcpu_get_reg_fp() 105 reg_val = &cntx->fp.d.fcsr; in kvm_riscv_vcpu_get_reg_fp() 138 if (reg_num == KVM_REG_RISCV_FP_F_REG(fcsr)) in kvm_riscv_vcpu_set_reg_fp() 139 reg_val = &cntx->fp.f.fcsr; in kvm_riscv_vcpu_set_reg_fp() 147 if (reg_num == KVM_REG_RISCV_FP_D_REG(fcsr)) { in kvm_riscv_vcpu_set_reg_fp() 150 reg_val = &cntx->fp.d.fcsr; in kvm_riscv_vcpu_set_reg_fp()
|
| /linux/arch/loongarch/include/uapi/asm/ |
| H A D | sigcontext.h | 40 __u32 fcsr; member 49 __u32 fcsr; member 58 __u32 fcsr; member
|
| H A D | ptrace.h | 42 __u32 fcsr; member
|
| /linux/arch/loongarch/kvm/ |
| H A D | vcpu.c | 1311 fpu->fcsr = vcpu->arch.fpu.fcsr; in kvm_arch_vcpu_ioctl_get_fpu() 1323 vcpu->arch.fpu.fcsr = fpu->fcsr; in kvm_arch_vcpu_ioctl_set_fpu() 1353 static void kvm_check_fcsr(struct kvm_vcpu *vcpu, unsigned long fcsr) in kvm_check_fcsr() argument 1359 if (fcsr & FPU_CSR_TM) in kvm_check_fcsr() 1373 static inline void kvm_check_fcsr(struct kvm_vcpu *vcpu, unsigned long fcsr) { } in kvm_check_fcsr() argument 1384 kvm_check_fcsr(vcpu, vcpu->arch.fpu.fcsr); in kvm_own_fpu() 1397 kvm_check_fcsr(vcpu, vcpu->arch.fpu.fcsr); in kvm_own_lsx() 1426 kvm_check_fcsr(vcpu, vcpu->arch.fpu.fcsr); in kvm_own_lasx()
|
| /linux/tools/testing/selftests/kvm/riscv/ |
| H A D | get-reg-list.c | 448 case KVM_REG_RISCV_FP_F_REG(fcsr): in fp_f_id_to_str() 449 return "KVM_REG_RISCV_FP_F_REG(fcsr)"; in fp_f_id_to_str() 466 case KVM_REG_RISCV_FP_D_REG(fcsr): in fp_d_id_to_str() 467 return "KVM_REG_RISCV_FP_D_REG(fcsr)"; in fp_d_id_to_str() 974 KVM_REG_RISCV | KVM_REG_SIZE_U32 | KVM_REG_RISCV_FP_F | KVM_REG_RISCV_FP_F_REG(fcsr), 1011 KVM_REG_RISCV | KVM_REG_SIZE_U32 | KVM_REG_RISCV_FP_D | KVM_REG_RISCV_FP_D_REG(fcsr),
|