Re: Probing for native availability of isel from userspace

2012-09-25 Thread Kumar Gala
On Sep 25, 2012, at 3:59 PM, Benjamin Herrenschmidt wrote: > On Tue, 2012-09-25 at 15:17 +0200, Segher Boessenkool wrote: Fine. But I believe that mfpvr emulation came first, which is the point I object to (see the mess that the fact that CPUID is available to applications m

Re: Probing for native availability of isel from userspace

2012-09-25 Thread Benjamin Herrenschmidt
On Tue, 2012-09-25 at 15:17 +0200, Segher Boessenkool wrote: > >> Fine. But I believe that mfpvr emulation came first, which is the > >> point > >> I object to (see the mess that the fact that CPUID is available to > >> applications made to x86 when SSE registers were added). > > > > Heh, possibl

Re: Probing for native availability of isel from userspace

2012-09-25 Thread Segher Boessenkool
That's for 64-bit; another good option for 64-bit is to just never use isel, it hardly ever buys you anything. It is much more useful on the (older) 32-bit cores that support it. Why is it more useful on 32-bit? If you're referring to the performance of specific cores rather than some ar

Re: Probing for native availability of isel from userspace

2012-09-25 Thread Segher Boessenkool
Fine. But I believe that mfpvr emulation came first, which is the point I object to (see the mess that the fact that CPUID is available to applications made to x86 when SSE registers were added). Heh, possibly, I don't remember... I added the cputable, I think we added mfpvr because we didn't

Re: Probing for native availability of isel from userspace

2012-09-24 Thread Scott Wood
On 09/24/2012 07:47:28 PM, malc wrote: On Tue, 25 Sep 2012, Benjamin Herrenschmidt wrote: > On Mon, 2012-09-24 at 18:55 -0500, Scott Wood wrote: > > The ISA says that isel is "Category: Phased-In (sV2.06)" -- are there > > any 2.06 chips that don't have it? > > I believe "malc" is interested

Re: Probing for native availability of isel from userspace

2012-09-24 Thread malc
On Tue, 25 Sep 2012, Benjamin Herrenschmidt wrote: > On Mon, 2012-09-24 at 18:55 -0500, Scott Wood wrote: > > The ISA says that isel is "Category: Phased-In (sV2.06)" -- are there > > any 2.06 chips that don't have it? > > I believe "malc" is interested in knowing about pre-2.06 chips that have

Re: Probing for native availability of isel from userspace

2012-09-24 Thread Scott Wood
On 09/24/2012 07:32:03 PM, Benjamin Herrenschmidt wrote: On Mon, 2012-09-24 at 18:55 -0500, Scott Wood wrote: > The ISA says that isel is "Category: Phased-In (sV2.06)" -- are there > any 2.06 chips that don't have it? I believe "malc" is interested in knowing about pre-2.06 chips that have

Re: Probing for native availability of isel from userspace

2012-09-24 Thread Benjamin Herrenschmidt
On Mon, 2012-09-24 at 18:55 -0500, Scott Wood wrote: > The ISA says that isel is "Category: Phased-In (sV2.06)" -- are there > any 2.06 chips that don't have it? I believe "malc" is interested in knowing about pre-2.06 chips that have it. Cheers, Ben. _

Re: Probing for native availability of isel from userspace

2012-09-24 Thread Scott Wood
On 09/22/2012 08:46:06 PM, Segher Boessenkool wrote: Have a look at /sys/kernel/debug/powerpc/emulated_instructions/ then? Userspace should *NEVER* rely on the content of debugfs, it will change with time, it is not a guaranteed ABI, it's purely for people to look at... for debugging. mal

Re: Probing for native availability of isel from userspace

2012-09-24 Thread Benjamin Herrenschmidt
On Mon, 2012-09-24 at 10:06 +0200, Gabriel Paubert wrote: > > Which we do. mfpvr is available as a fallback (essentially because if we > > don't do it somebody's going to parse /proc/cpuinfo which is arguably > > worse :-) > > Fine. But I believe that mfpvr emulation came first, which is the point

Re: Probing for native availability of isel from userspace

2012-09-24 Thread Gabriel Paubert
On Mon, Sep 24, 2012 at 05:58:37PM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2012-09-24 at 09:55 +0200, Gabriel Paubert wrote: > > On Sun, Sep 23, 2012 at 03:46:06AM +0200, Segher Boessenkool wrote: > > > Why does the kernel emulate this, btw? I can see emulation is useful > > > for running o

Re: Probing for native availability of isel from userspace

2012-09-24 Thread Benjamin Herrenschmidt
On Mon, 2012-09-24 at 09:55 +0200, Gabriel Paubert wrote: > On Sun, Sep 23, 2012 at 03:46:06AM +0200, Segher Boessenkool wrote: > > Why does the kernel emulate this, btw? I can see emulation is useful > > for running older binaries, for instructions that have been removed > > from the architecture

Re: Probing for native availability of isel from userspace

2012-09-24 Thread Gabriel Paubert
On Sun, Sep 23, 2012 at 03:46:06AM +0200, Segher Boessenkool wrote: > Why does the kernel emulate this, btw? I can see emulation is useful > for running older binaries, for instructions that have been removed > from the architecture; but for newly added instructions, or optional > instructions, it

Re: Probing for native availability of isel from userspace

2012-09-22 Thread Segher Boessenkool
Have a look at /sys/kernel/debug/powerpc/emulated_instructions/ then? Userspace should *NEVER* rely on the content of debugfs, it will change with time, it is not a guaranteed ABI, it's purely for people to look at... for debugging. malc didn't say what he wants it for... People are in use

Re: Probing for native availability of isel from userspace

2012-09-22 Thread David Gibson
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 > >

Re: Probing for native availability of isel from userspace

2012-09-22 Thread malc
On Sun, 23 Sep 2012, Benjamin Herrenschmidt wrote: > On Sat, 2012-09-22 at 21:08 +0200, Segher Boessenkool wrote: > > > Thanks for suggestion, but i'd rather not play with heuristics. > > > > Have a look at /sys/kernel/debug/powerpc/emulated_instructions/ then? > > Userspace should *NEVER* rely

Re: Probing for native availability of isel from userspace

2012-09-22 Thread Benjamin Herrenschmidt
On Sat, 2012-09-22 at 21:08 +0200, Segher Boessenkool wrote: > > Thanks for suggestion, but i'd rather not play with heuristics. > > Have a look at /sys/kernel/debug/powerpc/emulated_instructions/ then? Userspace should *NEVER* rely on the content of debugfs, it will change with time, it is not a

Re: Probing for native availability of isel from userspace

2012-09-22 Thread Segher Boessenkool
Thanks for suggestion, but i'd rather not play with heuristics. Have a look at /sys/kernel/debug/powerpc/emulated_instructions/ then? Segher ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: Probing for native availability of isel from userspace

2012-09-22 Thread malc
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 cat

Re: Probing for native availability of isel from userspace

2012-09-22 Thread Gabriel Paubert
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 I

Re: Probing for native availability of isel from userspace

2012-09-22 Thread malc
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. -- mailto:av1...@

Re: Probing for native availability of isel from userspace

2012-09-22 Thread Segher Boessenkool
Is it possible to determine if _native_ isel is available from userspace somehow? Just try to execute one and catch the SIGILL? Segher ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Probing for native availability of isel from userspace

2012-09-21 Thread malc
Hello, Is it possible to determine if _native_ isel is available from userspace somehow? So far my searches on the web and within kernel (headers)/glibc were fruitless (aux vectors, cpu_user_features), few people people (Hollis Blanchard, Richard Henderson) suggested PPC_FEATURE_ARCH_2_06, but Po