From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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: 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.