Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756999AbbEETlX (ORCPT ); Tue, 5 May 2015 15:41:23 -0400 Received: from mail.skyhub.de ([78.46.96.112]:54128 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752972AbbEETlV (ORCPT ); Tue, 5 May 2015 15:41:21 -0400 Date: Tue, 5 May 2015 21:41:16 +0200 From: Borislav Petkov To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Andy Lutomirski , Dave Hansen , Fenghua Yu , "H. Peter Anvin" , Linus Torvalds , Oleg Nesterov , Thomas Gleixner Subject: Re: [PATCH 206/208] x86/fpu: Add CONFIG_X86_DEBUG_FPU=y FPU debugging code Message-ID: <20150505194116.GR3910@pd.tnic> References: <1430848712-28064-1-git-send-email-mingo@kernel.org> <1430848712-28064-46-git-send-email-mingo@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1430848712-28064-46-git-send-email-mingo@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1857 Lines: 56 On Tue, May 05, 2015 at 07:58:30PM +0200, Ingo Molnar wrote: > There are various internal FPU state debugging checks that never > trigger in practice, but which are useful for FPU code development. > > Separate these out into CONFIG_X86_DEBUG_FPU=y, and also add a > couple of new ones. > > The size difference is about 0.5K of code on defconfig: > > text data bss filename > 15028906 2578816 1638400 vmlinux > 15029430 2578816 1638400 vmlinux > > ( Keep this enabled by default until the new FPU code is debugged. ) > > Cc: Andy Lutomirski > Cc: Borislav Petkov > Cc: Dave Hansen > Cc: Fenghua Yu > Cc: H. Peter Anvin > Cc: Linus Torvalds > Cc: Oleg Nesterov > Cc: Thomas Gleixner > Signed-off-by: Ingo Molnar ... > diff --git a/arch/x86/include/asm/fpu/internal.h b/arch/x86/include/asm/fpu/internal.h > index a4c1b7dbf70e..d2a281bd5f45 100644 > --- a/arch/x86/include/asm/fpu/internal.h > +++ b/arch/x86/include/asm/fpu/internal.h > @@ -59,6 +59,15 @@ extern void fpu__clear(struct fpu *fpu); > extern void fpu__init_check_bugs(void); > extern void fpu__resume_cpu(void); > > +/* > + * Debugging facility: > + */ > +#ifdef CONFIG_X86_DEBUG_FPU > +# define WARN_ON_FPU(x) WARN_ON_ONCE(x) > +#else > +# define WARN_ON_FPU(x) ({ 0; }) Shouldn't this be called FPU_WARN_ON() ? -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/