Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751052AbaBBBoy (ORCPT ); Sat, 1 Feb 2014 20:44:54 -0500 Received: from terminus.zytor.com ([198.137.202.10]:37490 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750846AbaBBBow (ORCPT ); Sat, 1 Feb 2014 20:44:52 -0500 User-Agent: K-9 Mail for Android In-Reply-To: References: <52ED9EA9.7080009@zytor.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [PATCH] Make math_state_restore() save and restore the interrupt flag From: "H. Peter Anvin" Date: Sat, 01 Feb 2014 17:43:57 -0800 To: Suresh Siddha CC: Linus Torvalds , Nate Eldredge , Thomas Gleixner , Ingo Molnar , the arch/x86 maintainers , stable , Linux Kernel Mailing List , Maarten Baert , Jan Kara , George Spelvin , Pekka Riikonen Message-ID: <802bb1f1-1b0c-43d7-bd0e-3eb7ce93a0c2@email.android.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org What does the inner if clause do? It looks like it returns either way... On February 1, 2014 5:35:13 PM PST, Suresh Siddha wrote: >On Sat, Feb 1, 2014 at 5:26 PM, H. Peter Anvin wrote: >> Even "b" does that, no? > >oh right. It needs an else. only for non-eager fpu case we should do >stts() > > void __kernel_fpu_end(void) > { > if (use_eager_fpu()) { > struct task_struct *me = current; > > if (tsk_used_math(me) && likely(!restore_fpu_checking( >me))) > return; > } else > stts(); > } > >thanks, >suresh > >> "a" should be fine as long as we don't ever use >> those features in the kernel, even under kernel_fpu_begin/end(). -- Sent from my mobile phone. Please pardon brevity and lack of formatting. -- 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/