diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-04 16:03:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-04 16:03:57 -0400 |
commit | 34c510b2eecd2fb8414998f54ce12c94e16d78a0 (patch) | |
tree | 2740ceb7f6f05f7aa72a70ba61acc7ea7b1b9cd5 /arch/mips/include/asm/fpu_emulator.h | |
parent | f7df76e6acc9d90f9ba9a871b8683c921b556410 (diff) | |
parent | 16a767ec63167ef70c056795782d6c9c76ba5a5c (diff) |
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS fixes from Ralf Baechle:
"A set of MIPS fixes for 4.9:
- lots of fixes for printk continuations
- six fixes for FP related code.
- fix max_low_pfn with disabled highmem
- fix KASLR handling of NULL FDT and KASLR for generic kernels
- fix build of compressed image
- provide default mips_cpc_default_phys_base to ignore CPC
- fix reboot on Malta"
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
MIPS: Fix max_low_pfn with disabled highmem
MIPS: Correct MIPS I FP sigcontext layout
MIPS: Fix ISA I/II FP signal context offsets
MIPS: Remove FIR from ISA I FP signal context
MIPS: Fix ISA I FP sigcontext access violation handling
MIPS: Fix FCSR Cause bit handling for correct SIGFPE issue
MIPS: ptrace: Also initialize the FP context on individual FCSR writes
MIPS: dump_tlb: Fix printk continuations
MIPS: Fix __show_regs() output
MIPS: traps: Fix output of show_code
MIPS: traps: Fix output of show_stacktrace
MIPS: traps: Fix output of show_backtrace
MIPS: Fix build of compressed image
MIPS: generic: Fix KASLR for generic kernel.
MIPS: KASLR: Fix handling of NULL FDT
MIPS: Malta: Fixup reboot
MIPS: CPC: Provide default mips_cpc_default_phys_base to ignore CPC
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 { \ | |||
63 | extern int fpu_emulator_cop1Handler(struct pt_regs *xcp, | 63 | extern int fpu_emulator_cop1Handler(struct pt_regs *xcp, |
64 | struct mips_fpu_struct *ctx, int has_fpu, | 64 | struct mips_fpu_struct *ctx, int has_fpu, |
65 | void *__user *fault_addr); | 65 | void *__user *fault_addr); |
66 | void force_fcr31_sig(unsigned long fcr31, void __user *fault_addr, | ||
67 | struct task_struct *tsk); | ||
66 | int process_fpemu_return(int sig, void __user *fault_addr, | 68 | int process_fpemu_return(int sig, void __user *fault_addr, |
67 | unsigned long fcr31); | 69 | unsigned long fcr31); |
68 | int isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn, | 70 | int isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn, |
@@ -81,4 +83,15 @@ static inline void fpu_emulator_init_fpu(void) | |||
81 | set_fpr64(&t->thread.fpu.fpr[i], 0, SIGNALLING_NAN); | 83 | set_fpr64(&t->thread.fpu.fpr[i], 0, SIGNALLING_NAN); |
82 | } | 84 | } |
83 | 85 | ||
86 | /* | ||
87 | * Mask the FCSR Cause bits according to the Enable bits, observing | ||
88 | * that Unimplemented is always enabled. | ||
89 | */ | ||
90 | static inline unsigned long mask_fcr31_x(unsigned long fcr31) | ||
91 | { | ||
92 | return fcr31 & (FPU_CSR_UNI_X | | ||
93 | ((fcr31 & FPU_CSR_ALL_E) << | ||
94 | (ffs(FPU_CSR_ALL_X) - ffs(FPU_CSR_ALL_E)))); | ||
95 | } | ||
96 | |||
84 | #endif /* _ASM_FPU_EMULATOR_H */ | 97 | #endif /* _ASM_FPU_EMULATOR_H */ |