diff options
author | 2016-11-17 08:30:54 +0100 | |
---|---|---|
committer | 2016-11-17 08:30:54 +0100 | |
commit | 89a01c51cbe3b6ae81008e8c91235be583df8c50 (patch) | |
tree | 0f2e42652d8ebdfc6aeaa8f7c1b5b834f4a5d649 /arch/mips/include/asm/fpu_emulator.h | |
parent | x86/dumpstack: Handle NULL stack pointer in show_trace_log_lvl() (diff) | |
parent | x86/cpufeatures: Enable new AVX512 cpu features (diff) | |
download | linux-dev-89a01c51cbe3b6ae81008e8c91235be583df8c50.tar.xz linux-dev-89a01c51cbe3b6ae81008e8c91235be583df8c50.zip |
Merge branch 'x86/cpufeature' into x86/asm, to pick up dependency
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/mips/include/asm/fpu_emulator.h')
-rw-r--r-- | arch/mips/include/asm/fpu_emulator.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/mips/include/asm/fpu_emulator.h b/arch/mips/include/asm/fpu_emulator.h index 355dc25172e7..c05369e0b8d6 100644 --- a/arch/mips/include/asm/fpu_emulator.h +++ b/arch/mips/include/asm/fpu_emulator.h @@ -63,6 +63,8 @@ do { \ extern int fpu_emulator_cop1Handler(struct pt_regs *xcp, struct mips_fpu_struct *ctx, int has_fpu, void *__user *fault_addr); +void force_fcr31_sig(unsigned long fcr31, void __user *fault_addr, + struct task_struct *tsk); int process_fpemu_return(int sig, void __user *fault_addr, unsigned long fcr31); int isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn, @@ -81,4 +83,15 @@ static inline void fpu_emulator_init_fpu(void) set_fpr64(&t->thread.fpu.fpr[i], 0, SIGNALLING_NAN); } +/* + * Mask the FCSR Cause bits according to the Enable bits, observing + * that Unimplemented is always enabled. + */ +static inline unsigned long mask_fcr31_x(unsigned long fcr31) +{ + return fcr31 & (FPU_CSR_UNI_X | + ((fcr31 & FPU_CSR_ALL_E) << + (ffs(FPU_CSR_ALL_X) - ffs(FPU_CSR_ALL_E)))); +} + #endif /* _ASM_FPU_EMULATOR_H */ |