Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753141AbbHSGvD (ORCPT ); Wed, 19 Aug 2015 02:51:03 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:37310 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751426AbbHSGvA (ORCPT ); Wed, 19 Aug 2015 02:51:00 -0400 Date: Wed, 19 Aug 2015 08:50:56 +0200 From: Ingo Molnar To: "H. Peter Anvin" Cc: Linus Torvalds , Juergen Gross , Andy Lutomirski , Linux Kernel Mailing List , Thomas Gleixner , Peter Zijlstra , Brian Gerst , Denys Vlasenko , Andrew Morton Subject: Re: [GIT PULL] x86 fixes Message-ID: <20150819065056.GB28292@gmail.com> References: <20150814071500.GA2678@gmail.com> <20150817080143.GA16928@gmail.com> <55D25D7F.40503@zytor.com> <20150819055931.GD32338@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150819055931.GD32338@gmail.com> 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: 2356 Lines: 61 * Ingo Molnar wrote: > > * H. Peter Anvin wrote: > > > On 08/17/2015 10:17 AM, Linus Torvalds wrote: > > > On Mon, Aug 17, 2015 at 9:58 AM, H. Peter Anvin wrote: > > >> > > >> That is not true. It *does* work, and I have tested it fairly recently. > > > > > > Ok, so it's not too badly broken. Good. > > > > > > Also, while it's been a long time since we needed FPU emulation on the > > > i486sx, I don't recall the details of any of the (much more modern) > > > IoT small cores. I *think* the base platforms are all at a Pentium > > > level (ie not just FPU, but MMX), but maybe there's some reason to > > > keep FP emulation alive for some platforms. > > > > > > > I just went back and looked at my records... I can guarantee that it > > worked as of 743aa456c1834f76982af44e8b71d1a0b2a82e21. > > So I went and built 743aa456c1834f76 with ARCH=i386 defconfig +MATH_EMULATION=y > and booted it on real hardware with and without 'no387': > > - 743aa456c1834f76: boots fine to a generic distro > - 743aa456c1834f76 + no387: early crash Ah, so I was able to make math-emu work with the 'no387 nofxsr' boot options. It turns out that the crash happens due 'no387' not turning off all modern FPU features in cpufeatures, which confuses the FPU code. (This is a far less severe bug than math emu not working at all.) I get some instances of: /etc/rc3.d/S99local: line 26: 1626 Illegal instruction due to user-space presuming modern FPU capabilities: Program received signal SIGILL, Illegal instruction. 0xb76be371 in RAND_SSLeay () from /lib/libcrypto.so.6 0xb76be371 : fucomip %st(1),%st FUCOMPIP is a P6+ FPU instruction. but otherwise it boots up to a shell prompt. So I take back my claim, math-emu works. If math-emu grew support for some P6 era FPU instructions it might even boot up generic distros without too much trouble. Thanks, Ingo -- 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/