From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4E4C82C0319 for ; Fri, 12 Jul 2013 18:37:29 +1000 (EST) Message-ID: <1373618233.19894.143.camel@pasglop> Subject: Re: [PATCH v2 1/2] powerpc/math-emu: move the flush FPU state function into do_mathemu From: Benjamin Herrenschmidt To: Kevin Hao Date: Fri, 12 Jul 2013 18:37:13 +1000 In-Reply-To: <1373607402-21738-2-git-send-email-haokexin@gmail.com> References: <1373607402-21738-1-git-send-email-haokexin@gmail.com> <1373607402-21738-2-git-send-email-haokexin@gmail.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Cc: Scott Wood , linuxppc List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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.