Re: Ingo's PIII FXSTOR patch [2 Mar] causes problems

Linus Torvalds (torvalds@transmeta.com)
Fri, 16 Apr 1999 08:38:39 -0700 (PDT)


On Fri, 16 Apr 1999, Ingo Molnar wrote:
>
> i think i've found the bug. (the bug was that __put_user is self-detecting
> operand sizes, and the twd in the 'hard' structure is a char, while in the
> user-structure it's a long, so we silently lost significant bits.) I also
> fixed two other bugs and improved performance of the conversion routines.

Note that I still think you should just do the conversion in hardware:
it's slower if done the obvious way, but if you're just a _bit_ clever you
can do the fnsave directly into user space, and thus get the copy for
free, and suddenly the hardware version is not really slower any more, and
is a lot more "obviously right".

> Does the attached patch (against 2.2.5) run your numeric application fine
> now? [There is also a new #define in process.c that switches on the
> 'hardware-based' conversion variants, just in case there are still
> problems.]

I also suspect we _have_ to use fxsave/fxrestore for signal handling.
Think about it. Otherwise the signal execution will destroy the extended
context, and you cannot use the katmai instructions in user space
reliably.

Backwards compatibility is a bitch, though.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/