[Top] [All Lists]

Re: preempt safe fpu-emulator

To: "Ralf Baechle" <>
Subject: Re: preempt safe fpu-emulator
From: "Kevin D. Kissell" <>
Date: Thu, 28 Apr 2005 18:06:53 +0200
Cc: "Atsushi Nemoto" <>, <>
Original-recipient: rfc822;
References: <> <> <002d01c54bfa$5b913f80$0deca8c0@Ulysses> <>
> On Thu, Apr 28, 2005 at 06:58:28AM -0700, Kevin D. Kissell wrote:
> > When I first integrated the Algorithmics emulator with the Linux kernel
> > several years back, I tried doing something like this but ran into some
> > problem that I cannot recall exactly - there may have been some case
> > where the system expected threads to "inherit" FCSR changes.  I agree
> > that this is an obviously cleaner approach, but be careful.
> The global variables definately won't fly anymore in preemptable and SMP
> kernels.  Or rather any attempt to get that to work would only make things
> worse, so they had to go.

The global variable thing was clearly not SMP safe - but then again, the
32-bit MIPS kernel we were working with wasn't SMP safe either, in
those days.  ;o)  But *if* - and it may not really (or no longer) be the case - 
there is an implicit assumption that some FCSR state is preserved on a
context switch, it would be more correct to map the ieee754_csr symbol
to a per-CPU variable than a per-thread variable.


            Kevin K.

<Prev in Thread] Current Thread [Next in Thread>