From: hch@infradead.org (Christoph Hellwig)
To: linux-riscv@lists.infradead.org
Subject: On Supporting no-FPU machines
Date: Wed, 13 Jun 2018 00:20:44 -0700 [thread overview]
Message-ID: <20180613072044.GA3064@infradead.org> (raw)
In-Reply-To: <20180613072012.GA5293@infradead.org>
On Wed, Jun 13, 2018 at 12:20:12AM -0700, Christoph Hellwig wrote:
> On Wed, Jun 13, 2018 at 08:47:00AM +0200, Arnd Bergmann wrote:
> > > A separate CONFIG_FPU to not build the FPU code sounds fine to me
> > > as long as it defaults to on.
> >
> > If we do this, that option must also take care to disable the FPU hardware
> > if it exists. Otherwise you might run into the situation of having a system
> > intended to run without FPU access but a task uses FPU registers anyway
> > (e.g. because the compiler decides it is faster that way on the
> > microarchitecture it is optimizing for) and we fail to save/restore the FPU
> > state between task switches.
>
> I'm not sure we can force this. It would require a write to misa,
> which requires M-mode privileges.
[send too early]
Instead we should just refuse to boot a !CONFIG_FPU kernel on a system
with a FPU.
next prev parent reply other threads:[~2018-06-13 7:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-13 6:26 On Supporting no-FPU machines Alan Kao
2018-06-13 6:32 ` Christoph Hellwig
2018-06-13 6:47 ` Arnd Bergmann
2018-06-13 7:20 ` Christoph Hellwig
2018-06-13 7:20 ` Christoph Hellwig [this message]
2018-06-13 12:29 ` Arnd Bergmann
2018-06-13 16:49 ` Darius Rad
2018-06-14 0:25 ` Alan Kao
2018-06-15 20:38 ` Palmer Dabbelt
2018-06-15 23:42 ` Andrew Waterman
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=20180613072044.GA3064@infradead.org \
--to=hch@infradead.org \
--cc=linux-riscv@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.