[PATCH v2 1/2] powerpc/math-emu: move the flush FPU state function into do_mathemu
Benjamin Herrenschmidt
benh at kernel.crashing.org
Fri Jul 12 18:37:13 EST 2013
On Fri, 2013-07-12 at 13:36 +0800, Kevin Hao wrote:
> + /*
> + * If we support a HW FPU, we need to ensure the FP state
> + * if flushed into the thread_struct before attempting
> + * emulation
> + */
> +#ifdef CONFIG_PPC_FPU
> + flush_fp_to_thread(current);
> +#endif
> +
While at it, care to send a patch that defined an empty
flush_fp_to_thread() in the header instead ?
ie, switch_to.h
#ifdef CONFIG_PPC_FPU
extern void flush_fp_to_thread(struct task-struct *);
#else
static inline void flush_fp_to_thread(struct task-struct *) { };
#endif
And get rid of the ifdef's here (and elsewhere if any) ?
Thanks !
Cheers,
Ben.
More information about the Linuxppc-dev
mailing list