On Sat, Sep 22, 2012 at 07:37:03PM +0400, malc wrote:
> On Sat, 22 Sep 2012, Gabriel Paubert wrote:
> 
> > On Sat, Sep 22, 2012 at 02:12:42PM +0400, malc wrote:
> > > On Sat, 22 Sep 2012, Segher Boessenkool wrote:
> > > 
> > > > > Is it possible to determine if _native_ isel is available from 
> > > > > userspace
> > > > > somehow?
> > > > 
> > > > Just try to execute one and catch the SIGILL?
> > > > 
> > > 
> > > Unfortunately my kernel emulates ISEL for me in this case, so i don't
> > > get any SIGILLs.
> > 
> > Perform a few isels in a loop between a couple of mftb and measure the 
> > shortest time it takes. Any emulation will take tens of timebase ticks,
> > hardware implementation will return very small values, perhaps even
> > 0 depending on the relationship between core and timebase frequencies.
> > 
> > I don't remember whether it's necessary inserting an isync between the
> > two mftb. I believe that even on the most OOO machines, two mftb in
> > a row will not be reordered to the point that the second executes before 
> > the first.
> 
> Thanks for suggestion, but i'd rather not play with heuristics.

It sounds like the sort of thing that ought to be in the ELF aux
vector, but I don't know if it actually is.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to