Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751230AbaBBBru (ORCPT ); Sat, 1 Feb 2014 20:47:50 -0500 Received: from mail-ve0-f170.google.com ([209.85.128.170]:57132 "EHLO mail-ve0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750846AbaBBBrs (ORCPT ); Sat, 1 Feb 2014 20:47:48 -0500 MIME-Version: 1.0 In-Reply-To: <802bb1f1-1b0c-43d7-bd0e-3eb7ce93a0c2@email.android.com> References: <52ED9EA9.7080009@zytor.com> <802bb1f1-1b0c-43d7-bd0e-3eb7ce93a0c2@email.android.com> Date: Sat, 1 Feb 2014 17:47:48 -0800 X-Google-Sender-Auth: kMI4nhQm4Qly-SiyUAxnVrgcVwI Message-ID: Subject: Re: [PATCH] Make math_state_restore() save and restore the interrupt flag From: Linus Torvalds To: "H. Peter Anvin" Cc: Suresh Siddha , Nate Eldredge , Thomas Gleixner , Ingo Molnar , "the arch/x86 maintainers" , stable , Linux Kernel Mailing List , Maarten Baert , Jan Kara , George Spelvin , Pekka Riikonen Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 1, 2014 at 5:43 PM, H. Peter Anvin wrote: > What does the inner if clause do? It looks like it returns either way... Suresh broke it with his suggested version. The inner if-statement is supposed to avoid the stts *if* we had used math *and* the FPU restore worked. But with the extra "else" that Suresh added, it now always avoids the stts for the eager-fpu case, which breaks the whole logic for "hey, if the process hadn't used math, we don't waste time restoring data that doesn't exist". And, as you say, making the inner if clause pointless. Linus -- 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/