kernel_optimize_test/arch/riscv
Alan Kao 9411ec60c2
Auto-detect whether a FPU exists
We expect that a kernel with CONFIG_FPU=y can still support no-FPU
machines. To do so, the kernel should first examine the existence of a
FPU, then do nothing if a FPU does exist; otherwise, it should
disable/bypass all FPU-related functions.

In this patch, a new global variable, has_fpu, is created and determined
when parsing the hardware capability from device tree during booting.
This variable is used in those FPU-related functions.

Signed-off-by: Alan Kao <alankao@andestech.com>
Cc: Greentime Hu <greentime@andestech.com>
Cc: Vincent Chen <vincentc@andestech.com>
Cc: Zong Li <zong@andestech.com>
Cc: Nick Hu <nickhu@andestech.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2018-10-22 17:02:23 -07:00
..
configs irqchip: add a SiFive PLIC driver 2018-08-13 08:31:32 -07:00
include Auto-detect whether a FPU exists 2018-10-22 17:02:23 -07:00
kernel Auto-detect whether a FPU exists 2018-10-22 17:02:23 -07:00
lib RISC-V: implement __lshrti3. 2018-08-13 08:31:30 -07:00
mm mm: convert return type of handle_mm_fault() caller to vm_fault_t 2018-08-17 16:20:28 -07:00
Kconfig Allow to disable FPU support 2018-10-22 17:02:23 -07:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile Allow to disable FPU support 2018-10-22 17:02:23 -07:00