Subject: Re: fsqrt

From: Benjamin Herrenschmidt <[email-masked]>
Date: Sat, 08 Jun 2013 09:30:12 +1000

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.