From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0E63E2C007A for ; Sat, 8 Jun 2013 09:30:28 +1000 (EST) Message-ID: <1370647812.3766.436.camel@pasglop> Subject: Re: fsqrt From: Benjamin Herrenschmidt To: Kumar Gala Date: Sat, 08 Jun 2013 09:30:12 +1000 In-Reply-To: <1370647524.3766.433.camel@pasglop> References: <1368679657.9603.32.camel@pasglop> <1368683156.9603.34.camel@pasglop> <6A3DF150A5B70D4F9B66A25E3F7C888D0701C307@039-SN2MPN1-012.039d.mgd.msft.net> <3E027F8168735B46AC006B1D0C7BB0020B1E040F@039-SN2MPN1-011.039d.mgd.msft.net> <1368684547.9603.38.camel@pasglop> <51947A00.9010504@windriver.com> <1368685307.9603.39.camel@pasglop> <51947E35.30808@windriver.com> <1368686426.9603.49.camel@pasglop> <5194800D.3010606@windriver.com> <6A3DF150A5B70D4F9B66A25E3F7C888D0701C498@039-SN2MPN1-012.039d.mgd.msft.net> <1368687133.9603.51.camel@pasglop> <1370577138.3766.342.camel@pasglop> <1370579976.3766.345.camel@pasglop> <3E027F8168735B46AC006B1D0C7BB0020B2135A0@039-SN2MPN1-012.039d.mgd.msft.net> <1370580426.3766.349.camel@pasglop> <3E027F8168735B46AC006B1D0C7BB0020B213817@039-SN2MPN1-012.039d.mgd.msft.net> <1370590884.3766.357.camel@pasglop> <3E027F8168735B46AC006B1D0C7BB0020B213A62@039-SN2MPN1-012.039d.mgd.msft.net> <137 0595190.3766 .359.camel@pasglop> <1370595557.3766.362.camel@pasglop> <1370607245.3766.386.camel@pasglop> <1370647431.3766.432.camel@pasglop> <1370647524.3766.433.camel@pasglop> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Cc: Xie Shaohui-B21989 , Liu Qiang-B32616 , Zang Roy-R61911 , Timur Tabi , "tiejun.chen" , David Laight , Fleming Andy-AFLEMING , Bhushan Bharat-R65777 , linuxppc-dev@lists.ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Sat, 2013-06-08 at 09:25 +1000, Benjamin Herrenschmidt wrote: > On Sat, 2013-06-08 at 09:23 +1000, Benjamin Herrenschmidt wrote: > > Ok, thinking out loud... looks like we might be able to just use existing > > math-emu for that. From what I can tell, all it needs (other than enabling > > the config option), is a call to flush_fp_to_thread(current); > > > > While talking math-emu... we seem to have some duplication between the > > code on do_mathemu which can be compiled without CONFIG_MATH_EMULATION and > > in this case only just emulates loads/stores/fmr and the code in > > arch/powerpc/kernel/softemu8xx.c. > > > > Is there any reason we can't just get rid of the latter ? > > Or just git completely rid of that "minimal emulation" ... Right, looking more, the code really sucks. Either you use the existing apparent ability for MATH_EMU to operate in minimal mode, ie, load/store/fmr only (which seems to do exactly the same thing as the code in softemu8xx.c which we can then get rid of), or just get rid of that minimal mode alltogether. And while at it make it a general config option for all soft-emu processors (there is no bloody reason why that should be 8xx specfic) or just get rid of the whole concept of half-emulation. Ie. CONFIG_MATH_EMULATION/CONFIG_MATH_HALF_ASSED_EMULATION Ben.