From owner-freebsd-mobile@FreeBSD.ORG Tue Mar 25 21:38:52 2014 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CBC5920; Tue, 25 Mar 2014 21:38:52 +0000 (UTC) Received: from mail-qc0-x229.google.com (mail-qc0-x229.google.com [IPv6:2607:f8b0:400d:c01::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BAF028E4; Tue, 25 Mar 2014 21:38:51 +0000 (UTC) Received: by mail-qc0-f169.google.com with SMTP id i17so1547502qcy.28 for ; Tue, 25 Mar 2014 14:38:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=NfwbaevIBjM4ogLGsZgXWVcWWNdLNEn1my8oUI/U+I8=; b=kinf/BgH3crmO/TeSyDCSM/UUQ3USs8m0RM8siqoaarXUYLgFIp1rAb0q1wjOa6sQK 0PcIZV4y9Mx6mF0ZYlQFnk3Npb2BTcOaeOmYebGAltj10tZFeFz5/GSUYPv50Su7AA94 BpQXlGOe6lW4NvFOpi+ige12cyYqDQpBitab9KRHetn6FFH3RHWBAP/sqwqRgkYB5J1i Q73vKjFCgR3/PQpbNozd4BP1E0oWgueg6saaI8pUXG+RbPesf5paZUQ/x/18dMPpabiz K4HeAUNY7ooMguLBidbzmfkvzXu6GWIYU4ASJsRvq9rXia1Pi1bJU+FfLf2NqeGJDmra H2TA== MIME-Version: 1.0 X-Received: by 10.140.96.23 with SMTP id j23mr29251578qge.4.1395783530951; Tue, 25 Mar 2014 14:38:50 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.125.1 with HTTP; Tue, 25 Mar 2014 14:38:50 -0700 (PDT) In-Reply-To: <201403251546.51476.jhb@freebsd.org> References: <20140311133610.O1796@besplex.bde.org> <201403251546.51476.jhb@freebsd.org> Date: Tue, 25 Mar 2014 14:38:50 -0700 X-Google-Sender-Auth: YUfDA0lS5hUekdEVFdUqFmy-o2I Message-ID: Subject: Re: signal 8 (floating point exception) upon resume From: Adrian Chadd To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: "freebsd-mobile@freebsd.org" , freebsd-current , Konstantin Belousov , Bruce Evans , Bruce Evans , Jung-uk Kim X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 21:38:52 -0000 On 25 March 2014 12:46, John Baldwin wrote: > On Sunday, March 23, 2014 4:41:24 pm Adrian Chadd wrote: >> [snip] >> >> Hi, >> >> As part of this thread, a whole lot of stuff was thrown around to try >> and fix / improve the correctness of this. >> >> But it still happens to me in -HEAD i386. I updated to r263418 and >> it's now doing it around 30-50% of the time I resume. > > Yes, nothing has changed in HEAD. > >> So, since I really am trying to avoid getting neck deep in learning >> (by myself) a new thing right now, would someone be willing to help me >> through the process of (a) learning how this is all supposed to work >> (which thanks to jhb and bde, I think I've learnt from the posts in >> this thread) and (b) some things to try out? I'll be able to report >> the results of this pretty quickly. > > You can try www.freebsd.org/~jhb/patches/i386_fpu_suspend2.patch. You > could have tried the first patch I posted here earlier when I first > posted it as well. :) There was a lot of chatter, I thought it was prudent to let it all settle before jumping in. Anyway: --- npx.o --- /usr/home/adrian/work/freebsd/head/src/sys/i386/isa/npx.c:769:18: error: declaration of 'union safefpu' will not be visible outside of this function [-Werror,-Wvisibility] npxsuspend(union safefpu *addr) ^ /usr/home/adrian/work/freebsd/head/src/sys/i386/isa/npx.c:769:1: error: conflicting types for 'npxsuspend' npxsuspend(union safefpu *addr) ^ ./machine/npx.h:59:6: note: previous declaration is here void npxsuspend(union savefpu *addr); ^ /usr/home/adrian/work/freebsd/head/src/sys/i386/isa/npx.c:776:9: error: incomplete type 'union safefpu' is not assignable *addr = npx_initialstate; ~~~~~ ^ /usr/home/adrian/work/freebsd/head/src/sys/i386/isa/npx.c:769:18: note: forward declaration of 'union safefpu' npxsuspend(union safefpu *addr) ^ /usr/home/adrian/work/freebsd/head/src/sys/i386/isa/npx.c:779:8: error: implicit declaration of function 'rcr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] cr0 = rcr(0); ^ /usr/home/adrian/work/freebsd/head/src/sys/i386/isa/npx.c:781:10: error: incompatible pointer types passing 'union safefpu *' to parameter of type 'union savefpu *' [-Werror,-Wincompatible-pointer-types] fpusave(addr); ^~~~ /usr/home/adrian/work/freebsd/head/src/sys/i386/isa/npx.c:160:36: note: passing argument to parameter here static void fpusave(union savefpu *); ^ /usr/home/adrian/work/freebsd/head/src/sys/i386/isa/npx.c:782:2: error: implicit declaration of function 'load_cr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] load_cr(0, cr0); ^ 6 errors generated. *** [npx.o] Error code 1 -a