You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/12/28 11:02:49 UTC
[incubator-nuttx] branch master updated: arch/risc-v: Remove unneeded kconfigs
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new d71cfc1 arch/risc-v: Remove unneeded kconfigs
d71cfc1 is described below
commit d71cfc178aa028bb81eb7345ef5e226f7217681d
Author: Huang Qi <hu...@xiaomi.com>
AuthorDate: Tue Dec 28 18:05:10 2021 +0800
arch/risc-v: Remove unneeded kconfigs
CONFIG_RV32IM_HW_MULDIV can be safely removed since this behavior is
controlled by M extension.
Signed-off-by: Huang Qi <hu...@xiaomi.com>
---
arch/risc-v/Kconfig | 4 ---
arch/risc-v/include/arch.h | 12 --------
arch/risc-v/src/common/Toolchain.defs | 5 ----
arch/risc-v/src/rv32im/Kconfig | 32 ----------------------
arch/risc-v/src/rv64gc/Kconfig | 29 --------------------
.../risc-v/c906/smartl-c906/configs/knsh/defconfig | 1 +
.../risc-v/c906/smartl-c906/configs/nsh/defconfig | 1 +
.../qemu-rv32/rv32-virt/configs/nsh/defconfig | 1 -
.../rv32m1/rv32m1-vega/configs/buttons/defconfig | 1 -
.../rv32m1/rv32m1-vega/configs/nsh-itcm/defconfig | 1 -
.../rv32m1/rv32m1-vega/configs/nsh/defconfig | 1 -
11 files changed, 2 insertions(+), 86 deletions(-)
diff --git a/arch/risc-v/Kconfig b/arch/risc-v/Kconfig
index 3778cf7..3e4195f 100644
--- a/arch/risc-v/Kconfig
+++ b/arch/risc-v/Kconfig
@@ -55,7 +55,6 @@ config ARCH_CHIP_ESP32C3
select ARCH_RV32
select ARCH_RV_ISA_M
select ARCH_RV_ISA_C
- select RV32IM_HW_MULDIV
select ARCH_VECNOTIRQ
select ARCH_HAVE_RESET
select LIBC_ARCH_ATOMIC
@@ -207,9 +206,6 @@ source "arch/risc-v/src/common/Kconfig"
if ARCH_RV32
source "arch/risc-v/src/rv32im/Kconfig"
endif
-if ARCH_RV64
-source "arch/risc-v/src/rv64gc/Kconfig"
-endif
if ARCH_CHIP_FE310
source "arch/risc-v/src/fe310/Kconfig"
endif
diff --git a/arch/risc-v/include/arch.h b/arch/risc-v/include/arch.h
index 05a09a3..b7e04d4 100644
--- a/arch/risc-v/include/arch.h
+++ b/arch/risc-v/include/arch.h
@@ -82,18 +82,6 @@ uint32_t up_gethartid(void);
* Public Function Prototypes
****************************************************************************/
-#ifdef CONFIG_RV32IM_HW_MULDIV
-uint32_t up_hard_mul(uint32_t a, uint32_t b);
-uint32_t up_hard_mulh(uint32_t a, uint32_t b);
-uint32_t up_hard_mulhsu(uint32_t a, uint32_t b);
-uint32_t up_hard_mulhu(uint32_t a, uint32_t b);
-uint32_t up_hard_div(uint32_t a, uint32_t b);
-uint32_t up_hard_rem(uint32_t a, uint32_t b);
-uint32_t up_hard_divu(uint32_t a, uint32_t b);
-uint32_t up_hard_remu(uint32_t a, uint32_t b);
-uint32_t time_hard_mul(uint32_t a, uint32_t b, uint32_t *t);
-#endif
-
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C"
diff --git a/arch/risc-v/src/common/Toolchain.defs b/arch/risc-v/src/common/Toolchain.defs
index 4946ef3..11f10b1 100644
--- a/arch/risc-v/src/common/Toolchain.defs
+++ b/arch/risc-v/src/common/Toolchain.defs
@@ -117,11 +117,6 @@ ifeq ($(CONFIG_RISCV_TOOLCHAIN),GNU_RVG)
ARCHCPUFLAGS += -mabi=$(ARCHABITYPE)
endif
- ifeq ($(CONFIG_RV32IM_HW_MULDIV),y)
- ARCHCPUFLAGS += -mdiv
- else
- ARCHCPUFLAGS += -mno-div
- endif
endif
# Default toolchain
diff --git a/arch/risc-v/src/rv32im/Kconfig b/arch/risc-v/src/rv32im/Kconfig
index 0233852..950f878 100644
--- a/arch/risc-v/src/rv32im/Kconfig
+++ b/arch/risc-v/src/rv32im/Kconfig
@@ -5,38 +5,6 @@
comment "RV32IM Configuration Options"
-choice
- prompt "Toolchain Selection"
- default RV32IM_TOOLCHAIN_GNU_RVGW if TOOLCHAIN_WINDOWS
- default RV32IM_TOOLCHAIN_GNU_RVGL if !TOOLCHAIN_WINDOWS
-
-config RV32IM_TOOLCHAIN_GNU_RVGL
- bool "Generic GNU RVG toolchain under Linux (or other POSIX environment)"
- select ARCH_TOOLCHAIN_GNU
- ---help---
- This option should work for any modern GNU toolchain (GCC 5.2 or newer)
- configured for riscv32-unknown-elf.
-
-config RV32IM_TOOLCHAIN_GNU_RVGW
- bool "Generic GNU RVG toolchain under Windows"
- depends on TOOLCHAIN_WINDOWS
- select CYGWIN_WINTOOL if WINDOWS_CYGWIN
- select ARCH_TOOLCHAIN_GNU
- ---help---
- This option should work for any modern GNU toolchain (GCC 5.2 or newer)
- configured for riscv32-unknown-elf.
-
-endchoice
-
-config RV32IM_HW_MULDIV
- bool "Supports Hardware MUL and DIV"
- default n
- ---help---
- Specifies if the architecture supports hardware multiply and
- hardware division instructions. Selecting this will cause the
- generated code to natively use mul / div instructions for any
- math operations.
-
config RV32IM_SYSTEM_CSRRS_SUPPORT
bool "Supports RV core feature identification via CSRRS opcode"
default n
diff --git a/arch/risc-v/src/rv64gc/Kconfig b/arch/risc-v/src/rv64gc/Kconfig
deleted file mode 100644
index 7781d2f..0000000
--- a/arch/risc-v/src/rv64gc/Kconfig
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see the file kconfig-language.txt in the NuttX tools repository.
-#
-
-comment "RV64GC Configuration Options"
-
-choice
- prompt "Toolchain Selection"
- default RV64GC_TOOLCHAIN_GNU_RVGW if TOOLCHAIN_WINDOWS
- default RV64GC_TOOLCHAIN_GNU_RVGL if !TOOLCHAIN_WINDOWS
-
-config RV64GC_TOOLCHAIN_GNU_RVGL
- bool "Generic GNU RVG toolchain under Linux (or other POSIX environment)"
- select ARCH_TOOLCHAIN_GNU
- ---help---
- This option should work for any modern GNU toolchain (GCC 5.2 or newer)
- configured for riscv64-unknown-elf.
-
-config RV64GC_TOOLCHAIN_GNU_RVGW
- bool "Generic GNU RVG toolchain under Windows"
- depends on TOOLCHAIN_WINDOWS
- select CYGWIN_WINTOOL if WINDOWS_CYGWIN
- select ARCH_TOOLCHAIN_GNU
- ---help---
- This option should work for any modern GNU toolchain (GCC 5.2 or newer)
- configured for riscv64-unknown-elf.
-
-endchoice
diff --git a/boards/risc-v/c906/smartl-c906/configs/knsh/defconfig b/boards/risc-v/c906/smartl-c906/configs/knsh/defconfig
index 839186b..16810fe 100644
--- a/boards/risc-v/c906/smartl-c906/configs/knsh/defconfig
+++ b/boards/risc-v/c906/smartl-c906/configs/knsh/defconfig
@@ -62,4 +62,5 @@ CONFIG_SYS_RESERVED=9
CONFIG_TASK_NAME_SIZE=20
CONFIG_TESTING_GETPRIME=y
CONFIG_TESTING_OSTEST=y
+CONFIG_TESTING_OSTEST_FPUSIZE=264
CONFIG_UART0_SERIAL_CONSOLE=y
diff --git a/boards/risc-v/c906/smartl-c906/configs/nsh/defconfig b/boards/risc-v/c906/smartl-c906/configs/nsh/defconfig
index 1933352..8cbacfd 100644
--- a/boards/risc-v/c906/smartl-c906/configs/nsh/defconfig
+++ b/boards/risc-v/c906/smartl-c906/configs/nsh/defconfig
@@ -56,4 +56,5 @@ CONFIG_SYSTEM_NSH=y
CONFIG_TASK_NAME_SIZE=20
CONFIG_TESTING_GETPRIME=y
CONFIG_TESTING_OSTEST=y
+CONFIG_TESTING_OSTEST_FPUSIZE=264
CONFIG_UART0_SERIAL_CONSOLE=y
diff --git a/boards/risc-v/qemu-rv32/rv32-virt/configs/nsh/defconfig b/boards/risc-v/qemu-rv32/rv32-virt/configs/nsh/defconfig
index d4cc560..e5ab68b 100644
--- a/boards/risc-v/qemu-rv32/rv32-virt/configs/nsh/defconfig
+++ b/boards/risc-v/qemu-rv32/rv32-virt/configs/nsh/defconfig
@@ -56,7 +56,6 @@ CONFIG_PREALLOC_TIMERS=0
CONFIG_RAM_SIZE=33554432
CONFIG_RAM_START=0x80000000
CONFIG_RR_INTERVAL=200
-CONFIG_RV32IM_HW_MULDIV=y
CONFIG_SCHED_WAITPID=y
CONFIG_SERIAL_UART_ARCH_MMIO=y
CONFIG_STACK_COLORATION=y
diff --git a/boards/risc-v/rv32m1/rv32m1-vega/configs/buttons/defconfig b/boards/risc-v/rv32m1/rv32m1-vega/configs/buttons/defconfig
index be7ed1d..cafd83f 100644
--- a/boards/risc-v/rv32m1/rv32m1-vega/configs/buttons/defconfig
+++ b/boards/risc-v/rv32m1/rv32m1-vega/configs/buttons/defconfig
@@ -56,7 +56,6 @@ CONFIG_RAM_SIZE=196608
CONFIG_RAM_START=0x20000000
CONFIG_RAW_BINARY=y
CONFIG_RR_INTERVAL=200
-CONFIG_RV32IM_HW_MULDIV=y
CONFIG_RV32M1_LPUART0=y
CONFIG_SCHED_WAITPID=y
CONFIG_STACK_COLORATION=y
diff --git a/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh-itcm/defconfig b/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh-itcm/defconfig
index cde3836..4ca6eec 100644
--- a/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh-itcm/defconfig
+++ b/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh-itcm/defconfig
@@ -44,7 +44,6 @@ CONFIG_RAM_SIZE=196608
CONFIG_RAM_START=0x20000000
CONFIG_RAW_BINARY=y
CONFIG_RR_INTERVAL=200
-CONFIG_RV32IM_HW_MULDIV=y
CONFIG_RV32M1_ITCM=y
CONFIG_RV32M1_LPUART0=y
CONFIG_SCHED_WAITPID=y
diff --git a/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh/defconfig b/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh/defconfig
index 92fc4fd..4466de1 100644
--- a/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh/defconfig
+++ b/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh/defconfig
@@ -44,7 +44,6 @@ CONFIG_RAM_SIZE=196608
CONFIG_RAM_START=0x20000000
CONFIG_RAW_BINARY=y
CONFIG_RR_INTERVAL=200
-CONFIG_RV32IM_HW_MULDIV=y
CONFIG_RV32M1_LPUART0=y
CONFIG_SCHED_WAITPID=y
CONFIG_STACK_COLORATION=y