Re: kernel-2.6 cvs patches

[email protected] (Arthur Othieno)
Newsgroups gmane.linux.ports.xbox.devel
Message-ID <20040624125742.GA1058@mars>
On Tue, Jun 22, 2004 at 12:51:46AM +0200, Oliver Schwartz wrote:
> > This had to bite sooner or later [1].
> 
> Ouch.
> 
> > drivers/video/xbox/{conexant,focus}.c make heavy use of
> > floating-point arithmetic, which, in-kernel, is a Bad Idea (tm). 
> 
> Can you give more information / links? Is there no safe way at all to 
> use fixed point arithmetics in kernel?
> 

Loic Lefort <loic DOT lefort AT free DOT fr> has already given the
definitive reference in another email in this thread. More can be found
by searching any of the lkml archives for 'floating point'.

As for safe use of floating point arithmetic, Linus suggests wrapping
the said code around kernel_fpu_begin()/kernel_fpu_end() --
http://www.uwsg.iu.edu/hypermail/linux/kernel/0401.0/1847.html 

> > I don't know how much accuracy is lost by switching to fixed-point
> > arithmetic, perhaps Oliver can answer that. In any case, this needs
> > to be fixed [2].
> 
> I guess the conexant part would need a major rewrite if it has to use 
> fixed point arithmetic. Not that it would be a bad idea, but it will 
> definitely be a time-consuming task. 
> 
> For the time being we definitely need a workaround, but I'd like to 
> know if any other problems may occur when removing -msoft-float 
> again.

Not AFAIK. The thing was introduced primarily to catch floating point
use in the kernel.

	Arthur


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.