Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751411AbcCKScq (ORCPT ); Fri, 11 Mar 2016 13:32:46 -0500 Received: from mail-io0-f176.google.com ([209.85.223.176]:35024 "EHLO mail-io0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750708AbcCKSco (ORCPT ); Fri, 11 Mar 2016 13:32:44 -0500 MIME-Version: 1.0 In-Reply-To: <20160311113206.GD4312@pd.tnic> References: <20160310111935.GB13102@gmail.com> <20160310125610.GA26708@pd.tnic> <20160310145940.GB26708@pd.tnic> <20160311090840.GA8486@gmail.com> <20160311094802.GA4312@pd.tnic> <1457694124.2007.12.camel@nexus-software.ie> <20160311112610.GC4312@pd.tnic> <20160311113206.GD4312@pd.tnic> Date: Fri, 11 Mar 2016 10:32:43 -0800 X-Google-Sender-Auth: E3iuvDFzXbRX1wu2gXJycAqa7pE Message-ID: Subject: Re: [PATCH] x86/FPU: Fix FPU handling on legacy FPU machines From: Linus Torvalds To: Borislav Petkov Cc: Ingo Molnar , "Bryan O'Donoghue" , Andy Lutomirski , Andy Shevchenko , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , Fenghua Yu , "H. Peter Anvin" , Thomas Gleixner , Andrew Morton , Dave Hansen , Oleg Nesterov , "Yu, Yu-cheng" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 772 Lines: 19 On Fri, Mar 11, 2016 at 3:32 AM, Borislav Petkov wrote: > 486 cores like Intel Quark support only the very old, legacy x87 FPU > (FSAVE/FRSTOR, CPUID bit FXSR is not set). And our FPU code wasn't > handling the saving and restoring there properly. First, Andy Shevchenko > reported a splat: > > WARNING: CPU: 0 PID: 823 at arch/x86/include/asm/fpu/internal.h:163 fpu__clear+0x8c/0x160 > > which was us trying to execute FXRSTOR on those machines even though > they don't support it. > > After taking care of that, Bryan O'Donoghue reported that a simple FPU > test still failed because we weren't initializing the FPU state properly > on those machines. Obvious Ack to the patch, along with a "how did this ever work before?" comment.. Linus