Thread (23 messages) 23 messages, 7 authors, 2012-09-26

Re: Probing for native availability of isel from userspace

From: Gabriel Paubert <hidden>
Date: 2012-09-24 08:06:40

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:
quoted
On Sun, Sep 23, 2012 at 03:46:06AM +0200, Segher Boessenkool wrote:
quoted
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 hurts more than it helps?
Indeed. I also don't understand why mfpvr is emulated. That's the kind
of information that should be passed to the executables through auxiliary
vectors. After all, you can (or could at least) compile a kernel without
Altivec support and run it on a processor with Altivec.

Therefore, whether Altivec is supported or not, is a matter of
processor and kernel options. Provide this information through
the auxiliary vector and the problem is solved.
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
I object to (see the mess that the fact that CPUID is available to 
applications made to x86 when SSE registers were added).

Bottom line, the mappin between PVR and capabilities offered to 
applications should happen in one place, and this place is the kernel. 
We should definitely advertise the availability of isel.
Agreed.

	Cheers,
	Gabriel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help