From: Alan Kao <alankao@andestech.com>
To: Palmer Dabbelt <palmer@sifive.com>,
<linux-riscv@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
Christoph Hellwig <hch@lst.de>
Cc: Greentime Hu <greentime@andestech.com>,
Vincent Chen <vincentc@andestech.com>,
Zong Li <zong@andestech.com>, Nick Hu <nickhu@andestech.com>,
Alan Kao <alankao@andestech.com>
Subject: [PATCH v8 0/5] riscv: Add support to no-FPU systems
Date: Tue, 9 Oct 2018 10:18:29 +0800 [thread overview]
Message-ID: <1539051514-3658-1-git-send-email-alankao@andestech.com> (raw)
This patchset adds an option, CONFIG_FPU, to enable/disable floating-
point procedures.
Kernel's new behavior will be as follows:
* with CONFIG_FPU=y
All FPU codes are reserved. If no FPU is found during booting, a
global flag will be set, and those functions will be bypassed with
condition check to that flag.
* with CONFIG_FPU=n
No floating-point instructions in kernel and all related settings
are excluded.
Changes in v8:
- Fix a build fail introduced in v7.
Changes in v7:
- Remove "fd" attribute from KBUILD_CFLAGS.
Changes in v6 (PATCH 0005 only):
- Make the flag checking neater.
Changes in v5:
- Invert the polarity of checking flag from no_fpu to has_fpu.
Changes in v4:
- Append a new patch to detect existence of FPU and followups.
- Add SPDX header to newly created fpu.S.
- Fix a build error, sorry for that.
- Fix wording, style, etc.
Changes in v3:
- Refactor the whole patch into independent ones.
Changes in v2:
- Various code cleanups and style fixes.
Alan Kao (5):
Extract FPU context operations from entry.S
Refactor FPU code in signal setup/return procedures
Cleanup ISA string setting
Allow to disable FPU support
Auto-detect whether a FPU exists
arch/riscv/Kconfig | 9 ++++
arch/riscv/Makefile | 19 +++----
arch/riscv/include/asm/switch_to.h | 12 ++++-
arch/riscv/kernel/Makefile | 1 +
arch/riscv/kernel/cpufeature.c | 8 +++
arch/riscv/kernel/entry.S | 87 ------------------------------
arch/riscv/kernel/fpu.S | 106 +++++++++++++++++++++++++++++++++++++
arch/riscv/kernel/process.c | 6 ++-
arch/riscv/kernel/signal.c | 75 ++++++++++++++++----------
9 files changed, 196 insertions(+), 127 deletions(-)
create mode 100644 arch/riscv/kernel/fpu.S
--
2.7.4
next reply other threads:[~2018-10-09 2:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-09 2:18 Alan Kao [this message]
2018-10-09 2:18 ` [PATCH v8 1/5] Extract FPU context operations from entry.S Alan Kao
2018-10-09 2:18 ` [PATCH v8 2/5] Refactor FPU code in signal setup/return procedures Alan Kao
2018-10-09 2:18 ` [PATCH v8 3/5] Cleanup ISA string setting Alan Kao
2018-10-14 0:02 ` Guenter Roeck
2018-10-14 23:46 ` Alan Kao
2018-10-15 2:13 ` Guenter Roeck
2018-10-15 22:34 ` Palmer Dabbelt
2018-10-16 13:18 ` Guenter Roeck
2018-10-09 2:18 ` [PATCH v8 4/5] Allow to disable FPU support Alan Kao
2018-10-09 2:18 ` [PATCH v8 5/5] Auto-detect whether a FPU exists Alan Kao
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=1539051514-3658-1-git-send-email-alankao@andestech.com \
--to=alankao@andestech.com \
--cc=greentime@andestech.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=nickhu@andestech.com \
--cc=palmer@sifive.com \
--cc=vincentc@andestech.com \
--cc=zong@andestech.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).