powerpc/math-emu: Move the flush FPU state function into do_mathemu
By doing this we can make sure that the FPU state is only flushed to the thread struct when it is really needed. Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:

committed by
Benjamin Herrenschmidt

parent
195c4940f7
commit
6761ee3d7e
@@ -420,6 +420,15 @@ do_mathemu(struct pt_regs *regs)
|
||||
goto illegal;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we support a HW FPU, we need to ensure the FP state
|
||||
* is flushed into the thread_struct before attempting
|
||||
* emulation
|
||||
*/
|
||||
#ifdef CONFIG_PPC_FPU
|
||||
flush_fp_to_thread(current);
|
||||
#endif
|
||||
|
||||
eflag = func(op0, op1, op2, op3);
|
||||
|
||||
if (insn & 1) {
|
||||
|
Reference in New Issue
Block a user