public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Roger Larsson <roger.larsson@norran•net>
To: linuxppc-embedded@ozlabs•org
Subject: floating point in kernel (Re: insmod problem)
Date: Sat, 14 May 2005 04:55:29 +0200	[thread overview]
Message-ID: <200505140455.29179.roger.larsson@norran.net> (raw)
In-Reply-To: <ed43f07150d50a594be2bc2589e902a0@freescale.com>

On Friday 13 May 2005 15.46, Kumar Gala wrote:
> On May 13, 2005, at 8:14 AM, Mark Chambers wrote:
> >  > You're using floating arithmetic in the kernel.
> >  >
> >  > That's not supported.
> >  >
> >  > Regards
> >  >
> >  > Pantelis
> >
> > Just for my edification:=A0 Is floating point itself not supported
> > (floating
> >  point register
> >  corruption or something like that) or just linking to user space
> > libraries?
>
> Use of floating point registers and instructions.  Its possible to use
> FP in rare cases inside the kernel buts its extremely discouraged.
>

The kernel is doing lazy saving of FP registers, only saving for user=20
processes that uses them.  And especially avoiding to save for every
interrupt!

So if you like to use any FP (registers) in kernel you have to:
=2D disable kernel preemption (YES)
=2D save previous value
=2D do your stuff
=2D restore
=2D enable preemption

I remember a preemption bug caused by using MMX/SSE to copy
memory uncached.

/RogerL

      parent reply	other threads:[~2005-05-14  1:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-13 12:33 insmod problem Marco Schramel
2005-05-13 12:46 ` Pantelis Antoniou
2005-05-13 13:14   ` Mark Chambers
2005-05-13 13:46     ` Kumar Gala
2005-05-13 17:27       ` MPC885 - USB HCI drivers Guillaume Autran
2005-05-16 21:50         ` Kylo Ginsberg
2005-05-16 22:03           ` Wolfgang Denk
2005-05-16 22:39             ` Kylo Ginsberg
2005-05-16 22:52               ` Dan Malek
2005-05-17  8:28                 ` Jonathan Masel
2005-05-16 23:27               ` Wolfgang Denk
2005-05-17  6:57                 ` Mike Rapoport
2005-05-17  8:15                   ` Wolfgang Denk
2005-05-17  8:07                     ` Pantelis Antoniou
2005-05-17  9:58                       ` Bryan O'Donoghue
2005-05-17  9:44                         ` Pantelis Antoniou
2005-05-17 11:33                           ` Mike Rapoport
2005-05-17 12:13                             ` Guillaume Autran
2005-06-09 21:19                         ` linux/drivers/net/fec_8xx/* vs. linux/arch/ppc/8xx_io/fec.c Guillaume Autran
2005-06-10  6:43                           ` Pantelis Antoniou
2005-05-17 12:10                       ` MPC885 - USB HCI drivers Guillaume Autran
2005-05-17 18:05                     ` Kylo Ginsberg
2005-05-14  2:55       ` Roger Larsson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200505140455.29179.roger.larsson@norran.net \
    --to=roger.larsson@norran$(echo .)net \
    --cc=linuxppc-embedded@ozlabs$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox