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 2022/04/18 14:22:21 UTC

[incubator-nuttx] branch master updated (3b97e37b52 -> 29005bd79f)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


    from 3b97e37b52 tools/cibuild.sh: Download risc-v toolchain with --no-check-certificate
     new 5bdfae66ce arch/arm: export arm_saveusercontext()
     new dc2e4b7024 boards/ostest: remove board ostest implement
     new 29005bd79f board/arch_fpu*: move arch_[get|cmp]fpu to common arch

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 arch/arm/include/armv7-m/irq_cmnvector.h           |  2 +
 arch/arm/include/armv7-m/irq_lazyfpu.h             |  2 +
 arch/arm/include/armv8-m/irq_cmnvector.h           |  2 +
 arch/arm/include/armv8-m/irq_lazyfpu.h             |  2 +
 arch/arm/include/syscall.h                         |  2 +-
 arch/arm/src/a1x/Make.defs                         |  1 +
 arch/arm/src/am335x/Make.defs                      |  1 +
 arch/arm/src/arm/arm_saveusercontext.S             | 12 +--
 arch/arm/src/armv6-m/arm_saveusercontext.S         | 12 +--
 arch/arm/src/armv6-m/arm_svcall.c                  |  2 +-
 arch/arm/src/armv7-a/arm_saveusercontext.S         | 12 +--
 arch/arm/src/armv7-m/arm_svcall.c                  |  2 +-
 arch/arm/src/armv7-m/gnu/arm_saveusercontext.S     | 12 +--
 arch/arm/src/armv7-m/iar/arm_saveusercontext.S     | 10 +--
 arch/arm/src/armv7-r/arm_saveusercontext.S         | 12 +--
 arch/arm/src/armv8-m/arm_saveusercontext.S         | 12 +--
 arch/arm/src/armv8-m/arm_svcall.c                  |  2 +-
 arch/arm/src/common/arm_assert.c                   |  2 +-
 .../arm/src/common/arm_fpucmp.c                    | 24 +++---
 arch/arm/src/common/arm_internal.h                 |  1 -
 arch/arm/src/cxd56xx/Make.defs                     |  1 +
 arch/arm/src/efm32/Make.defs                       |  1 +
 arch/arm/src/eoss3/Make.defs                       |  1 +
 arch/arm/src/imx6/Make.defs                        |  1 +
 arch/arm/src/imxrt/Make.defs                       |  1 +
 arch/arm/src/kinetis/Make.defs                     |  1 +
 arch/arm/src/lpc17xx_40xx/Make.defs                |  1 +
 arch/arm/src/lpc43xx/Make.defs                     |  1 +
 arch/arm/src/lpc54xx/Make.defs                     |  1 +
 arch/arm/src/max326xx/Make.defs                    |  1 +
 arch/arm/src/nrf52/Make.defs                       |  1 +
 arch/arm/src/s32k1xx/Make.defs                     |  1 +
 arch/arm/src/sam34/Make.defs                       |  1 +
 arch/arm/src/sama5/Make.defs                       |  1 +
 arch/arm/src/samd5e5/Make.defs                     |  1 +
 arch/arm/src/samv7/Make.defs                       |  1 +
 arch/arm/src/stm32/Make.defs                       |  1 +
 arch/arm/src/stm32f7/Make.defs                     |  1 +
 arch/arm/src/stm32h7/Make.defs                     |  1 +
 arch/arm/src/stm32l4/Make.defs                     |  1 +
 arch/arm/src/stm32l5/Make.defs                     |  1 +
 arch/arm/src/stm32u5/Make.defs                     |  1 +
 arch/arm/src/tiva/Make.defs                        |  1 +
 arch/arm/src/tms570/Make.defs                      |  1 +
 arch/arm/src/xmc4/Make.defs                        |  1 +
 arch/ceva/include/syscall.h                        |  2 +-
 arch/ceva/src/common/up_internal.h                 |  1 -
 arch/ceva/src/common/up_saveusercontext.c          |  4 +-
 arch/ceva/src/common/up_svcall.c                   |  2 +-
 arch/hc/src/common/up_internal.h                   |  1 -
 arch/or1k/src/common/up_internal.h                 |  1 -
 arch/renesas/src/common/up_internal.h              |  1 -
 arch/renesas/src/m16c/m16c_vectors.S               |  2 +-
 arch/renesas/src/rx65n/rx65n_vector.S              |  2 +-
 arch/risc-v/src/bl602/Make.defs                    |  2 +
 arch/risc-v/src/c906/Make.defs                     |  2 +
 arch/risc-v/src/common/riscv_assert.c              |  2 +-
 .../src/common/riscv_fpucmp.c}                     | 27 +++---
 arch/risc-v/src/common/riscv_internal.h            | 12 ---
 .../src/common/riscv_saveusercontext.c}            | 15 ++--
 arch/risc-v/src/common/riscv_swint.c               |  2 +-
 arch/risc-v/src/esp32c3/Make.defs                  |  1 +
 arch/risc-v/src/fe310/Make.defs                    |  1 +
 arch/risc-v/src/k210/Make.defs                     |  2 +-
 arch/risc-v/src/litex/Make.defs                    |  1 +
 arch/risc-v/src/mpfs/Make.defs                     |  2 +
 arch/risc-v/src/qemu-rv/Make.defs                  |  2 +
 arch/risc-v/src/rv32m1/Make.defs                   |  1 +
 arch/x86/src/common/up_internal.h                  |  1 -
 arch/x86/src/qemu/qemu_saveusercontext.S           |  2 +-
 arch/x86_64/src/common/up_internal.h               |  1 -
 arch/x86_64/src/intel64/intel64_saveusercontext.S  |  2 +-
 .../arm/cxd56xx/spresense/configs/rndis/defconfig  |  1 -
 .../cxd56xx/spresense/configs/rndis_smp/defconfig  |  1 -
 boards/arm/cxd56xx/spresense/configs/smp/defconfig |  1 -
 .../arm/cxd56xx/spresense/configs/wifi/defconfig   |  1 -
 .../cxd56xx/spresense/configs/wifi_smp/defconfig   |  1 -
 boards/arm/cxd56xx/spresense/src/Make.defs         |  4 -
 boards/arm/cxd56xx/spresense/src/cxd56_ostest.c    | 97 ---------------------
 boards/arm/lpc43xx/bambino-200e/src/Makefile       |  4 -
 boards/arm/lpc43xx/bambino-200e/src/lpc43_ostest.c | 94 ---------------------
 boards/arm/lpc43xx/lpc4330-xplorer/src/Makefile    |  4 -
 .../arm/lpc43xx/lpc4330-xplorer/src/lpc43_ostest.c | 98 ----------------------
 boards/arm/lpc43xx/lpc4357-evb/src/Makefile        |  4 -
 boards/arm/lpc43xx/lpc4357-evb/src/lpc43_ostest.c  | 98 ----------------------
 boards/arm/lpc43xx/lpc4370-link2/src/Makefile      |  4 -
 .../arm/lpc43xx/lpc4370-link2/src/lpc43_ostest.c   | 98 ----------------------
 boards/arm/sama5/giant-board/src/Makefile          |  4 -
 boards/arm/sama5/giant-board/src/sam_ostest.c      | 94 ---------------------
 boards/arm/sama5/sama5d2-xult/src/Makefile         |  4 -
 boards/arm/sama5/sama5d2-xult/src/sam_ostest.c     | 98 ----------------------
 boards/arm/sama5/sama5d3-xplained/src/Makefile     |  4 -
 boards/arm/sama5/sama5d3-xplained/src/sam_ostest.c | 98 ----------------------
 boards/arm/sama5/sama5d3x-ek/src/Makefile          |  4 -
 boards/arm/sama5/sama5d3x-ek/src/sam_ostest.c      | 98 ----------------------
 boards/arm/sama5/sama5d4-ek/src/Makefile           |  4 -
 boards/arm/sama5/sama5d4-ek/src/sam_ostest.c       | 98 ----------------------
 boards/arm/stm32/olimex-stm32-e407/src/Make.defs   |  4 -
 boards/arm/stm32/olimex-stm32-h407/src/Make.defs   |  4 -
 boards/arm/stm32/omnibusf4/src/Make.defs           |  4 -
 boards/arm/stm32/omnibusf4/src/stm32_ostest.c      | 96 ---------------------
 boards/arm/stm32/stm3240g-eval/src/Make.defs       |  4 -
 boards/arm/stm32/stm3240g-eval/src/stm32_ostest.c  | 98 ----------------------
 boards/arm/stm32/stm32f429i-disco/src/Make.defs    |  4 -
 .../arm/stm32/stm32f429i-disco/src/stm32_ostest.c  | 98 ----------------------
 .../stm32/stm32f4discovery/configs/wifi/defconfig  |  1 -
 boards/arm/stm32/stm32f4discovery/src/Make.defs    |  4 -
 .../arm/stm32/stm32f4discovery/src/stm32_ostest.c  | 94 ---------------------
 boards/arm/stm32f7/stm32f746g-disco/src/Makefile   |  4 -
 .../stm32f7/stm32f746g-disco/src/stm32_ostest.c    | 98 ----------------------
 boards/arm/stm32f7/stm32f769i-disco/src/Makefile   |  4 -
 .../stm32f7/stm32f769i-disco/src/stm32_ostest.c    | 98 ----------------------
 .../stm32h7/nucleo-h743zi2/configs/jumbo/defconfig |  1 -
 boards/arm/stm32h7/nucleo-h743zi2/src/Makefile     |  4 -
 .../arm/stm32h7/nucleo-h743zi2/src/stm32_ostest.c  | 94 ---------------------
 boards/arm/xmc4/xmc4500-relax/src/Makefile         |  4 -
 boards/arm/xmc4/xmc4500-relax/src/xmc4_ostest.c    | 94 ---------------------
 boards/arm/xmc4/xmc4700-relax/src/Makefile         |  4 -
 boards/arm/xmc4/xmc4700-relax/src/xmc4_ostest.c    | 94 ---------------------
 boards/risc-v/bl602/bl602evb/configs/elf/defconfig |  1 -
 boards/risc-v/bl602/bl602evb/configs/fpu/defconfig |  1 -
 .../risc-v/bl602/bl602evb/configs/wifi/defconfig   |  1 -
 boards/risc-v/bl602/bl602evb/src/Makefile          |  4 -
 boards/risc-v/bl602/bl602evb/src/bl602_ostest.c    | 94 ---------------------
 .../risc-v/c906/smartl-c906/configs/elf/defconfig  |  1 -
 .../risc-v/c906/smartl-c906/configs/fpu/defconfig  |  1 -
 .../risc-v/c906/smartl-c906/configs/knsh/defconfig |  1 -
 .../c906/smartl-c906/configs/module/defconfig      |  1 -
 .../risc-v/c906/smartl-c906/configs/nsh/defconfig  |  1 -
 .../c906/smartl-c906/configs/sotest/defconfig      |  1 -
 boards/risc-v/c906/smartl-c906/src/Makefile        |  4 -
 boards/risc-v/c906/smartl-c906/src/c906_ostest.c   | 94 ---------------------
 boards/risc-v/mpfs/common/src/Make.defs            |  4 -
 boards/risc-v/mpfs/common/src/mpfs_ostest.c        | 94 ---------------------
 boards/risc-v/mpfs/icicle/configs/knsh/defconfig   |  1 -
 .../risc-v/qemu-rv/rv-virt/configs/nsh/defconfig   |  1 -
 .../risc-v/qemu-rv/rv-virt/configs/nsh64/defconfig |  1 -
 .../risc-v/qemu-rv/rv-virt/configs/smp/defconfig   |  1 -
 .../risc-v/qemu-rv/rv-virt/configs/smp64/defconfig |  1 -
 boards/risc-v/qemu-rv/rv-virt/src/Makefile         |  2 +-
 boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_ostest.c | 94 ---------------------
 include/nuttx/arch.h                               | 24 ++++++
 142 files changed, 166 insertions(+), 2434 deletions(-)
 copy boards/arm/cxd56xx/common/src/cxd56_boot.c => arch/arm/src/common/arm_fpucmp.c (79%)
 copy arch/{sim/src/sim/up_blockdevice.c => risc-v/src/common/riscv_fpucmp.c} (78%)
 copy arch/{arm/src/common/arm_switchcontext.c => risc-v/src/common/riscv_saveusercontext.c} (82%)
 delete mode 100644 boards/arm/cxd56xx/spresense/src/cxd56_ostest.c
 delete mode 100644 boards/arm/lpc43xx/bambino-200e/src/lpc43_ostest.c
 delete mode 100644 boards/arm/lpc43xx/lpc4330-xplorer/src/lpc43_ostest.c
 delete mode 100644 boards/arm/lpc43xx/lpc4357-evb/src/lpc43_ostest.c
 delete mode 100644 boards/arm/lpc43xx/lpc4370-link2/src/lpc43_ostest.c
 delete mode 100644 boards/arm/sama5/giant-board/src/sam_ostest.c
 delete mode 100644 boards/arm/sama5/sama5d2-xult/src/sam_ostest.c
 delete mode 100644 boards/arm/sama5/sama5d3-xplained/src/sam_ostest.c
 delete mode 100644 boards/arm/sama5/sama5d3x-ek/src/sam_ostest.c
 delete mode 100644 boards/arm/sama5/sama5d4-ek/src/sam_ostest.c
 delete mode 100644 boards/arm/stm32/omnibusf4/src/stm32_ostest.c
 delete mode 100644 boards/arm/stm32/stm3240g-eval/src/stm32_ostest.c
 delete mode 100644 boards/arm/stm32/stm32f429i-disco/src/stm32_ostest.c
 delete mode 100644 boards/arm/stm32/stm32f4discovery/src/stm32_ostest.c
 delete mode 100644 boards/arm/stm32f7/stm32f746g-disco/src/stm32_ostest.c
 delete mode 100644 boards/arm/stm32f7/stm32f769i-disco/src/stm32_ostest.c
 delete mode 100644 boards/arm/stm32h7/nucleo-h743zi2/src/stm32_ostest.c
 delete mode 100644 boards/arm/xmc4/xmc4500-relax/src/xmc4_ostest.c
 delete mode 100644 boards/arm/xmc4/xmc4700-relax/src/xmc4_ostest.c
 delete mode 100644 boards/risc-v/bl602/bl602evb/src/bl602_ostest.c
 delete mode 100644 boards/risc-v/c906/smartl-c906/src/c906_ostest.c
 delete mode 100755 boards/risc-v/mpfs/common/src/mpfs_ostest.c
 delete mode 100644 boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_ostest.c


[incubator-nuttx] 01/03: arch/arm: export arm_saveusercontext()

Posted by xi...@apache.org.
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

commit 5bdfae66ce04b9ac9cab3c85926d8fc346819bf7
Author: chao.an <an...@xiaomi.com>
AuthorDate: Fri Apr 15 22:21:38 2022 +0800

    arch/arm: export arm_saveusercontext()
    
    rename arm_saveusercontext() -> up_arm_saveusercontext()
    
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 arch/arm/include/syscall.h                         |  2 +-
 arch/arm/src/arm/arm_saveusercontext.S             | 12 +++++-----
 arch/arm/src/armv6-m/arm_saveusercontext.S         | 12 +++++-----
 arch/arm/src/armv6-m/arm_svcall.c                  |  2 +-
 arch/arm/src/armv7-a/arm_saveusercontext.S         | 12 +++++-----
 arch/arm/src/armv7-m/arm_svcall.c                  |  2 +-
 arch/arm/src/armv7-m/gnu/arm_saveusercontext.S     | 12 +++++-----
 arch/arm/src/armv7-m/iar/arm_saveusercontext.S     | 10 ++++----
 arch/arm/src/armv7-r/arm_saveusercontext.S         | 12 +++++-----
 arch/arm/src/armv8-m/arm_saveusercontext.S         | 12 +++++-----
 arch/arm/src/armv8-m/arm_svcall.c                  |  2 +-
 arch/arm/src/common/arm_assert.c                   |  2 +-
 arch/arm/src/common/arm_internal.h                 |  1 -
 arch/ceva/include/syscall.h                        |  2 +-
 arch/ceva/src/common/up_internal.h                 |  1 -
 arch/ceva/src/common/up_saveusercontext.c          |  4 ++--
 arch/ceva/src/common/up_svcall.c                   |  2 +-
 arch/hc/src/common/up_internal.h                   |  1 -
 arch/or1k/src/common/up_internal.h                 |  1 -
 arch/renesas/src/common/up_internal.h              |  1 -
 arch/renesas/src/m16c/m16c_vectors.S               |  2 +-
 arch/renesas/src/rx65n/rx65n_vector.S              |  2 +-
 arch/risc-v/src/bl602/Make.defs                    |  1 +
 arch/risc-v/src/c906/Make.defs                     |  1 +
 arch/risc-v/src/common/riscv_assert.c              |  2 +-
 arch/risc-v/src/common/riscv_internal.h            | 12 ----------
 .../src/common/riscv_saveusercontext.c}            | 28 ++++------------------
 arch/risc-v/src/common/riscv_swint.c               |  2 +-
 arch/risc-v/src/esp32c3/Make.defs                  |  1 +
 arch/risc-v/src/fe310/Make.defs                    |  1 +
 arch/risc-v/src/k210/Make.defs                     |  2 +-
 arch/risc-v/src/litex/Make.defs                    |  1 +
 arch/risc-v/src/mpfs/Make.defs                     |  1 +
 arch/risc-v/src/qemu-rv/Make.defs                  |  1 +
 arch/risc-v/src/rv32m1/Make.defs                   |  1 +
 arch/x86/src/common/up_internal.h                  |  1 -
 arch/x86/src/qemu/qemu_saveusercontext.S           |  2 +-
 arch/x86_64/src/common/up_internal.h               |  1 -
 arch/x86_64/src/intel64/intel64_saveusercontext.S  |  2 +-
 boards/arm/cxd56xx/spresense/src/cxd56_ostest.c    |  2 +-
 boards/arm/lpc43xx/bambino-200e/src/lpc43_ostest.c |  2 +-
 .../arm/lpc43xx/lpc4330-xplorer/src/lpc43_ostest.c |  2 +-
 boards/arm/lpc43xx/lpc4357-evb/src/lpc43_ostest.c  |  2 +-
 .../arm/lpc43xx/lpc4370-link2/src/lpc43_ostest.c   |  2 +-
 boards/arm/sama5/giant-board/src/sam_ostest.c      |  2 +-
 boards/arm/sama5/sama5d2-xult/src/sam_ostest.c     |  2 +-
 boards/arm/sama5/sama5d3-xplained/src/sam_ostest.c |  2 +-
 boards/arm/sama5/sama5d3x-ek/src/sam_ostest.c      |  2 +-
 boards/arm/sama5/sama5d4-ek/src/sam_ostest.c       |  2 +-
 boards/arm/stm32/omnibusf4/src/stm32_ostest.c      |  2 +-
 boards/arm/stm32/stm3240g-eval/src/stm32_ostest.c  |  2 +-
 .../arm/stm32/stm32f429i-disco/src/stm32_ostest.c  |  2 +-
 .../arm/stm32/stm32f4discovery/src/stm32_ostest.c  |  2 +-
 .../stm32f7/stm32f746g-disco/src/stm32_ostest.c    |  2 +-
 .../stm32f7/stm32f769i-disco/src/stm32_ostest.c    |  2 +-
 .../arm/stm32h7/nucleo-h743zi2/src/stm32_ostest.c  |  2 +-
 boards/arm/xmc4/xmc4500-relax/src/xmc4_ostest.c    |  2 +-
 boards/arm/xmc4/xmc4700-relax/src/xmc4_ostest.c    |  2 +-
 boards/risc-v/bl602/bl602evb/src/bl602_ostest.c    |  2 +-
 boards/risc-v/c906/smartl-c906/src/c906_ostest.c   |  2 +-
 boards/risc-v/mpfs/common/src/mpfs_ostest.c        |  2 +-
 boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_ostest.c |  2 +-
 include/nuttx/arch.h                               | 10 ++++++++
 63 files changed, 103 insertions(+), 122 deletions(-)

diff --git a/arch/arm/include/syscall.h b/arch/arm/include/syscall.h
index 1b1289a0a9..ec9a5f0e8d 100644
--- a/arch/arm/include/syscall.h
+++ b/arch/arm/include/syscall.h
@@ -66,7 +66,7 @@
 
 /* SYS call 0:
  *
- * int arm_saveusercontext(uint32_t *saveregs);
+ * int up_saveusercontext(void *saveregs);
  */
 
 #define SYS_save_context          (0)
diff --git a/arch/arm/src/arm/arm_saveusercontext.S b/arch/arm/src/arm/arm_saveusercontext.S
index fe16a3a4b6..c50cf7d439 100644
--- a/arch/arm/src/arm/arm_saveusercontext.S
+++ b/arch/arm/src/arm/arm_saveusercontext.S
@@ -44,12 +44,12 @@
  ****************************************************************************/
 
 /****************************************************************************
- * Name: arm_saveusercontext
+ * Name: up_saveusercontext
  *
  * Description:
  *   Save the current thread context.  Full prototype is:
  *
- *   int  arm_saveusercontext(uint32_t *saveregs);
+ *   int  up_saveusercontext(void *saveregs);
  *
  * Returned Value:
  *   0: Normal return
@@ -57,9 +57,9 @@
  *
  ****************************************************************************/
 
-	.globl	arm_saveusercontext
-	.type	arm_saveusercontext, function
-arm_saveusercontext:
+	.globl	up_saveusercontext
+	.type	up_saveusercontext, function
+up_saveusercontext:
 
 	/* On entry, a1 (r0) holds address of struct xcptcontext */
 
@@ -96,5 +96,5 @@ arm_saveusercontext:
 
 	mov	r0, #0		/* Return value == 0 */
 	bx	lr		/* Return */
-	.size	arm_saveusercontext, .-arm_saveusercontext
+	.size	up_saveusercontext, .-up_saveusercontext
 	.end
diff --git a/arch/arm/src/armv6-m/arm_saveusercontext.S b/arch/arm/src/armv6-m/arm_saveusercontext.S
index 284a3f7ecd..f1dbcb067b 100644
--- a/arch/arm/src/armv6-m/arm_saveusercontext.S
+++ b/arch/arm/src/armv6-m/arm_saveusercontext.S
@@ -47,12 +47,12 @@
  ****************************************************************************/
 
 /****************************************************************************
- * Name: arm_saveusercontext
+ * Name: up_saveusercontext
  *
  * Description:
  *   Save the current thread context.  Full prototype is:
  *
- *   int  arm_saveusercontext(uint32_t *saveregs);
+ *   int  up_saveusercontext(void *saveregs);
  *
  * Returned Value:
  *   0: Normal return
@@ -64,9 +64,9 @@
 	.align	2
 	.code	16
 	.thumb_func
-	.globl	arm_saveusercontext
-	.type	arm_saveusercontext, function
-arm_saveusercontext:
+	.globl	up_saveusercontext
+	.type	up_saveusercontext, function
+up_saveusercontext:
 
 	/* Perform the System call with R0=0 and R1=regs */
 
@@ -85,5 +85,5 @@ arm_saveusercontext:
 	str		r3, [r2, #0]		/* Save return value */
 	bx		lr			/* "normal" return with r0=0 or
 						 * context switch with r0=1 */
-	.size	arm_saveusercontext, .-arm_saveusercontext
+	.size	up_saveusercontext, .-up_saveusercontext
 	.end
diff --git a/arch/arm/src/armv6-m/arm_svcall.c b/arch/arm/src/armv6-m/arm_svcall.c
index 00b3ba486a..353db23ac1 100644
--- a/arch/arm/src/armv6-m/arm_svcall.c
+++ b/arch/arm/src/armv6-m/arm_svcall.c
@@ -154,7 +154,7 @@ int arm_svcall(int irq, FAR void *context, FAR void *arg)
     {
       /* R0=SYS_save_context:  This is a save context command:
        *
-       *   int arm_saveusercontext(uint32_t *saveregs);
+       *   int up_saveusercontext(void *saveregs);
        *
        * At this point, the following values are saved in context:
        *
diff --git a/arch/arm/src/armv7-a/arm_saveusercontext.S b/arch/arm/src/armv7-a/arm_saveusercontext.S
index 174d3bfc05..71d42cb07e 100644
--- a/arch/arm/src/armv7-a/arm_saveusercontext.S
+++ b/arch/arm/src/armv7-a/arm_saveusercontext.S
@@ -44,12 +44,12 @@
  ****************************************************************************/
 
 /****************************************************************************
- * Name: arm_saveusercontext
+ * Name: up_saveusercontext
  *
  * Description:
  *   Save the current thread context.  Full prototype is:
  *
- *   int  arm_saveusercontext(uint32_t *saveregs);
+ *   int  up_saveusercontext(void *saveregs);
  *
  * Returned Value:
  *   0: Normal return
@@ -57,9 +57,9 @@
  *
  ****************************************************************************/
 
-	.globl	arm_saveusercontext
-	.type	arm_saveusercontext, function
-arm_saveusercontext:
+	.globl	up_saveusercontext
+	.type	up_saveusercontext, function
+up_saveusercontext:
 
 	/* On entry, a1 (r0) holds address of struct xcptcontext */
 
@@ -134,5 +134,5 @@ arm_saveusercontext:
 	mov		r0, #1			/* Return value == 1 */
 	bx		lr			/* Return */
 
-	.size	arm_saveusercontext, .-arm_saveusercontext
+	.size	up_saveusercontext, .-up_saveusercontext
 	.end
diff --git a/arch/arm/src/armv7-m/arm_svcall.c b/arch/arm/src/armv7-m/arm_svcall.c
index 1021d128e0..805fd92ef7 100644
--- a/arch/arm/src/armv7-m/arm_svcall.c
+++ b/arch/arm/src/armv7-m/arm_svcall.c
@@ -161,7 +161,7 @@ int arm_svcall(int irq, FAR void *context, FAR void *arg)
     {
       /* R0=SYS_save_context:  This is a save context command:
        *
-       *   int arm_saveusercontext(uint32_t *saveregs);
+       *   int up_saveusercontext(void *saveregs);
        *
        * At this point, the following values are saved in context:
        *
diff --git a/arch/arm/src/armv7-m/gnu/arm_saveusercontext.S b/arch/arm/src/armv7-m/gnu/arm_saveusercontext.S
index c5b12a3461..7fabb33838 100644
--- a/arch/arm/src/armv7-m/gnu/arm_saveusercontext.S
+++ b/arch/arm/src/armv7-m/gnu/arm_saveusercontext.S
@@ -49,12 +49,12 @@
  ****************************************************************************/
 
 /****************************************************************************
- * Name: arm_saveusercontext
+ * Name: up_saveusercontext
  *
  * Description:
  *   Save the current thread context.  Full prototype is:
  *
- *   int  arm_saveusercontext(uint32_t *saveregs);
+ *   int  up_saveusercontext(void *saveregs);
  *
  * Returned Value:
  *   0: Normal return
@@ -64,9 +64,9 @@
 
 	.text
 	.thumb_func
-	.globl	arm_saveusercontext
-	.type	arm_saveusercontext, function
-arm_saveusercontext:
+	.globl	up_saveusercontext
+	.type	up_saveusercontext, function
+up_saveusercontext:
 
 	/* Perform the System call with R0=0 and R1=regs */
 
@@ -84,5 +84,5 @@ arm_saveusercontext:
 	str		r3, [r2, #0]
 	bx		lr			/* "normal" return with r0=0 or
 						 * context switch with r0=1 */
-	.size	arm_saveusercontext, .-arm_saveusercontext
+	.size	up_saveusercontext, .-up_saveusercontext
 	.end
diff --git a/arch/arm/src/armv7-m/iar/arm_saveusercontext.S b/arch/arm/src/armv7-m/iar/arm_saveusercontext.S
index 1806865d6a..b864da4eff 100644
--- a/arch/arm/src/armv7-m/iar/arm_saveusercontext.S
+++ b/arch/arm/src/armv7-m/iar/arm_saveusercontext.S
@@ -28,7 +28,7 @@
 
 #include "nvic.h"
 
-	MODULE arm_saveusercontext
+	MODULE up_saveusercontext
 	SECTION .text:CODE:NOROOT(2)
 
 /****************************************************************************
@@ -39,7 +39,7 @@
  * Public Symbols
  ****************************************************************************/
 
-	PUBLIC arm_saveusercontext
+	PUBLIC up_saveusercontext
 
 /****************************************************************************
  * Macros
@@ -50,12 +50,12 @@
  ****************************************************************************/
 
 /****************************************************************************
- * Name: arm_saveusercontext
+ * Name: up_saveusercontext
  *
  * Description:
  *   Save the current thread context.  Full prototype is:
  *
- *   int  arm_saveusercontext(uint32_t *saveregs);
+ *   int  up_saveusercontext(void *saveregs);
  *
  * Returned Value:
  *   0: Normal return
@@ -65,7 +65,7 @@
 
 	THUMB
 
-arm_saveusercontext:
+up_saveusercontext:
 
 	/* Perform the System call with R0=0 and R1=regs */
 
diff --git a/arch/arm/src/armv7-r/arm_saveusercontext.S b/arch/arm/src/armv7-r/arm_saveusercontext.S
index e1a4686162..edbebfc75e 100644
--- a/arch/arm/src/armv7-r/arm_saveusercontext.S
+++ b/arch/arm/src/armv7-r/arm_saveusercontext.S
@@ -44,12 +44,12 @@
  ****************************************************************************/
 
 /****************************************************************************
- * Name: arm_saveusercontext
+ * Name: up_saveusercontext
  *
  * Description:
  *   Save the current thread context.  Full prototype is:
  *
- *   int  arm_saveusercontext(uint32_t *saveregs);
+ *   int  up_saveusercontext(void *saveregs);
  *
  * Returned Value:
  *   0: Normal return
@@ -57,9 +57,9 @@
  *
  ****************************************************************************/
 
-	.globl	arm_saveusercontext
-	.type	arm_saveusercontext, function
-arm_saveusercontext:
+	.globl	up_saveusercontext
+	.type	up_saveusercontext, function
+up_saveusercontext:
 
 	/* On entry, a1 (r0) holds address of struct xcptcontext */
 
@@ -125,5 +125,5 @@ arm_saveusercontext:
 
 	mov		r0, #0			/* Return value == 0 */
 	bx		lr			/* Return */
-	.size	arm_saveusercontext, .-arm_saveusercontext
+	.size	up_saveusercontext, .-up_saveusercontext
 	.end
diff --git a/arch/arm/src/armv8-m/arm_saveusercontext.S b/arch/arm/src/armv8-m/arm_saveusercontext.S
index 0de40f3e81..604b4a4a74 100644
--- a/arch/arm/src/armv8-m/arm_saveusercontext.S
+++ b/arch/arm/src/armv8-m/arm_saveusercontext.S
@@ -49,12 +49,12 @@
  ****************************************************************************/
 
 /****************************************************************************
- * Name: arm_saveusercontext
+ * Name: up_saveusercontext
  *
  * Description:
  *   Save the current thread context.  Full prototype is:
  *
- *   int  arm_saveusercontext(uint32_t *saveregs);
+ *   int  up_saveusercontext(void *saveregs);
  *
  * Returned Value:
  *   0: Normal return
@@ -64,9 +64,9 @@
 
 	.text
 	.thumb_func
-	.globl	arm_saveusercontext
-	.type	arm_saveusercontext, function
-arm_saveusercontext:
+	.globl	up_saveusercontext
+	.type	up_saveusercontext, function
+up_saveusercontext:
 
 	/* Perform the System call with R0=0 and R1=regs */
 
@@ -84,5 +84,5 @@ arm_saveusercontext:
 	str		r3, [r2, #0]
 	bx		lr			/* "normal" return with r0=0 or
 						 * context switch with r0=1 */
-	.size	arm_saveusercontext, .-arm_saveusercontext
+	.size	up_saveusercontext, .-up_saveusercontext
 	.end
diff --git a/arch/arm/src/armv8-m/arm_svcall.c b/arch/arm/src/armv8-m/arm_svcall.c
index 74c40cd644..6c8631e72f 100644
--- a/arch/arm/src/armv8-m/arm_svcall.c
+++ b/arch/arm/src/armv8-m/arm_svcall.c
@@ -160,7 +160,7 @@ int arm_svcall(int irq, FAR void *context, FAR void *arg)
     {
       /* R0=SYS_save_context:  This is a save context command:
        *
-       *   int arm_saveusercontext(uint32_t *saveregs);
+       *   int up_saveusercontext(void *saveregs);
        *
        * At this point, the following values are saved in context:
        *
diff --git a/arch/arm/src/common/arm_assert.c b/arch/arm/src/common/arm_assert.c
index ee6306170d..1246d2804a 100644
--- a/arch/arm/src/common/arm_assert.c
+++ b/arch/arm/src/common/arm_assert.c
@@ -371,7 +371,7 @@ static void arm_dumpstate(void)
     }
   else
     {
-      arm_saveusercontext(rtcb->xcp.regs);
+      up_saveusercontext(rtcb->xcp.regs);
     }
 
   /* Dump the registers */
diff --git a/arch/arm/src/common/arm_internal.h b/arch/arm/src/common/arm_internal.h
index f0e867a677..e51f1c2417 100644
--- a/arch/arm/src/common/arm_internal.h
+++ b/arch/arm/src/common/arm_internal.h
@@ -328,7 +328,6 @@ void arm_boot(void);
 /* Context switching */
 
 uint32_t *arm_decodeirq(uint32_t *regs);
-int  arm_saveusercontext(uint32_t *saveregs);
 void arm_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
 void arm_switchcontext(uint32_t **saveregs, uint32_t *restoreregs);
 
diff --git a/arch/ceva/include/syscall.h b/arch/ceva/include/syscall.h
index 876d349e2d..f22102fd40 100644
--- a/arch/ceva/include/syscall.h
+++ b/arch/ceva/include/syscall.h
@@ -58,7 +58,7 @@
 
 /* SYS call 0:
  *
- * int up_saveusercontext(uint32_t *saveregs);
+ * int up_saveusercontext(void *saveregs);
  */
 
 #define SYS_save_context          0x00
diff --git a/arch/ceva/src/common/up_internal.h b/arch/ceva/src/common/up_internal.h
index dceb52b1c3..c00e580294 100644
--- a/arch/ceva/src/common/up_internal.h
+++ b/arch/ceva/src/common/up_internal.h
@@ -228,7 +228,6 @@ void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits);
 
 /* Context switching */
 
-int  up_saveusercontext(uint32_t *saveregs);
 void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
 void up_switchcontext(uint32_t **saveregs, uint32_t *restoreregs);
 
diff --git a/arch/ceva/src/common/up_saveusercontext.c b/arch/ceva/src/common/up_saveusercontext.c
index 0d101e872a..a1d0bffca1 100644
--- a/arch/ceva/src/common/up_saveusercontext.c
+++ b/arch/ceva/src/common/up_saveusercontext.c
@@ -39,7 +39,7 @@
  * Description:
  *   Save the current thread context.  Full prototype is:
  *
- *   int  up_saveusercontext(uint32_t *saveregs);
+ *   int  up_saveusercontext(void *saveregs);
  *
  * Return:
  *   0: Normal return
@@ -47,7 +47,7 @@
  *
  ****************************************************************************/
 
-int up_saveusercontext(uint32_t *saveregs)
+int up_saveusercontext(void *saveregs)
 {
   int ret;
 
diff --git a/arch/ceva/src/common/up_svcall.c b/arch/ceva/src/common/up_svcall.c
index ad4e8a6d0d..2b2115275a 100644
--- a/arch/ceva/src/common/up_svcall.c
+++ b/arch/ceva/src/common/up_svcall.c
@@ -85,7 +85,7 @@ int up_svcall(int irq, void *context, void *arg)
     {
       /* A0=SYS_save_context:  This is a save context command:
        *
-       *   int up_saveusercontext(uint32_t *saveregs);
+       *   int up_saveusercontext(void *saveregs);
        *
        * At this point, the following values are saved in context:
        *
diff --git a/arch/hc/src/common/up_internal.h b/arch/hc/src/common/up_internal.h
index 8daeda9775..4d55d3b872 100644
--- a/arch/hc/src/common/up_internal.h
+++ b/arch/hc/src/common/up_internal.h
@@ -148,7 +148,6 @@ void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits);
 
 void up_copystate(uint8_t *dest, uint8_t *src);
 void up_decodeirq(uint8_t *regs);
-int  up_saveusercontext(uint8_t *saveregs);
 void up_fullcontextrestore(uint8_t *restoreregs) noreturn_function;
 void up_switchcontext(uint8_t *saveregs, uint8_t *restoreregs);
 
diff --git a/arch/or1k/src/common/up_internal.h b/arch/or1k/src/common/up_internal.h
index 79f2532525..9ccf6376e0 100644
--- a/arch/or1k/src/common/up_internal.h
+++ b/arch/or1k/src/common/up_internal.h
@@ -240,7 +240,6 @@ int  or1k_print_cpuinfo(void);
 
 void up_copyfullstate(uint32_t *dest, uint32_t *src);
 void up_decodeirq(uint32_t *regs);
-int  up_saveusercontext(uint32_t *saveregs);
 void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
 void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs);
 
diff --git a/arch/renesas/src/common/up_internal.h b/arch/renesas/src/common/up_internal.h
index d18741a642..91e6c63a4e 100644
--- a/arch/renesas/src/common/up_internal.h
+++ b/arch/renesas/src/common/up_internal.h
@@ -143,7 +143,6 @@ void up_decodeirq(uint32_t *regs);
 uint32_t *up_doirq(int irq, uint32_t *regs);
 void up_fullcontextrestore(uint32_t *regs) noreturn_function;
 void up_prefetchabort(uint32_t *regs);
-int  up_saveusercontext(uint32_t *regs);
 void up_sigdeliver(void);
 void up_syscall(uint32_t *regs);
 void up_undefinedinsn(uint32_t *regs);
diff --git a/arch/renesas/src/m16c/m16c_vectors.S b/arch/renesas/src/m16c/m16c_vectors.S
index 72546c6073..d1f3f926a4 100644
--- a/arch/renesas/src/m16c/m16c_vectors.S
+++ b/arch/renesas/src/m16c/m16c_vectors.S
@@ -374,7 +374,7 @@ _m16c_commonvector:
 	reit					/* Return from interrupt */
 
 /************************************************************************************
- * Name: int up_saveusercontext(uint32_t *regs)
+ * Name: int up_saveusercontext(void *regs)
  *
  * Description:
  *   Save the context of the calling function at the point of the return from the
diff --git a/arch/renesas/src/rx65n/rx65n_vector.S b/arch/renesas/src/rx65n/rx65n_vector.S
index 0eff9d9fc4..5f7d7e9e7f 100644
--- a/arch/renesas/src/rx65n/rx65n_vector.S
+++ b/arch/renesas/src/rx65n/rx65n_vector.S
@@ -218,7 +218,7 @@ _up_vector:
   .size   _up_vector, . - _up_vector
 
 /****************************************************************************
- * Name: int up_saveusercontext(uint32_t *regs)
+ * Name: int up_saveusercontext(void *regs)
  *
  * Description:
  *   Save the context of the calling function at the point of the return from
diff --git a/arch/risc-v/src/bl602/Make.defs b/arch/risc-v/src/bl602/Make.defs
index 37203055fd..a88690ecdf 100644
--- a/arch/risc-v/src/bl602/Make.defs
+++ b/arch/risc-v/src/bl602/Make.defs
@@ -35,6 +35,7 @@ CMN_CSRCS += riscv_releasestack.c riscv_stackframe.c riscv_schedulesigaction.c
 CMN_CSRCS += riscv_sigdeliver.c riscv_udelay.c riscv_unblocktask.c riscv_usestack.c
 CMN_CSRCS += riscv_idle.c riscv_tcbinfo.c riscv_getnewintctx.c riscv_doirq.c
 CMN_CSRCS += riscv_exception.c riscv_mtimer.c riscv_misaligned.c
+CMN_CSRCS += riscv_saveusercontext.c
 
 ifeq ($(CONFIG_SCHED_BACKTRACE),y)
 CMN_CSRCS += riscv_backtrace.c
diff --git a/arch/risc-v/src/c906/Make.defs b/arch/risc-v/src/c906/Make.defs
index 4bdf6b9826..6a1a84503e 100644
--- a/arch/risc-v/src/c906/Make.defs
+++ b/arch/risc-v/src/c906/Make.defs
@@ -35,6 +35,7 @@ CMN_CSRCS += riscv_releasestack.c riscv_stackframe.c riscv_schedulesigaction.c
 CMN_CSRCS += riscv_sigdeliver.c riscv_unblocktask.c riscv_usestack.c
 CMN_CSRCS += riscv_mdelay.c riscv_idle.c riscv_doirq.c riscv_mtimer.c
 CMN_CSRCS += riscv_tcbinfo.c riscv_getnewintctx.c
+CMN_CSRCS += riscv_saveusercontext.c
 
 ifeq ($(CONFIG_SCHED_BACKTRACE),y)
 CMN_CSRCS += riscv_backtrace.c
diff --git a/arch/risc-v/src/common/riscv_assert.c b/arch/risc-v/src/common/riscv_assert.c
index 39b6a2b493..4fcaf7b2c0 100644
--- a/arch/risc-v/src/common/riscv_assert.c
+++ b/arch/risc-v/src/common/riscv_assert.c
@@ -337,7 +337,7 @@ static void riscv_dumpstate(void)
     }
   else
     {
-      riscv_saveusercontext(rtcb->xcp.regs);
+      up_saveusercontext(rtcb->xcp.regs);
     }
 
   /* Dump the registers (if available) */
diff --git a/arch/risc-v/src/common/riscv_internal.h b/arch/risc-v/src/common/riscv_internal.h
index a56be9416d..a719d859fb 100644
--- a/arch/risc-v/src/common/riscv_internal.h
+++ b/arch/risc-v/src/common/riscv_internal.h
@@ -330,18 +330,6 @@ void *riscv_perform_syscall(uintptr_t *regs);
 
 /* Context switching via system calls ***************************************/
 
-/* SYS call 0:
- *
- * int riscv_saveusercontext(uintptr_t *saveregs);
- *
- * Return:
- * 0: Normal Return
- * 1: Context Switch Return
- */
-
-#define riscv_saveusercontext(saveregs) \
-  sys_call1(SYS_save_context, (uintptr_t)saveregs)
-
 /* SYS call 1:
  *
  * void riscv_fullcontextrestore(uintptr_t *restoreregs) noreturn_function;
diff --git a/arch/ceva/src/common/up_saveusercontext.c b/arch/risc-v/src/common/riscv_saveusercontext.c
similarity index 75%
copy from arch/ceva/src/common/up_saveusercontext.c
copy to arch/risc-v/src/common/riscv_saveusercontext.c
index 0d101e872a..ef3d42da93 100644
--- a/arch/ceva/src/common/up_saveusercontext.c
+++ b/arch/risc-v/src/common/riscv_saveusercontext.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/ceva/src/common/up_saveusercontext.c
+ * arch/risc-v/src/common/riscv_saveusercontext.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -23,12 +23,9 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
-#include <nuttx/irq.h>
 
 #include <arch/syscall.h>
 
-#include "up_internal.h"
-
 /****************************************************************************
  * Public Functions
  ****************************************************************************/
@@ -39,30 +36,15 @@
  * Description:
  *   Save the current thread context.  Full prototype is:
  *
- *   int  up_saveusercontext(uint32_t *saveregs);
+ *   int  up_saveusercontext(void *saveregs);
  *
- * Return:
+ * Returned Value:
  *   0: Normal return
  *   1: Context switch return
  *
  ****************************************************************************/
 
-int up_saveusercontext(uint32_t *saveregs)
+int up_saveusercontext(FAR void *saveregs)
 {
-  int ret;
-
-  /* Let sys_call1() do all of the work */
-
-  ret = sys_call1(SYS_save_context, (uintptr_t)saveregs);
-  if (ret == 0)
-    {
-      /* There are two return conditions.  On the first return, A0 (the
-       * return value will be zero.  On the second return we need to
-       * force A0 to be 1.
-       */
-
-      saveregs[REG_A0] = 1;
-    }
-
-  return ret;
+  return sys_call1(SYS_save_context, (uintptr_t)saveregs);
 }
diff --git a/arch/risc-v/src/common/riscv_swint.c b/arch/risc-v/src/common/riscv_swint.c
index 30f67a5438..53f4e1db7f 100644
--- a/arch/risc-v/src/common/riscv_swint.c
+++ b/arch/risc-v/src/common/riscv_swint.c
@@ -172,7 +172,7 @@ int riscv_swint(int irq, void *context, void *arg)
     {
       /* A0=SYS_save_context:  This is a save context command:
        *
-       *   int riscv_saveusercontext(uintptr saveregs);
+       *   int up_saveusercontext(void *saveregs);
        *
        * At this point, the following values are saved in context:
        *
diff --git a/arch/risc-v/src/esp32c3/Make.defs b/arch/risc-v/src/esp32c3/Make.defs
index c9d611a818..a72ac8b69b 100644
--- a/arch/risc-v/src/esp32c3/Make.defs
+++ b/arch/risc-v/src/esp32c3/Make.defs
@@ -41,6 +41,7 @@ CMN_CSRCS += riscv_releasepending.c riscv_reprioritizertr.c
 CMN_CSRCS += riscv_releasestack.c riscv_stackframe.c riscv_schedulesigaction.c
 CMN_CSRCS += riscv_sigdeliver.c riscv_udelay.c riscv_unblocktask.c riscv_usestack.c
 CMN_CSRCS += riscv_tcbinfo.c riscv_getnewintctx.c riscv_doirq.c
+CMN_CSRCS += riscv_saveusercontext.c
 
 ifeq ($(CONFIG_SCHED_BACKTRACE),y)
 CMN_CSRCS += riscv_backtrace.c
diff --git a/arch/risc-v/src/fe310/Make.defs b/arch/risc-v/src/fe310/Make.defs
index 51510122f7..4b09e739cc 100644
--- a/arch/risc-v/src/fe310/Make.defs
+++ b/arch/risc-v/src/fe310/Make.defs
@@ -34,6 +34,7 @@ CMN_CSRCS += riscv_releasepending.c riscv_reprioritizertr.c
 CMN_CSRCS += riscv_releasestack.c riscv_stackframe.c riscv_schedulesigaction.c
 CMN_CSRCS += riscv_sigdeliver.c riscv_udelay.c riscv_unblocktask.c riscv_usestack.c
 CMN_CSRCS += riscv_idle.c riscv_tcbinfo.c riscv_getnewintctx.c riscv_doirq.c
+CMN_CSRCS += riscv_saveusercontext.c
 
 ifeq ($(CONFIG_SCHED_BACKTRACE),y)
 CMN_CSRCS += riscv_backtrace.c
diff --git a/arch/risc-v/src/k210/Make.defs b/arch/risc-v/src/k210/Make.defs
index 39413b80db..ede2b143a2 100644
--- a/arch/risc-v/src/k210/Make.defs
+++ b/arch/risc-v/src/k210/Make.defs
@@ -35,7 +35,7 @@ CMN_CSRCS += riscv_releasestack.c riscv_stackframe.c riscv_schedulesigaction.c
 CMN_CSRCS += riscv_sigdeliver.c riscv_unblocktask.c riscv_usestack.c
 CMN_CSRCS += riscv_mdelay.c riscv_idle.c riscv_doirq.c
 CMN_CSRCS += riscv_tcbinfo.c riscv_cpuidlestack.c riscv_getnewintctx.c
-CMN_CSRCS += riscv_misaligned.c
+CMN_CSRCS += riscv_misaligned.c riscv_saveusercontext.c
 
 ifeq ($(CONFIG_SMP), y)
 CMN_CSRCS += riscv_cpuindex.c riscv_cpupause.c riscv_cpustart.c
diff --git a/arch/risc-v/src/litex/Make.defs b/arch/risc-v/src/litex/Make.defs
index 6af0cc8a8e..768d5269ad 100644
--- a/arch/risc-v/src/litex/Make.defs
+++ b/arch/risc-v/src/litex/Make.defs
@@ -34,6 +34,7 @@ CMN_CSRCS += riscv_releasepending.c riscv_reprioritizertr.c
 CMN_CSRCS += riscv_releasestack.c riscv_stackframe.c riscv_schedulesigaction.c
 CMN_CSRCS += riscv_sigdeliver.c riscv_udelay.c riscv_unblocktask.c riscv_usestack.c
 CMN_CSRCS += riscv_idle.c riscv_tcbinfo.c riscv_getnewintctx.c
+CMN_CSRCS += riscv_saveusercontext.c
 
 ifeq ($(CONFIG_SCHED_BACKTRACE),y)
 CMN_CSRCS += riscv_backtrace.c
diff --git a/arch/risc-v/src/mpfs/Make.defs b/arch/risc-v/src/mpfs/Make.defs
index 66654a03e4..c95c8a6d1d 100755
--- a/arch/risc-v/src/mpfs/Make.defs
+++ b/arch/risc-v/src/mpfs/Make.defs
@@ -33,6 +33,7 @@ CMN_CSRCS += riscv_sigdeliver.c riscv_unblocktask.c riscv_usestack.c
 CMN_CSRCS += riscv_mdelay.c riscv_udelay.c
 CMN_CSRCS += riscv_idle.c riscv_tcbinfo.c riscv_getnewintctx.c
 CMN_CSRCS += riscv_doirq.c riscv_mtimer.c
+CMN_CSRCS += riscv_saveusercontext.c
 
 # Specify ASM code within the common directory to be included
 CMN_ASRCS += riscv_mhartid.S
diff --git a/arch/risc-v/src/qemu-rv/Make.defs b/arch/risc-v/src/qemu-rv/Make.defs
index 11a8cf93f4..89c251ae2b 100644
--- a/arch/risc-v/src/qemu-rv/Make.defs
+++ b/arch/risc-v/src/qemu-rv/Make.defs
@@ -35,6 +35,7 @@ CMN_CSRCS += riscv_releasestack.c riscv_stackframe.c riscv_schedulesigaction.c
 CMN_CSRCS += riscv_sigdeliver.c riscv_unblocktask.c riscv_usestack.c
 CMN_CSRCS += riscv_idle.c riscv_tcbinfo.c riscv_cpuidlestack.c
 CMN_CSRCS += riscv_exception.c riscv_getnewintctx.c riscv_doirq.c
+CMN_CSRCS += riscv_saveusercontext.c
 
 ifeq ($(CONFIG_SMP), y)
 CMN_CSRCS += riscv_cpuindex.c riscv_cpupause.c riscv_cpustart.c
diff --git a/arch/risc-v/src/rv32m1/Make.defs b/arch/risc-v/src/rv32m1/Make.defs
index b009fb7284..f1dc2d0dea 100644
--- a/arch/risc-v/src/rv32m1/Make.defs
+++ b/arch/risc-v/src/rv32m1/Make.defs
@@ -34,6 +34,7 @@ CMN_CSRCS += riscv_releasepending.c riscv_reprioritizertr.c
 CMN_CSRCS += riscv_releasestack.c riscv_stackframe.c riscv_schedulesigaction.c
 CMN_CSRCS += riscv_sigdeliver.c riscv_unblocktask.c riscv_usestack.c
 CMN_CSRCS += riscv_idle.c riscv_tcbinfo.c riscv_getnewintctx.c
+CMN_CSRCS += riscv_saveusercontext.c
 
 ifeq ($(CONFIG_SCHED_BACKTRACE),y)
 CMN_CSRCS += riscv_backtrace.c
diff --git a/arch/x86/src/common/up_internal.h b/arch/x86/src/common/up_internal.h
index f7c6c01028..00647d3362 100644
--- a/arch/x86/src/common/up_internal.h
+++ b/arch/x86/src/common/up_internal.h
@@ -186,7 +186,6 @@ void up_decodeirq(uint32_t *regs);
 #ifdef CONFIG_ARCH_DMA
 void weak_function up_dma_initialize(void);
 #endif
-int  up_saveusercontext(uint32_t *saveregs);
 void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
 void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs);
 void up_sigdeliver(void);
diff --git a/arch/x86/src/qemu/qemu_saveusercontext.S b/arch/x86/src/qemu/qemu_saveusercontext.S
index 0f7a931101..d3c9ab437b 100644
--- a/arch/x86/src/qemu/qemu_saveusercontext.S
+++ b/arch/x86/src/qemu/qemu_saveusercontext.S
@@ -66,7 +66,7 @@
  * Name: up_saveusercontext
  *
  * Full C prototype:
- *  int up_saveusercontext(uint32_t *regs);
+ *  int up_saveusercontext(void *regs);
  *
  * Description:
  *  Save the "user" context.  It is not necessary to save all of the
diff --git a/arch/x86_64/src/common/up_internal.h b/arch/x86_64/src/common/up_internal.h
index 324b6eaf0e..9552b6d29b 100644
--- a/arch/x86_64/src/common/up_internal.h
+++ b/arch/x86_64/src/common/up_internal.h
@@ -205,7 +205,6 @@ void up_decodeirq(uint64_t *regs);
 #ifdef CONFIG_ARCH_DMA
 void weak_function up_dmainitialize(void);
 #endif
-int  up_saveusercontext(uint64_t *saveregs);
 void up_fullcontextrestore(uint64_t *restoreregs) noreturn_function;
 void up_switchcontext(uint64_t *saveregs, uint64_t *restoreregs);
 void up_sigdeliver(void);
diff --git a/arch/x86_64/src/intel64/intel64_saveusercontext.S b/arch/x86_64/src/intel64/intel64_saveusercontext.S
index fd51be0833..4c8479e25f 100644
--- a/arch/x86_64/src/intel64/intel64_saveusercontext.S
+++ b/arch/x86_64/src/intel64/intel64_saveusercontext.S
@@ -66,7 +66,7 @@
  * Name: up_saveusercontext
  *
  * Full C prototype:
- *  int up_saveusercontext(uint32_t *regs);
+ *  int up_saveusercontext(void *regs);
  *
  * Description:
  *  Save the "user" context.  It is not necessary to save all of the
diff --git a/boards/arm/cxd56xx/spresense/src/cxd56_ostest.c b/boards/arm/cxd56xx/spresense/src/cxd56_ostest.c
index a0c7934498..1175382fc3 100644
--- a/boards/arm/cxd56xx/spresense/src/cxd56_ostest.c
+++ b/boards/arm/cxd56xx/spresense/src/cxd56_ostest.c
@@ -77,7 +77,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  arm_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/arm/lpc43xx/bambino-200e/src/lpc43_ostest.c b/boards/arm/lpc43xx/bambino-200e/src/lpc43_ostest.c
index c0ef9b05a2..8492c28abb 100644
--- a/boards/arm/lpc43xx/bambino-200e/src/lpc43_ostest.c
+++ b/boards/arm/lpc43xx/bambino-200e/src/lpc43_ostest.c
@@ -74,7 +74,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  arm_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/arm/lpc43xx/lpc4330-xplorer/src/lpc43_ostest.c b/boards/arm/lpc43xx/lpc4330-xplorer/src/lpc43_ostest.c
index 9210a0a8da..4a40ae092a 100644
--- a/boards/arm/lpc43xx/lpc4330-xplorer/src/lpc43_ostest.c
+++ b/boards/arm/lpc43xx/lpc4330-xplorer/src/lpc43_ostest.c
@@ -78,7 +78,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  arm_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/arm/lpc43xx/lpc4357-evb/src/lpc43_ostest.c b/boards/arm/lpc43xx/lpc4357-evb/src/lpc43_ostest.c
index a45ba6f2fd..7881b3467e 100644
--- a/boards/arm/lpc43xx/lpc4357-evb/src/lpc43_ostest.c
+++ b/boards/arm/lpc43xx/lpc4357-evb/src/lpc43_ostest.c
@@ -78,7 +78,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  arm_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/arm/lpc43xx/lpc4370-link2/src/lpc43_ostest.c b/boards/arm/lpc43xx/lpc4370-link2/src/lpc43_ostest.c
index ac1b6973aa..f416e346dd 100644
--- a/boards/arm/lpc43xx/lpc4370-link2/src/lpc43_ostest.c
+++ b/boards/arm/lpc43xx/lpc4370-link2/src/lpc43_ostest.c
@@ -78,7 +78,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  arm_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/arm/sama5/giant-board/src/sam_ostest.c b/boards/arm/sama5/giant-board/src/sam_ostest.c
index 1c20304755..40b8952f88 100644
--- a/boards/arm/sama5/giant-board/src/sam_ostest.c
+++ b/boards/arm/sama5/giant-board/src/sam_ostest.c
@@ -74,7 +74,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  arm_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/arm/sama5/sama5d2-xult/src/sam_ostest.c b/boards/arm/sama5/sama5d2-xult/src/sam_ostest.c
index caa668b54c..b6f9993d34 100644
--- a/boards/arm/sama5/sama5d2-xult/src/sam_ostest.c
+++ b/boards/arm/sama5/sama5d2-xult/src/sam_ostest.c
@@ -78,7 +78,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  arm_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/arm/sama5/sama5d3-xplained/src/sam_ostest.c b/boards/arm/sama5/sama5d3-xplained/src/sam_ostest.c
index c603b3918e..543347ba4f 100644
--- a/boards/arm/sama5/sama5d3-xplained/src/sam_ostest.c
+++ b/boards/arm/sama5/sama5d3-xplained/src/sam_ostest.c
@@ -78,7 +78,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  arm_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/arm/sama5/sama5d3x-ek/src/sam_ostest.c b/boards/arm/sama5/sama5d3x-ek/src/sam_ostest.c
index c664cd21e7..4f7efeecc6 100644
--- a/boards/arm/sama5/sama5d3x-ek/src/sam_ostest.c
+++ b/boards/arm/sama5/sama5d3x-ek/src/sam_ostest.c
@@ -78,7 +78,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  arm_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/arm/sama5/sama5d4-ek/src/sam_ostest.c b/boards/arm/sama5/sama5d4-ek/src/sam_ostest.c
index b0f9f3c1c2..03bd727574 100644
--- a/boards/arm/sama5/sama5d4-ek/src/sam_ostest.c
+++ b/boards/arm/sama5/sama5d4-ek/src/sam_ostest.c
@@ -78,7 +78,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  arm_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/arm/stm32/omnibusf4/src/stm32_ostest.c b/boards/arm/stm32/omnibusf4/src/stm32_ostest.c
index d568837151..45a854417e 100644
--- a/boards/arm/stm32/omnibusf4/src/stm32_ostest.c
+++ b/boards/arm/stm32/omnibusf4/src/stm32_ostest.c
@@ -76,7 +76,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  arm_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/arm/stm32/stm3240g-eval/src/stm32_ostest.c b/boards/arm/stm32/stm3240g-eval/src/stm32_ostest.c
index 6a7a06c9b2..db0f92fa22 100644
--- a/boards/arm/stm32/stm3240g-eval/src/stm32_ostest.c
+++ b/boards/arm/stm32/stm3240g-eval/src/stm32_ostest.c
@@ -78,7 +78,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  arm_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/arm/stm32/stm32f429i-disco/src/stm32_ostest.c b/boards/arm/stm32/stm32f429i-disco/src/stm32_ostest.c
index 12c6f91e9a..6c79bd6bee 100644
--- a/boards/arm/stm32/stm32f429i-disco/src/stm32_ostest.c
+++ b/boards/arm/stm32/stm32f429i-disco/src/stm32_ostest.c
@@ -78,7 +78,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  arm_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_ostest.c b/boards/arm/stm32/stm32f4discovery/src/stm32_ostest.c
index 5a24458fc5..44af8111d9 100644
--- a/boards/arm/stm32/stm32f4discovery/src/stm32_ostest.c
+++ b/boards/arm/stm32/stm32f4discovery/src/stm32_ostest.c
@@ -74,7 +74,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  arm_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/arm/stm32f7/stm32f746g-disco/src/stm32_ostest.c b/boards/arm/stm32f7/stm32f746g-disco/src/stm32_ostest.c
index 46d1762d66..976450cd2b 100644
--- a/boards/arm/stm32f7/stm32f746g-disco/src/stm32_ostest.c
+++ b/boards/arm/stm32f7/stm32f746g-disco/src/stm32_ostest.c
@@ -78,7 +78,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  arm_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/arm/stm32f7/stm32f769i-disco/src/stm32_ostest.c b/boards/arm/stm32f7/stm32f769i-disco/src/stm32_ostest.c
index 92b490faad..71cc535dbf 100644
--- a/boards/arm/stm32f7/stm32f769i-disco/src/stm32_ostest.c
+++ b/boards/arm/stm32f7/stm32f769i-disco/src/stm32_ostest.c
@@ -78,7 +78,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  arm_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/arm/stm32h7/nucleo-h743zi2/src/stm32_ostest.c b/boards/arm/stm32h7/nucleo-h743zi2/src/stm32_ostest.c
index e058a38514..29e38ef2e0 100644
--- a/boards/arm/stm32h7/nucleo-h743zi2/src/stm32_ostest.c
+++ b/boards/arm/stm32h7/nucleo-h743zi2/src/stm32_ostest.c
@@ -74,7 +74,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  arm_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/arm/xmc4/xmc4500-relax/src/xmc4_ostest.c b/boards/arm/xmc4/xmc4500-relax/src/xmc4_ostest.c
index f3e566c9b9..a7a9a7d72f 100644
--- a/boards/arm/xmc4/xmc4500-relax/src/xmc4_ostest.c
+++ b/boards/arm/xmc4/xmc4500-relax/src/xmc4_ostest.c
@@ -74,7 +74,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  arm_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/arm/xmc4/xmc4700-relax/src/xmc4_ostest.c b/boards/arm/xmc4/xmc4700-relax/src/xmc4_ostest.c
index ef3f59bc4e..bb860e0e13 100644
--- a/boards/arm/xmc4/xmc4700-relax/src/xmc4_ostest.c
+++ b/boards/arm/xmc4/xmc4700-relax/src/xmc4_ostest.c
@@ -74,7 +74,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  arm_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/risc-v/bl602/bl602evb/src/bl602_ostest.c b/boards/risc-v/bl602/bl602evb/src/bl602_ostest.c
index bd11c4e3b6..64805b5dec 100644
--- a/boards/risc-v/bl602/bl602evb/src/bl602_ostest.c
+++ b/boards/risc-v/bl602/bl602evb/src/bl602_ostest.c
@@ -74,7 +74,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  riscv_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/risc-v/c906/smartl-c906/src/c906_ostest.c b/boards/risc-v/c906/smartl-c906/src/c906_ostest.c
index dd6bc11fe8..ea670d5bca 100644
--- a/boards/risc-v/c906/smartl-c906/src/c906_ostest.c
+++ b/boards/risc-v/c906/smartl-c906/src/c906_ostest.c
@@ -74,7 +74,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  riscv_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/risc-v/mpfs/common/src/mpfs_ostest.c b/boards/risc-v/mpfs/common/src/mpfs_ostest.c
index 6b4e3dbfec..d85bc811ea 100755
--- a/boards/risc-v/mpfs/common/src/mpfs_ostest.c
+++ b/boards/risc-v/mpfs/common/src/mpfs_ostest.c
@@ -74,7 +74,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  riscv_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_ostest.c b/boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_ostest.c
index 4fefb06a08..e2dd2165a0 100644
--- a/boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_ostest.c
+++ b/boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_ostest.c
@@ -74,7 +74,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
   /* Take a snapshot of the thread context right now */
 
   flags = enter_critical_section();
-  riscv_saveusercontext(g_saveregs);
+  up_saveusercontext(g_saveregs);
 
   /* Return only the floating register values */
 
diff --git a/include/nuttx/arch.h b/include/nuttx/arch.h
index 1d0d8b8688..deb1ce5233 100644
--- a/include/nuttx/arch.h
+++ b/include/nuttx/arch.h
@@ -2563,6 +2563,16 @@ uint32_t up_perf_gettime(void);
 uint32_t up_perf_getfreq(void);
 void up_perf_convert(uint32_t elapsed, FAR struct timespec *ts);
 
+/****************************************************************************
+ * Name: up_saveusercontext
+ *
+ * Description:
+ *   Save the current thread context
+ *
+ ****************************************************************************/
+
+int up_saveusercontext(FAR void *saveregs);
+
 #undef EXTERN
 #if defined(__cplusplus)
 }


[incubator-nuttx] 02/03: boards/ostest: remove board ostest implement

Posted by xi...@apache.org.
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

commit dc2e4b70240f64cd83789cbeffbd2f76263364e1
Author: chao.an <an...@xiaomi.com>
AuthorDate: Sat Apr 16 00:12:20 2022 +0800

    boards/ostest: remove board ostest implement
    
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 .../arm/cxd56xx/spresense/configs/rndis/defconfig  |  1 -
 .../cxd56xx/spresense/configs/rndis_smp/defconfig  |  1 -
 boards/arm/cxd56xx/spresense/configs/smp/defconfig |  1 -
 .../arm/cxd56xx/spresense/configs/wifi/defconfig   |  1 -
 .../cxd56xx/spresense/configs/wifi_smp/defconfig   |  1 -
 boards/arm/cxd56xx/spresense/src/Make.defs         |  4 -
 boards/arm/cxd56xx/spresense/src/cxd56_ostest.c    | 97 ---------------------
 boards/arm/lpc43xx/bambino-200e/src/Makefile       |  4 -
 boards/arm/lpc43xx/bambino-200e/src/lpc43_ostest.c | 94 ---------------------
 boards/arm/lpc43xx/lpc4330-xplorer/src/Makefile    |  4 -
 .../arm/lpc43xx/lpc4330-xplorer/src/lpc43_ostest.c | 98 ----------------------
 boards/arm/lpc43xx/lpc4357-evb/src/Makefile        |  4 -
 boards/arm/lpc43xx/lpc4357-evb/src/lpc43_ostest.c  | 98 ----------------------
 boards/arm/lpc43xx/lpc4370-link2/src/Makefile      |  4 -
 .../arm/lpc43xx/lpc4370-link2/src/lpc43_ostest.c   | 98 ----------------------
 boards/arm/sama5/giant-board/src/Makefile          |  4 -
 boards/arm/sama5/giant-board/src/sam_ostest.c      | 94 ---------------------
 boards/arm/sama5/sama5d2-xult/src/Makefile         |  4 -
 boards/arm/sama5/sama5d2-xult/src/sam_ostest.c     | 98 ----------------------
 boards/arm/sama5/sama5d3-xplained/src/Makefile     |  4 -
 boards/arm/sama5/sama5d3-xplained/src/sam_ostest.c | 98 ----------------------
 boards/arm/sama5/sama5d3x-ek/src/Makefile          |  4 -
 boards/arm/sama5/sama5d3x-ek/src/sam_ostest.c      | 98 ----------------------
 boards/arm/sama5/sama5d4-ek/src/Makefile           |  4 -
 boards/arm/sama5/sama5d4-ek/src/sam_ostest.c       | 98 ----------------------
 boards/arm/stm32/olimex-stm32-e407/src/Make.defs   |  4 -
 boards/arm/stm32/olimex-stm32-h407/src/Make.defs   |  4 -
 boards/arm/stm32/omnibusf4/src/Make.defs           |  4 -
 boards/arm/stm32/omnibusf4/src/stm32_ostest.c      | 96 ---------------------
 boards/arm/stm32/stm3240g-eval/src/Make.defs       |  4 -
 boards/arm/stm32/stm3240g-eval/src/stm32_ostest.c  | 98 ----------------------
 boards/arm/stm32/stm32f429i-disco/src/Make.defs    |  4 -
 .../arm/stm32/stm32f429i-disco/src/stm32_ostest.c  | 98 ----------------------
 .../stm32/stm32f4discovery/configs/wifi/defconfig  |  1 -
 boards/arm/stm32/stm32f4discovery/src/Make.defs    |  4 -
 .../arm/stm32/stm32f4discovery/src/stm32_ostest.c  | 94 ---------------------
 boards/arm/stm32f7/stm32f746g-disco/src/Makefile   |  4 -
 .../stm32f7/stm32f746g-disco/src/stm32_ostest.c    | 98 ----------------------
 boards/arm/stm32f7/stm32f769i-disco/src/Makefile   |  4 -
 .../stm32f7/stm32f769i-disco/src/stm32_ostest.c    | 98 ----------------------
 .../stm32h7/nucleo-h743zi2/configs/jumbo/defconfig |  1 -
 boards/arm/stm32h7/nucleo-h743zi2/src/Makefile     |  4 -
 .../arm/stm32h7/nucleo-h743zi2/src/stm32_ostest.c  | 94 ---------------------
 boards/arm/xmc4/xmc4500-relax/src/Makefile         |  4 -
 boards/arm/xmc4/xmc4500-relax/src/xmc4_ostest.c    | 94 ---------------------
 boards/arm/xmc4/xmc4700-relax/src/Makefile         |  4 -
 boards/arm/xmc4/xmc4700-relax/src/xmc4_ostest.c    | 94 ---------------------
 boards/risc-v/bl602/bl602evb/configs/elf/defconfig |  1 -
 boards/risc-v/bl602/bl602evb/configs/fpu/defconfig |  1 -
 .../risc-v/bl602/bl602evb/configs/wifi/defconfig   |  1 -
 boards/risc-v/bl602/bl602evb/src/Makefile          |  4 -
 boards/risc-v/bl602/bl602evb/src/bl602_ostest.c    | 94 ---------------------
 .../risc-v/c906/smartl-c906/configs/elf/defconfig  |  1 -
 .../risc-v/c906/smartl-c906/configs/fpu/defconfig  |  1 -
 .../risc-v/c906/smartl-c906/configs/knsh/defconfig |  1 -
 .../c906/smartl-c906/configs/module/defconfig      |  1 -
 .../risc-v/c906/smartl-c906/configs/nsh/defconfig  |  1 -
 .../c906/smartl-c906/configs/sotest/defconfig      |  1 -
 boards/risc-v/c906/smartl-c906/src/Makefile        |  4 -
 boards/risc-v/c906/smartl-c906/src/c906_ostest.c   | 94 ---------------------
 boards/risc-v/mpfs/common/src/Make.defs            |  4 -
 boards/risc-v/mpfs/common/src/mpfs_ostest.c        | 94 ---------------------
 boards/risc-v/mpfs/icicle/configs/knsh/defconfig   |  1 -
 .../risc-v/qemu-rv/rv-virt/configs/nsh/defconfig   |  1 -
 .../risc-v/qemu-rv/rv-virt/configs/nsh64/defconfig |  1 -
 .../risc-v/qemu-rv/rv-virt/configs/smp/defconfig   |  1 -
 .../risc-v/qemu-rv/rv-virt/configs/smp64/defconfig |  1 -
 boards/risc-v/qemu-rv/rv-virt/src/Makefile         |  2 +-
 boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_ostest.c | 94 ---------------------
 69 files changed, 1 insertion(+), 2329 deletions(-)

diff --git a/boards/arm/cxd56xx/spresense/configs/rndis/defconfig b/boards/arm/cxd56xx/spresense/configs/rndis/defconfig
index 00e277734d..da2c6be2d7 100644
--- a/boards/arm/cxd56xx/spresense/configs/rndis/defconfig
+++ b/boards/arm/cxd56xx/spresense/configs/rndis/defconfig
@@ -152,7 +152,6 @@ CONFIG_SYSTEM_NXPLAYER=y
 CONFIG_SYSTEM_NXRECORDER=y
 CONFIG_SYSTEM_PING=y
 CONFIG_TESTING_OSTEST=y
-CONFIG_TESTING_OSTEST_FPUSIZE=64
 CONFIG_UART1_SERIAL_CONSOLE=y
 CONFIG_USBDEV=y
 CONFIG_USBDEV_DMA=y
diff --git a/boards/arm/cxd56xx/spresense/configs/rndis_smp/defconfig b/boards/arm/cxd56xx/spresense/configs/rndis_smp/defconfig
index 903de5f57d..80f3d2e3d9 100644
--- a/boards/arm/cxd56xx/spresense/configs/rndis_smp/defconfig
+++ b/boards/arm/cxd56xx/spresense/configs/rndis_smp/defconfig
@@ -157,7 +157,6 @@ CONFIG_SYSTEM_SYSTEM=y
 CONFIG_SYSTEM_TASKSET=y
 CONFIG_TESTING_GETPRIME=y
 CONFIG_TESTING_OSTEST=y
-CONFIG_TESTING_OSTEST_FPUSIZE=64
 CONFIG_TESTING_SMP=y
 CONFIG_UART1_SERIAL_CONSOLE=y
 CONFIG_USBDEV=y
diff --git a/boards/arm/cxd56xx/spresense/configs/smp/defconfig b/boards/arm/cxd56xx/spresense/configs/smp/defconfig
index bbf2211f22..4209329e9e 100644
--- a/boards/arm/cxd56xx/spresense/configs/smp/defconfig
+++ b/boards/arm/cxd56xx/spresense/configs/smp/defconfig
@@ -57,6 +57,5 @@ CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_SYSTEM=y
 CONFIG_SYSTEM_TASKSET=y
 CONFIG_TESTING_OSTEST=y
-CONFIG_TESTING_OSTEST_FPUSIZE=64
 CONFIG_TESTING_SMP=y
 CONFIG_UART1_SERIAL_CONSOLE=y
diff --git a/boards/arm/cxd56xx/spresense/configs/wifi/defconfig b/boards/arm/cxd56xx/spresense/configs/wifi/defconfig
index 13e2390857..2fd37f8749 100644
--- a/boards/arm/cxd56xx/spresense/configs/wifi/defconfig
+++ b/boards/arm/cxd56xx/spresense/configs/wifi/defconfig
@@ -159,7 +159,6 @@ CONFIG_SYSTEM_NXRECORDER=y
 CONFIG_SYSTEM_USBMSC=y
 CONFIG_TESTING_GETPRIME=y
 CONFIG_TESTING_OSTEST=y
-CONFIG_TESTING_OSTEST_FPUSIZE=64
 CONFIG_UART1_SERIAL_CONSOLE=y
 CONFIG_USBDEV=y
 CONFIG_USBDEV_DMA=y
diff --git a/boards/arm/cxd56xx/spresense/configs/wifi_smp/defconfig b/boards/arm/cxd56xx/spresense/configs/wifi_smp/defconfig
index 0151beabf2..69f73e0a2a 100644
--- a/boards/arm/cxd56xx/spresense/configs/wifi_smp/defconfig
+++ b/boards/arm/cxd56xx/spresense/configs/wifi_smp/defconfig
@@ -167,7 +167,6 @@ CONFIG_SYSTEM_TASKSET=y
 CONFIG_SYSTEM_USBMSC=y
 CONFIG_TESTING_GETPRIME=y
 CONFIG_TESTING_OSTEST=y
-CONFIG_TESTING_OSTEST_FPUSIZE=64
 CONFIG_TESTING_SMP=y
 CONFIG_UART1_SERIAL_CONSOLE=y
 CONFIG_USBDEV=y
diff --git a/boards/arm/cxd56xx/spresense/src/Make.defs b/boards/arm/cxd56xx/spresense/src/Make.defs
index 1bb84d5462..ff4b0f4888 100644
--- a/boards/arm/cxd56xx/spresense/src/Make.defs
+++ b/boards/arm/cxd56xx/spresense/src/Make.defs
@@ -31,10 +31,6 @@ ifeq ($(CONFIG_BOARDCTL_IOCTL),y)
 CSRCS += cxd56_ioctl.c
 endif
 
-ifeq ($(CONFIG_ARCH_FPU),y)
-CSRCS += cxd56_ostest.c
-endif
-
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += cxd56_leds.c
 else
diff --git a/boards/arm/cxd56xx/spresense/src/cxd56_ostest.c b/boards/arm/cxd56xx/spresense/src/cxd56_ostest.c
deleted file mode 100644
index 1175382fc3..0000000000
--- a/boards/arm/cxd56xx/spresense/src/cxd56_ostest.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************************
- * boards/arm/cxd56xx/spresense/src/cxd56_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <debug.h>
-
-#include <nuttx/irq.h>
-#include <arch/board/board.h>
-
-#include "arm_internal.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && defined(CONFIG_TESTING_OSTEST_FPUSIZE) && \
-    defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (4*SW_FPU_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint32_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[REG_S0], (4*SW_FPU_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (4*SW_FPU_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/arm/lpc43xx/bambino-200e/src/Makefile b/boards/arm/lpc43xx/bambino-200e/src/Makefile
index 5f07e77ee2..a38320c029 100644
--- a/boards/arm/lpc43xx/bambino-200e/src/Makefile
+++ b/boards/arm/lpc43xx/bambino-200e/src/Makefile
@@ -30,10 +30,6 @@ ifeq ($(CONFIG_BOARDCTL),y)
 CSRCS += lpc43_appinit.c
 endif
 
-ifeq ($(CONFIG_ARCH_FPU),y)
-CSRCS += lpc43_ostest.c
-endif
-
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += lpc43_autoleds.c
 else
diff --git a/boards/arm/lpc43xx/bambino-200e/src/lpc43_ostest.c b/boards/arm/lpc43xx/bambino-200e/src/lpc43_ostest.c
deleted file mode 100644
index 8492c28abb..0000000000
--- a/boards/arm/lpc43xx/bambino-200e/src/lpc43_ostest.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
- * boards/arm/lpc43xx/bambino-200e/src/lpc43_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <debug.h>
-
-#include <nuttx/irq.h>
-#include <arch/board/board.h>
-
-#include "arm_internal.h"
-#include "bambino-200e.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && defined(CONFIG_TESTING_OSTEST_FPUSIZE) && \
-    defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (4*SW_FPU_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint32_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[REG_S0], (4*SW_FPU_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (4*SW_FPU_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/arm/lpc43xx/lpc4330-xplorer/src/Makefile b/boards/arm/lpc43xx/lpc4330-xplorer/src/Makefile
index 8deabf2a3a..4f02477a51 100644
--- a/boards/arm/lpc43xx/lpc4330-xplorer/src/Makefile
+++ b/boards/arm/lpc43xx/lpc4330-xplorer/src/Makefile
@@ -26,10 +26,6 @@ ifeq ($(CONFIG_BOARDCTL),y)
 CSRCS += lpc43_appinit.c
 endif
 
-ifeq ($(CONFIG_ARCH_FPU),y)
-CSRCS += lpc43_ostest.c
-endif
-
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += lpc43_autoleds.c
 else
diff --git a/boards/arm/lpc43xx/lpc4330-xplorer/src/lpc43_ostest.c b/boards/arm/lpc43xx/lpc4330-xplorer/src/lpc43_ostest.c
deleted file mode 100644
index 4a40ae092a..0000000000
--- a/boards/arm/lpc43xx/lpc4330-xplorer/src/lpc43_ostest.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
- * boards/arm/lpc43xx/lpc4330-xplorer/src/lpc43_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <debug.h>
-
-#include <nuttx/irq.h>
-#include <arch/board/board.h>
-
-#include "arm_internal.h"
-#include "lpc4330-xplorer.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && defined(CONFIG_TESTING_OSTEST_FPUSIZE) && \
-    defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (4*SW_FPU_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint32_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[REG_S0], (4*SW_FPU_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (4*SW_FPU_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/arm/lpc43xx/lpc4357-evb/src/Makefile b/boards/arm/lpc43xx/lpc4357-evb/src/Makefile
index b669b3cde4..5e7eed6536 100644
--- a/boards/arm/lpc43xx/lpc4357-evb/src/Makefile
+++ b/boards/arm/lpc43xx/lpc4357-evb/src/Makefile
@@ -26,10 +26,6 @@ ifeq ($(CONFIG_BOARDCTL),y)
 CSRCS += lpc43_appinit.c
 endif
 
-ifeq ($(CONFIG_ARCH_FPU),y)
-CSRCS += lpc43_ostest.c
-endif
-
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += lpc43_autoleds.c
 else
diff --git a/boards/arm/lpc43xx/lpc4357-evb/src/lpc43_ostest.c b/boards/arm/lpc43xx/lpc4357-evb/src/lpc43_ostest.c
deleted file mode 100644
index 7881b3467e..0000000000
--- a/boards/arm/lpc43xx/lpc4357-evb/src/lpc43_ostest.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
- * boards/arm/lpc43xx/lpc4357-evb/src/lpc43_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <debug.h>
-
-#include <nuttx/irq.h>
-#include <arch/board/board.h>
-
-#include "arm_internal.h"
-#include "lpc4357-evb.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && defined(CONFIG_TESTING_OSTEST_FPUSIZE) && \
-    defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (4*SW_FPU_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint32_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function
- * will return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[REG_S0], (4*SW_FPU_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (4*SW_FPU_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/arm/lpc43xx/lpc4370-link2/src/Makefile b/boards/arm/lpc43xx/lpc4370-link2/src/Makefile
index e251651d6e..0f20f8dcd5 100644
--- a/boards/arm/lpc43xx/lpc4370-link2/src/Makefile
+++ b/boards/arm/lpc43xx/lpc4370-link2/src/Makefile
@@ -26,10 +26,6 @@ ifeq ($(CONFIG_BOARDCTL),y)
 CSRCS += lpc43_appinit.c
 endif
 
-ifeq ($(CONFIG_ARCH_FPU),y)
-CSRCS += lpc43_ostest.c
-endif
-
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += lpc43_autoleds.c
 else
diff --git a/boards/arm/lpc43xx/lpc4370-link2/src/lpc43_ostest.c b/boards/arm/lpc43xx/lpc4370-link2/src/lpc43_ostest.c
deleted file mode 100644
index f416e346dd..0000000000
--- a/boards/arm/lpc43xx/lpc4370-link2/src/lpc43_ostest.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
- * boards/arm/lpc43xx/lpc4370-link2/src/lpc43_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <debug.h>
-
-#include <nuttx/irq.h>
-#include <arch/board/board.h>
-
-#include "arm_internal.h"
-#include "lpc4370-link2.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && defined(CONFIG_TESTING_OSTEST_FPUSIZE) && \
-    defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (4*SW_FPU_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint32_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[REG_S0], (4*SW_FPU_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (4*SW_FPU_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/arm/sama5/giant-board/src/Makefile b/boards/arm/sama5/giant-board/src/Makefile
index 15ebdd1e83..7ca4114987 100644
--- a/boards/arm/sama5/giant-board/src/Makefile
+++ b/boards/arm/sama5/giant-board/src/Makefile
@@ -88,10 +88,6 @@ ifeq ($(CONFIG_USBMSC),y)
 CSRCS += sam_usbmsc.c
 endif
 
-ifeq ($(CONFIG_ARCH_FPU),y)
-CSRCS += sam_ostest.c
-endif
-
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += sam_autoleds.c
 else
diff --git a/boards/arm/sama5/giant-board/src/sam_ostest.c b/boards/arm/sama5/giant-board/src/sam_ostest.c
deleted file mode 100644
index 40b8952f88..0000000000
--- a/boards/arm/sama5/giant-board/src/sam_ostest.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
- * boards/arm/sama5/giant-board/src/sam_ostest.c
- *
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.  The
- *  ASF licenses this file to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance with the
- *  License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- *  License for the specific language governing permissions and limitations
- *  under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <debug.h>
-
-#include <nuttx/irq.h>
-#include <arch/board/board.h>
-
-#include "arm_internal.h"
-#include "giant-board.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && !defined(CONFIG_TESTING_OSTEST_FPUTESTDISABLE) && \
-    defined(CONFIG_TESTING_OSTEST_FPUSIZE) && defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (4*FPU_CONTEXT_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint32_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[REG_S0], (4*FPU_CONTEXT_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (4*FPU_CONTEXT_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/arm/sama5/sama5d2-xult/src/Makefile b/boards/arm/sama5/sama5d2-xult/src/Makefile
index d31528ac9f..e1b01cef05 100644
--- a/boards/arm/sama5/sama5d2-xult/src/Makefile
+++ b/boards/arm/sama5/sama5d2-xult/src/Makefile
@@ -110,10 +110,6 @@ ifeq ($(CONFIG_USBMSC),y)
 CSRCS += sam_usbmsc.c
 endif
 
-ifeq ($(CONFIG_ARCH_FPU),y)
-CSRCS += sam_ostest.c
-endif
-
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += sam_autoleds.c
 else
diff --git a/boards/arm/sama5/sama5d2-xult/src/sam_ostest.c b/boards/arm/sama5/sama5d2-xult/src/sam_ostest.c
deleted file mode 100644
index b6f9993d34..0000000000
--- a/boards/arm/sama5/sama5d2-xult/src/sam_ostest.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
- * boards/arm/sama5/sama5d2-xult/src/sam_ostest.c
- *
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.  The
- *  ASF licenses this file to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance with the
- *  License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- *  License for the specific language governing permissions and limitations
- *  under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <debug.h>
-
-#include <nuttx/irq.h>
-#include <arch/board/board.h>
-
-#include "arm_internal.h"
-#include "sama5d2-xult.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && !defined(CONFIG_TESTING_OSTEST_FPUTESTDISABLE) && \
-    defined(CONFIG_TESTING_OSTEST_FPUSIZE) && defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (4*FPU_CONTEXT_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint32_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[REG_S0], (4*FPU_CONTEXT_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (4*FPU_CONTEXT_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/arm/sama5/sama5d3-xplained/src/Makefile b/boards/arm/sama5/sama5d3-xplained/src/Makefile
index 74dd01f0de..8a557aeba4 100644
--- a/boards/arm/sama5/sama5d3-xplained/src/Makefile
+++ b/boards/arm/sama5/sama5d3-xplained/src/Makefile
@@ -102,10 +102,6 @@ ifeq ($(CONFIG_USBMSC),y)
 CSRCS += sam_usbmsc.c
 endif
 
-ifeq ($(CONFIG_ARCH_FPU),y)
-CSRCS += sam_ostest.c
-endif
-
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += sam_autoleds.c
 else
diff --git a/boards/arm/sama5/sama5d3-xplained/src/sam_ostest.c b/boards/arm/sama5/sama5d3-xplained/src/sam_ostest.c
deleted file mode 100644
index 543347ba4f..0000000000
--- a/boards/arm/sama5/sama5d3-xplained/src/sam_ostest.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
- * boards/arm/sama5/sama5d3-xplained/src/sam_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <debug.h>
-
-#include <nuttx/irq.h>
-#include <arch/board/board.h>
-
-#include "arm_internal.h"
-#include "sama5d3-xplained.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && !defined(CONFIG_TESTING_OSTEST_FPUTESTDISABLE) && \
-    defined(CONFIG_TESTING_OSTEST_FPUSIZE) && defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (4*FPU_CONTEXT_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint32_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[REG_S0], (4*FPU_CONTEXT_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (4*FPU_CONTEXT_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/arm/sama5/sama5d3x-ek/src/Makefile b/boards/arm/sama5/sama5d3x-ek/src/Makefile
index 6c6b035a28..71023e784e 100644
--- a/boards/arm/sama5/sama5d3x-ek/src/Makefile
+++ b/boards/arm/sama5/sama5d3x-ek/src/Makefile
@@ -120,10 +120,6 @@ ifeq ($(CONFIG_USBMSC),y)
 CSRCS += sam_usbmsc.c
 endif
 
-ifeq ($(CONFIG_ARCH_FPU),y)
-CSRCS += sam_ostest.c
-endif
-
 ifeq ($(CONFIG_SAMA5_TSD),y)
 CSRCS += sam_touchscreen.c
 endif
diff --git a/boards/arm/sama5/sama5d3x-ek/src/sam_ostest.c b/boards/arm/sama5/sama5d3x-ek/src/sam_ostest.c
deleted file mode 100644
index 4f7efeecc6..0000000000
--- a/boards/arm/sama5/sama5d3x-ek/src/sam_ostest.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
- * boards/arm/sama5/sama5d3x-ek/src/sam_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <debug.h>
-
-#include <nuttx/irq.h>
-#include <arch/board/board.h>
-
-#include "arm_internal.h"
-#include "sama5d3x-ek.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && !defined(CONFIG_TESTING_OSTEST_FPUTESTDISABLE) && \
-    defined(CONFIG_TESTING_OSTEST_FPUSIZE) && defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (4*FPU_CONTEXT_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint32_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[REG_S0], (4*FPU_CONTEXT_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (4*FPU_CONTEXT_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/arm/sama5/sama5d4-ek/src/Makefile b/boards/arm/sama5/sama5d4-ek/src/Makefile
index 9388bb3fd3..ee4f58cb85 100644
--- a/boards/arm/sama5/sama5d4-ek/src/Makefile
+++ b/boards/arm/sama5/sama5d4-ek/src/Makefile
@@ -116,10 +116,6 @@ ifeq ($(CONFIG_USBMSC),y)
 CSRCS += sam_usbmsc.c
 endif
 
-ifeq ($(CONFIG_ARCH_FPU),y)
-CSRCS += sam_ostest.c
-endif
-
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += sam_autoleds.c
 else
diff --git a/boards/arm/sama5/sama5d4-ek/src/sam_ostest.c b/boards/arm/sama5/sama5d4-ek/src/sam_ostest.c
deleted file mode 100644
index 03bd727574..0000000000
--- a/boards/arm/sama5/sama5d4-ek/src/sam_ostest.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
- * boards/arm/sama5/sama5d4-ek/src/sam_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <debug.h>
-
-#include <nuttx/irq.h>
-#include <arch/board/board.h>
-
-#include "arm_internal.h"
-#include "sama5d4-ek.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && !defined(CONFIG_TESTING_OSTEST_FPUTESTDISABLE) && \
-    defined(CONFIG_TESTING_OSTEST_FPUSIZE) && defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (4*FPU_CONTEXT_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint32_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[REG_S0], (4*FPU_CONTEXT_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (4*FPU_CONTEXT_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/arm/stm32/olimex-stm32-e407/src/Make.defs b/boards/arm/stm32/olimex-stm32-e407/src/Make.defs
index a7bb9d375b..69f09fd6df 100644
--- a/boards/arm/stm32/olimex-stm32-e407/src/Make.defs
+++ b/boards/arm/stm32/olimex-stm32-e407/src/Make.defs
@@ -60,10 +60,6 @@ ifeq ($(CONFIG_CAN),y)
 CSRCS += stm32_can.c
 endif
 
-ifeq ($(CONFIG_ARCH_FPU),y)
-CSRCS += stm32_ostest.c
-endif
-
 ifeq ($(CONFIG_DAC),y)
 CSRCS += stm32_dac.c
 endif
diff --git a/boards/arm/stm32/olimex-stm32-h407/src/Make.defs b/boards/arm/stm32/olimex-stm32-h407/src/Make.defs
index 941b2adcfd..1d83f6ebe9 100644
--- a/boards/arm/stm32/olimex-stm32-h407/src/Make.defs
+++ b/boards/arm/stm32/olimex-stm32-h407/src/Make.defs
@@ -64,10 +64,6 @@ ifeq ($(CONFIG_STM32_SDIO),y)
 CSRCS += stm32_sdio.c
 endif
 
-ifeq ($(CONFIG_ARCH_FPU),y)
-CSRCS += stm32_ostest.c
-endif
-
 DEPPATH += --dep-path board
 VPATH += :board
 CFLAGS += $(shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board)
diff --git a/boards/arm/stm32/omnibusf4/src/Make.defs b/boards/arm/stm32/omnibusf4/src/Make.defs
index 3e7e821550..405c979cca 100644
--- a/boards/arm/stm32/omnibusf4/src/Make.defs
+++ b/boards/arm/stm32/omnibusf4/src/Make.defs
@@ -60,10 +60,6 @@ ifeq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
 CSRCS += stm32_idle.c
 endif
 
-ifeq ($(CONFIG_TESTING_OSTEST),y)
-CSRCS += stm32_ostest.c
-endif
-
 ifeq ($(CONFIG_TIMER),y)
 CSRCS += stm32_timer.c
 endif
diff --git a/boards/arm/stm32/omnibusf4/src/stm32_ostest.c b/boards/arm/stm32/omnibusf4/src/stm32_ostest.c
deleted file mode 100644
index 45a854417e..0000000000
--- a/boards/arm/stm32/omnibusf4/src/stm32_ostest.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/****************************************************************************
- * boards/arm/stm32/omnibusf4/src/stm32_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <debug.h>
-
-#include <nuttx/irq.h>
-#include <arch/board/board.h>
-
-#include "arm_internal.h"
-#include "omnibusf4.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && \
-    !defined(CONFIG_TESTING_OSTEST_FPUTESTDISABLE) && \
-    defined(CONFIG_TESTING_OSTEST_FPUSIZE) && \
-    defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (4 * SW_FPU_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint32_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[REG_S0], (4*SW_FPU_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (4*SW_FPU_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/arm/stm32/stm3240g-eval/src/Make.defs b/boards/arm/stm32/stm3240g-eval/src/Make.defs
index bb1822e029..a235b8112c 100644
--- a/boards/arm/stm32/stm3240g-eval/src/Make.defs
+++ b/boards/arm/stm32/stm3240g-eval/src/Make.defs
@@ -57,10 +57,6 @@ ifeq ($(CONFIG_BOARDCTL),y)
 CSRCS += stm32_appinit.c
 endif
 
-ifeq ($(CONFIG_ARCH_FPU),y)
-CSRCS += stm32_ostest.c
-endif
-
 ifeq ($(CONFIG_INPUT_STMPE811),y)
 CSRCS += stm32_stmpe811.c
 endif
diff --git a/boards/arm/stm32/stm3240g-eval/src/stm32_ostest.c b/boards/arm/stm32/stm3240g-eval/src/stm32_ostest.c
deleted file mode 100644
index db0f92fa22..0000000000
--- a/boards/arm/stm32/stm3240g-eval/src/stm32_ostest.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
- * boards/arm/stm32/stm3240g-eval/src/stm32_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <debug.h>
-
-#include <nuttx/irq.h>
-#include <arch/board/board.h>
-
-#include "arm_internal.h"
-#include "stm3240g-eval.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && defined(CONFIG_TESTING_OSTEST_FPUSIZE) && \
-    defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (4*SW_FPU_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint32_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[REG_S0], (4*SW_FPU_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (4*SW_FPU_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/arm/stm32/stm32f429i-disco/src/Make.defs b/boards/arm/stm32/stm32f429i-disco/src/Make.defs
index 9d15d35b6c..6ce6c93cb7 100644
--- a/boards/arm/stm32/stm32f429i-disco/src/Make.defs
+++ b/boards/arm/stm32/stm32f429i-disco/src/Make.defs
@@ -63,10 +63,6 @@ ifeq ($(and \
 CSRCS += stm32_lcd.c
 endif
 
-ifeq ($(CONFIG_ARCH_FPU),y)
-CSRCS += stm32_ostest.c
-endif
-
 ifeq ($(CONFIG_PWM),y)
 CSRCS += stm32_pwm.c
 endif
diff --git a/boards/arm/stm32/stm32f429i-disco/src/stm32_ostest.c b/boards/arm/stm32/stm32f429i-disco/src/stm32_ostest.c
deleted file mode 100644
index 6c79bd6bee..0000000000
--- a/boards/arm/stm32/stm32f429i-disco/src/stm32_ostest.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
- * boards/arm/stm32/stm32f429i-disco/src/stm32_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <debug.h>
-
-#include <nuttx/irq.h>
-#include <arch/board/board.h>
-
-#include "arm_internal.h"
-#include "stm32f429i-disco.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && !defined(CONFIG_TESTING_OSTEST_FPUTESTDISABLE) && \
-    defined(CONFIG_TESTING_OSTEST_FPUSIZE) && defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (4*SW_FPU_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint32_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[REG_S0], (4*SW_FPU_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (4*SW_FPU_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/arm/stm32/stm32f4discovery/configs/wifi/defconfig b/boards/arm/stm32/stm32f4discovery/configs/wifi/defconfig
index f82dda52b0..346c91707f 100644
--- a/boards/arm/stm32/stm32f4discovery/configs/wifi/defconfig
+++ b/boards/arm/stm32/stm32f4discovery/configs/wifi/defconfig
@@ -100,7 +100,6 @@ CONFIG_SYSTEM_NSH_SYMTAB_ARRAYNAME="g_symtab"
 CONFIG_SYSTEM_NSH_SYMTAB_COUNTNAME="g_nsymbols"
 CONFIG_SYSTEM_NTPC=y
 CONFIG_TESTING_OSTEST=y
-CONFIG_TESTING_OSTEST_FPUSIZE=132
 CONFIG_USART2_RXBUFSIZE=128
 CONFIG_USART2_SERIAL_CONSOLE=y
 CONFIG_USART2_TXBUFSIZE=128
diff --git a/boards/arm/stm32/stm32f4discovery/src/Make.defs b/boards/arm/stm32/stm32f4discovery/src/Make.defs
index d0e06dc9da..89fb34f154 100644
--- a/boards/arm/stm32/stm32f4discovery/src/Make.defs
+++ b/boards/arm/stm32/stm32f4discovery/src/Make.defs
@@ -131,10 +131,6 @@ ifeq ($(CONFIG_LCD_UG2864HSWEG01),y)
 CSRCS += stm32_ug2864hsweg01.c
 endif
 
-ifeq ($(CONFIG_TESTING_OSTEST),y)
-CSRCS += stm32_ostest.c
-endif
-
 ifeq ($(CONFIG_TIMER),y)
 CSRCS += stm32_timer.c
 endif
diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_ostest.c b/boards/arm/stm32/stm32f4discovery/src/stm32_ostest.c
deleted file mode 100644
index 44af8111d9..0000000000
--- a/boards/arm/stm32/stm32f4discovery/src/stm32_ostest.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
- * boards/arm/stm32/stm32f4discovery/src/stm32_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <debug.h>
-
-#include <nuttx/irq.h>
-#include <arch/board/board.h>
-
-#include "arm_internal.h"
-#include "stm32f4discovery.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && !defined(CONFIG_TESTING_OSTEST_FPUTESTDISABLE) && \
-    defined(CONFIG_TESTING_OSTEST_FPUSIZE) && defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (4*SW_FPU_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint32_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[REG_S0], (4*SW_FPU_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (4*SW_FPU_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/arm/stm32f7/stm32f746g-disco/src/Makefile b/boards/arm/stm32f7/stm32f746g-disco/src/Makefile
index 7ce6fed1da..142e3d9729 100644
--- a/boards/arm/stm32f7/stm32f746g-disco/src/Makefile
+++ b/boards/arm/stm32f7/stm32f746g-disco/src/Makefile
@@ -40,10 +40,6 @@ ifeq ($(CONFIG_ADC),y)
 CSRCS += stm32_adc.c
 endif
 
-ifeq ($(CONFIG_ARCH_FPU),y)
-CSRCS += stm32_ostest.c
-endif
-
 ifeq ($(CONFIG_SPORADIC_INSTRUMENTATION),y)
 CSRCS += stm32_sporadic.c
 endif
diff --git a/boards/arm/stm32f7/stm32f746g-disco/src/stm32_ostest.c b/boards/arm/stm32f7/stm32f746g-disco/src/stm32_ostest.c
deleted file mode 100644
index 976450cd2b..0000000000
--- a/boards/arm/stm32f7/stm32f746g-disco/src/stm32_ostest.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
- * boards/arm/stm32f7/stm32f746g-disco/src/stm32_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <debug.h>
-
-#include <nuttx/irq.h>
-#include <arch/board/board.h>
-
-#include "arm_internal.h"
-#include "stm32f746g-disco.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && !defined(CONFIG_TESTING_OSTEST_FPUTESTDISABLE) && \
-    defined(CONFIG_TESTING_OSTEST_FPUSIZE) && defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (4*SW_FPU_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint32_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[REG_S0], (4*SW_FPU_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (4*SW_FPU_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/arm/stm32f7/stm32f769i-disco/src/Makefile b/boards/arm/stm32f7/stm32f769i-disco/src/Makefile
index 7df48a10a9..2c1888268f 100644
--- a/boards/arm/stm32f7/stm32f769i-disco/src/Makefile
+++ b/boards/arm/stm32f7/stm32f769i-disco/src/Makefile
@@ -36,10 +36,6 @@ ifeq ($(CONFIG_BOARDCTL),y)
 CSRCS += stm32_appinitialize.c
 endif
 
-ifeq ($(CONFIG_ARCH_FPU),y)
-CSRCS += stm32_ostest.c
-endif
-
 ifeq ($(CONFIG_PWM),y)
 CSRCS += stm32_pwm.c
 endif
diff --git a/boards/arm/stm32f7/stm32f769i-disco/src/stm32_ostest.c b/boards/arm/stm32f7/stm32f769i-disco/src/stm32_ostest.c
deleted file mode 100644
index 71cc535dbf..0000000000
--- a/boards/arm/stm32f7/stm32f769i-disco/src/stm32_ostest.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
- * boards/arm/stm32f7/stm32f769i-disco/src/stm32_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <debug.h>
-
-#include <nuttx/irq.h>
-#include <arch/board/board.h>
-
-#include "arm_internal.h"
-#include "stm32f769i-disco.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && !defined(CONFIG_TESTING_OSTEST_FPUTESTDISABLE) && \
-    defined(CONFIG_TESTING_OSTEST_FPUSIZE) && defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (4*SW_FPU_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint32_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[REG_S0], (4 * SW_FPU_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (4*SW_FPU_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/arm/stm32h7/nucleo-h743zi2/configs/jumbo/defconfig b/boards/arm/stm32h7/nucleo-h743zi2/configs/jumbo/defconfig
index b631fe000e..ee449cc203 100644
--- a/boards/arm/stm32h7/nucleo-h743zi2/configs/jumbo/defconfig
+++ b/boards/arm/stm32h7/nucleo-h743zi2/configs/jumbo/defconfig
@@ -130,7 +130,6 @@ CONFIG_TESTING_FSTEST_STACKSIZE=2048
 CONFIG_TESTING_GETPRIME=y
 CONFIG_TESTING_GETPRIME_STACKSIZE=2048
 CONFIG_TESTING_OSTEST=y
-CONFIG_TESTING_OSTEST_FPUSIZE=132
 CONFIG_TESTING_OSTEST_FPUSTACKSIZE=2048
 CONFIG_USART3_SERIAL_CONSOLE=y
 CONFIG_USBHOST=y
diff --git a/boards/arm/stm32h7/nucleo-h743zi2/src/Makefile b/boards/arm/stm32h7/nucleo-h743zi2/src/Makefile
index 609fd1701f..222e9f41c8 100644
--- a/boards/arm/stm32h7/nucleo-h743zi2/src/Makefile
+++ b/boards/arm/stm32h7/nucleo-h743zi2/src/Makefile
@@ -36,10 +36,6 @@ ifeq ($(CONFIG_BOARDCTL),y)
 CSRCS += stm32_appinitialize.c
 endif
 
-ifeq ($(CONFIG_TESTING_OSTEST),y)
-CSRCS += stm32_ostest.c
-endif
-
 ifeq ($(CONFIG_BOARDCTL_RESET),y)
 CSRCS += stm32_reset.c
 endif
diff --git a/boards/arm/stm32h7/nucleo-h743zi2/src/stm32_ostest.c b/boards/arm/stm32h7/nucleo-h743zi2/src/stm32_ostest.c
deleted file mode 100644
index 29e38ef2e0..0000000000
--- a/boards/arm/stm32h7/nucleo-h743zi2/src/stm32_ostest.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
- * boards/arm/stm32h7/nucleo-h743zi2/src/stm32_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <debug.h>
-
-#include <nuttx/irq.h>
-#include <arch/board/board.h>
-
-#include "arm_internal.h"
-#include "nucleo-h743zi2.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && !defined(CONFIG_TESTING_OSTEST_FPUTESTDISABLE) && \
-    defined(CONFIG_TESTING_OSTEST_FPUSIZE) && defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (4*SW_FPU_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint32_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[REG_S0], (4*SW_FPU_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (4*SW_FPU_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/arm/xmc4/xmc4500-relax/src/Makefile b/boards/arm/xmc4/xmc4500-relax/src/Makefile
index 463afc99a6..05d500d715 100644
--- a/boards/arm/xmc4/xmc4500-relax/src/Makefile
+++ b/boards/arm/xmc4/xmc4500-relax/src/Makefile
@@ -44,8 +44,4 @@ ifeq ($(CONFIG_BOARDCTL),y)
 CSRCS += xmc4_appinit.c
 endif
 
-ifeq ($(CONFIG_TESTING_OSTEST),y)
-CSRCS += xmc4_ostest.c
-endif
-
 include $(TOPDIR)/boards/Board.mk
diff --git a/boards/arm/xmc4/xmc4500-relax/src/xmc4_ostest.c b/boards/arm/xmc4/xmc4500-relax/src/xmc4_ostest.c
deleted file mode 100644
index a7a9a7d72f..0000000000
--- a/boards/arm/xmc4/xmc4500-relax/src/xmc4_ostest.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
- * boards/arm/xmc4/xmc4500-relax/src/xmc4_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <debug.h>
-
-#include <nuttx/irq.h>
-#include <arch/board/board.h>
-
-#include "arm_internal.h"
-#include "xmc4500-relax.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && !defined(CONFIG_TESTING_OSTEST_FPUTESTDISABLE) && \
-    defined(CONFIG_TESTING_OSTEST_FPUSIZE) && defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (4*SW_FPU_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint32_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[REG_S0], (4*SW_FPU_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (4*SW_FPU_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/arm/xmc4/xmc4700-relax/src/Makefile b/boards/arm/xmc4/xmc4700-relax/src/Makefile
index 38ec1525a3..ea8d4fb4af 100644
--- a/boards/arm/xmc4/xmc4700-relax/src/Makefile
+++ b/boards/arm/xmc4/xmc4700-relax/src/Makefile
@@ -36,8 +36,4 @@ ifeq ($(CONFIG_BOARDCTL),y)
 CSRCS += xmc4_appinit.c
 endif
 
-ifeq ($(CONFIG_TESTING_OSTEST),y)
-CSRCS += xmc4_ostest.c
-endif
-
 include $(TOPDIR)/boards/Board.mk
diff --git a/boards/arm/xmc4/xmc4700-relax/src/xmc4_ostest.c b/boards/arm/xmc4/xmc4700-relax/src/xmc4_ostest.c
deleted file mode 100644
index bb860e0e13..0000000000
--- a/boards/arm/xmc4/xmc4700-relax/src/xmc4_ostest.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
- * boards/arm/xmc4/xmc4700-relax/src/xmc4_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <debug.h>
-
-#include <nuttx/irq.h>
-#include <arch/board/board.h>
-
-#include "arm_internal.h"
-#include "xmc4700-relax.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && !defined(CONFIG_TESTING_OSTEST_FPUTESTDISABLE) && \
-    defined(CONFIG_TESTING_OSTEST_FPUSIZE) && defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (4*SW_FPU_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint32_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[REG_S0], (4*SW_FPU_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (4*SW_FPU_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/risc-v/bl602/bl602evb/configs/elf/defconfig b/boards/risc-v/bl602/bl602evb/configs/elf/defconfig
index 89e0f7906b..a04e406f28 100644
--- a/boards/risc-v/bl602/bl602evb/configs/elf/defconfig
+++ b/boards/risc-v/bl602/bl602evb/configs/elf/defconfig
@@ -66,7 +66,6 @@ CONFIG_TASK_NAME_SIZE=12
 CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=8192
 CONFIG_TESTING_GETPRIME=y
 CONFIG_TESTING_OSTEST=y
-CONFIG_TESTING_OSTEST_FPUSIZE=132
 CONFIG_TIMER=y
 CONFIG_TIMER_ARCH=y
 CONFIG_UART0_BAUD=2000000
diff --git a/boards/risc-v/bl602/bl602evb/configs/fpu/defconfig b/boards/risc-v/bl602/bl602evb/configs/fpu/defconfig
index 664023349b..37583ab44a 100644
--- a/boards/risc-v/bl602/bl602evb/configs/fpu/defconfig
+++ b/boards/risc-v/bl602/bl602evb/configs/fpu/defconfig
@@ -59,7 +59,6 @@ CONFIG_TASK_NAME_SIZE=12
 CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=8192
 CONFIG_TESTING_GETPRIME=y
 CONFIG_TESTING_OSTEST=y
-CONFIG_TESTING_OSTEST_FPUSIZE=132
 CONFIG_TIMER=y
 CONFIG_TIMER_ARCH=y
 CONFIG_UART0_BAUD=2000000
diff --git a/boards/risc-v/bl602/bl602evb/configs/wifi/defconfig b/boards/risc-v/bl602/bl602evb/configs/wifi/defconfig
index c9f1a05033..e5fa4e0380 100644
--- a/boards/risc-v/bl602/bl602evb/configs/wifi/defconfig
+++ b/boards/risc-v/bl602/bl602evb/configs/wifi/defconfig
@@ -128,7 +128,6 @@ CONFIG_TASK_NAME_SIZE=12
 CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=8192
 CONFIG_TESTING_MM=y
 CONFIG_TESTING_OSTEST=y
-CONFIG_TESTING_OSTEST_FPUSIZE=132
 CONFIG_UART0_BAUD=2000000
 CONFIG_UART0_RXBUFSIZE=128
 CONFIG_UART0_SERIAL_CONSOLE=y
diff --git a/boards/risc-v/bl602/bl602evb/src/Makefile b/boards/risc-v/bl602/bl602evb/src/Makefile
index 0fd6eb4275..8cfa6cee63 100644
--- a/boards/risc-v/bl602/bl602evb/src/Makefile
+++ b/boards/risc-v/bl602/bl602evb/src/Makefile
@@ -33,8 +33,4 @@ ifeq ($(CONFIG_DEV_GPIO),y)
 CSRCS += bl602_gpio.c
 endif
 
-ifeq ($(CONFIG_ARCH_FPU),y)
-CSRCS += bl602_ostest.c
-endif
-
 include $(TOPDIR)/boards/Board.mk
diff --git a/boards/risc-v/bl602/bl602evb/src/bl602_ostest.c b/boards/risc-v/bl602/bl602evb/src/bl602_ostest.c
deleted file mode 100644
index 64805b5dec..0000000000
--- a/boards/risc-v/bl602/bl602evb/src/bl602_ostest.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
- * boards/risc-v/bl602/bl602evb/src/bl602_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <syscall.h>
-
-#include <nuttx/irq.h>
-
-#include "riscv_internal.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && \
-    !defined(CONFIG_TESTING_OSTEST_FPUTESTDISABLE) && \
-    defined(CONFIG_TESTING_OSTEST_FPUSIZE) && \
-    defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (4 * FPU_XCPT_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint32_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[INT_XCPT_REGS], (4*FPU_XCPT_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (4*FPU_XCPT_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/risc-v/c906/smartl-c906/configs/elf/defconfig b/boards/risc-v/c906/smartl-c906/configs/elf/defconfig
index 62d7a1cbd4..a75a2cfa7c 100644
--- a/boards/risc-v/c906/smartl-c906/configs/elf/defconfig
+++ b/boards/risc-v/c906/smartl-c906/configs/elf/defconfig
@@ -63,5 +63,4 @@ 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/c906/smartl-c906/configs/fpu/defconfig b/boards/risc-v/c906/smartl-c906/configs/fpu/defconfig
index d10e626689..0bee31ed59 100644
--- a/boards/risc-v/c906/smartl-c906/configs/fpu/defconfig
+++ b/boards/risc-v/c906/smartl-c906/configs/fpu/defconfig
@@ -57,5 +57,4 @@ 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/c906/smartl-c906/configs/knsh/defconfig b/boards/risc-v/c906/smartl-c906/configs/knsh/defconfig
index 441d885080..48ef0eaca1 100644
--- a/boards/risc-v/c906/smartl-c906/configs/knsh/defconfig
+++ b/boards/risc-v/c906/smartl-c906/configs/knsh/defconfig
@@ -61,5 +61,4 @@ 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/c906/smartl-c906/configs/module/defconfig b/boards/risc-v/c906/smartl-c906/configs/module/defconfig
index 7f7238ef20..c4bd41717e 100644
--- a/boards/risc-v/c906/smartl-c906/configs/module/defconfig
+++ b/boards/risc-v/c906/smartl-c906/configs/module/defconfig
@@ -65,5 +65,4 @@ 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/c906/smartl-c906/configs/nsh/defconfig b/boards/risc-v/c906/smartl-c906/configs/nsh/defconfig
index 8cbacfd62e..193335211f 100644
--- a/boards/risc-v/c906/smartl-c906/configs/nsh/defconfig
+++ b/boards/risc-v/c906/smartl-c906/configs/nsh/defconfig
@@ -56,5 +56,4 @@ 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/c906/smartl-c906/configs/sotest/defconfig b/boards/risc-v/c906/smartl-c906/configs/sotest/defconfig
index 1327054682..fb24a30245 100644
--- a/boards/risc-v/c906/smartl-c906/configs/sotest/defconfig
+++ b/boards/risc-v/c906/smartl-c906/configs/sotest/defconfig
@@ -63,5 +63,4 @@ 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/c906/smartl-c906/src/Makefile b/boards/risc-v/c906/smartl-c906/src/Makefile
index 86dffec6b3..78c59d08ee 100644
--- a/boards/risc-v/c906/smartl-c906/src/Makefile
+++ b/boards/risc-v/c906/smartl-c906/src/Makefile
@@ -30,8 +30,4 @@ ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += c906_leds.c
 endif
 
-ifeq ($(CONFIG_ARCH_FPU),y)
-CSRCS += c906_ostest.c
-endif
-
 include $(TOPDIR)/boards/Board.mk
diff --git a/boards/risc-v/c906/smartl-c906/src/c906_ostest.c b/boards/risc-v/c906/smartl-c906/src/c906_ostest.c
deleted file mode 100644
index ea670d5bca..0000000000
--- a/boards/risc-v/c906/smartl-c906/src/c906_ostest.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
- * boards/risc-v/c906/smartl-c906/src/c906_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <syscall.h>
-
-#include <nuttx/irq.h>
-
-#include "riscv_internal.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && \
-    !defined(CONFIG_TESTING_OSTEST_FPUTESTDISABLE) && \
-    defined(CONFIG_TESTING_OSTEST_FPUSIZE) && \
-    defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (8 * FPU_XCPT_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uintptr_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[INT_XCPT_REGS], INT_REG_SIZE * FPU_XCPT_REGS);
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, INT_REG_SIZE * FPU_XCPT_REGS) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/risc-v/mpfs/common/src/Make.defs b/boards/risc-v/mpfs/common/src/Make.defs
index 2d9465b58a..6505f67246 100755
--- a/boards/risc-v/mpfs/common/src/Make.defs
+++ b/boards/risc-v/mpfs/common/src/Make.defs
@@ -26,10 +26,6 @@ ifeq ($(CONFIG_I2C),y)
 CSRCS += mpfs_i2c.c
 endif
 
-ifeq ($(CONFIG_ARCH_FPU),y)
-CSRCS += mpfs_ostest.c
-endif
-
 ifeq ($(CONFIG_SPI),y)
 CSRCS += mpfs_board_spi.c
 endif
diff --git a/boards/risc-v/mpfs/common/src/mpfs_ostest.c b/boards/risc-v/mpfs/common/src/mpfs_ostest.c
deleted file mode 100755
index d85bc811ea..0000000000
--- a/boards/risc-v/mpfs/common/src/mpfs_ostest.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
- * boards/risc-v/mpfs/common/src/mpfs_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <syscall.h>
-
-#include <nuttx/irq.h>
-
-#include "riscv_internal.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && \
-    !defined(CONFIG_TESTING_OSTEST_FPUTESTDISABLE) && \
-    defined(CONFIG_TESTING_OSTEST_FPUSIZE) && \
-    defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (8 * FPU_XCPT_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uint64_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[INT_XCPT_REGS], (8 * FPU_XCPT_REGS));
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, (8 * FPU_XCPT_REGS)) == 0;
-}
-
-#endif /* HAVE_FPU */
diff --git a/boards/risc-v/mpfs/icicle/configs/knsh/defconfig b/boards/risc-v/mpfs/icicle/configs/knsh/defconfig
index e53d5639d9..9223c2e221 100644
--- a/boards/risc-v/mpfs/icicle/configs/knsh/defconfig
+++ b/boards/risc-v/mpfs/icicle/configs/knsh/defconfig
@@ -78,5 +78,4 @@ CONFIG_SYSTEM_TIME64=y
 CONFIG_TASK_NAME_SIZE=20
 CONFIG_TESTING_GETPRIME=y
 CONFIG_TESTING_OSTEST=y
-CONFIG_TESTING_OSTEST_FPUSIZE=264
 CONFIG_UART1_SERIAL_CONSOLE=y
diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/nsh/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/nsh/defconfig
index b4544075c3..811017d354 100644
--- a/boards/risc-v/qemu-rv/rv-virt/configs/nsh/defconfig
+++ b/boards/risc-v/qemu-rv/rv-virt/configs/nsh/defconfig
@@ -66,5 +66,4 @@ CONFIG_START_MONTH=12
 CONFIG_START_YEAR=2021
 CONFIG_SYSTEM_NSH=y
 CONFIG_TESTING_OSTEST=y
-CONFIG_TESTING_OSTEST_FPUSIZE=528
 CONFIG_USEC_PER_TICK=1000
diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/nsh64/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/nsh64/defconfig
index f621901598..2da99c0238 100644
--- a/boards/risc-v/qemu-rv/rv-virt/configs/nsh64/defconfig
+++ b/boards/risc-v/qemu-rv/rv-virt/configs/nsh64/defconfig
@@ -68,5 +68,4 @@ CONFIG_START_YEAR=2021
 CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_NSH_STACKSIZE=3072
 CONFIG_TESTING_OSTEST=y
-CONFIG_TESTING_OSTEST_FPUSIZE=264
 CONFIG_USEC_PER_TICK=1000
diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/smp/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/smp/defconfig
index 6830e95321..09cbeb0503 100644
--- a/boards/risc-v/qemu-rv/rv-virt/configs/smp/defconfig
+++ b/boards/risc-v/qemu-rv/rv-virt/configs/smp/defconfig
@@ -68,6 +68,5 @@ CONFIG_START_MONTH=12
 CONFIG_START_YEAR=2021
 CONFIG_SYSTEM_NSH=y
 CONFIG_TESTING_OSTEST=y
-CONFIG_TESTING_OSTEST_FPUSIZE=528
 CONFIG_TESTING_SMP=y
 CONFIG_USEC_PER_TICK=1000
diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/smp64/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/smp64/defconfig
index e9a7d67d2b..3b5cd2ddce 100644
--- a/boards/risc-v/qemu-rv/rv-virt/configs/smp64/defconfig
+++ b/boards/risc-v/qemu-rv/rv-virt/configs/smp64/defconfig
@@ -70,6 +70,5 @@ CONFIG_START_YEAR=2021
 CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_NSH_STACKSIZE=3072
 CONFIG_TESTING_OSTEST=y
-CONFIG_TESTING_OSTEST_FPUSIZE=264
 CONFIG_TESTING_SMP=y
 CONFIG_USEC_PER_TICK=1000
diff --git a/boards/risc-v/qemu-rv/rv-virt/src/Makefile b/boards/risc-v/qemu-rv/rv-virt/src/Makefile
index d8a56d84cc..2dc661b928 100644
--- a/boards/risc-v/qemu-rv/rv-virt/src/Makefile
+++ b/boards/risc-v/qemu-rv/rv-virt/src/Makefile
@@ -22,6 +22,6 @@ include $(TOPDIR)/Make.defs
 
 RCSRCS = etc/init.d/rcS
 
-CSRCS = qemu_rv_appinit.c qemu_rv_ostest.c
+CSRCS = qemu_rv_appinit.c
 
 include $(TOPDIR)/boards/Board.mk
diff --git a/boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_ostest.c b/boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_ostest.c
deleted file mode 100644
index e2dd2165a0..0000000000
--- a/boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_ostest.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
- * boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_ostest.c
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-#include <syscall.h>
-
-#include <nuttx/irq.h>
-
-#include "riscv_internal.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#undef HAVE_FPU
-#if defined(CONFIG_ARCH_FPU) && \
-    !defined(CONFIG_TESTING_OSTEST_FPUTESTDISABLE) && \
-    defined(CONFIG_TESTING_OSTEST_FPUSIZE) && \
-    defined(CONFIG_SCHED_WAITPID)
-#    define HAVE_FPU 1
-#endif
-
-#ifdef HAVE_FPU
-
-#if CONFIG_TESTING_OSTEST_FPUSIZE != (8 * FPU_XCPT_REGS)
-#  error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size"
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static uintptr_t g_saveregs[XCPTCONTEXT_REGS];
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will
- * return the current FPU registers.
- */
-
-void arch_getfpu(FAR uint32_t *fpusave)
-{
-  irqstate_t flags;
-
-  /* Take a snapshot of the thread context right now */
-
-  flags = enter_critical_section();
-  up_saveusercontext(g_saveregs);
-
-  /* Return only the floating register values */
-
-  memcpy(fpusave, &g_saveregs[INT_XCPT_REGS], INT_REG_SIZE * FPU_XCPT_REGS);
-  leave_critical_section(flags);
-}
-
-/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function
- * will compare them and return true if they are identical.
- */
-
-bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
-{
-  return memcmp(fpusave1, fpusave2, INT_REG_SIZE * FPU_XCPT_REGS) == 0;
-}
-
-#endif /* HAVE_FPU */


[incubator-nuttx] 03/03: board/arch_fpu*: move arch_[get|cmp]fpu to common arch

Posted by xi...@apache.org.
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

commit 29005bd79fcb05d25b92bed39693c5245a9cf505
Author: chao.an <an...@xiaomi.com>
AuthorDate: Fri Apr 15 22:35:54 2022 +0800

    board/arch_fpu*: move arch_[get|cmp]fpu to common arch
    
    rename the arch api:
    arch_getfpu  -> up_saveusercontext
    arch_cmpfpu  -> up_cmpfpu
    
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 arch/arm/include/armv7-m/irq_cmnvector.h |  2 ++
 arch/arm/include/armv7-m/irq_lazyfpu.h   |  2 ++
 arch/arm/include/armv8-m/irq_cmnvector.h |  2 ++
 arch/arm/include/armv8-m/irq_lazyfpu.h   |  2 ++
 arch/arm/src/a1x/Make.defs               |  1 +
 arch/arm/src/am335x/Make.defs            |  1 +
 arch/arm/src/common/arm_fpucmp.c         | 59 ++++++++++++++++++++++++++++++++
 arch/arm/src/cxd56xx/Make.defs           |  1 +
 arch/arm/src/efm32/Make.defs             |  1 +
 arch/arm/src/eoss3/Make.defs             |  1 +
 arch/arm/src/imx6/Make.defs              |  1 +
 arch/arm/src/imxrt/Make.defs             |  1 +
 arch/arm/src/kinetis/Make.defs           |  1 +
 arch/arm/src/lpc17xx_40xx/Make.defs      |  1 +
 arch/arm/src/lpc43xx/Make.defs           |  1 +
 arch/arm/src/lpc54xx/Make.defs           |  1 +
 arch/arm/src/max326xx/Make.defs          |  1 +
 arch/arm/src/nrf52/Make.defs             |  1 +
 arch/arm/src/s32k1xx/Make.defs           |  1 +
 arch/arm/src/sam34/Make.defs             |  1 +
 arch/arm/src/sama5/Make.defs             |  1 +
 arch/arm/src/samd5e5/Make.defs           |  1 +
 arch/arm/src/samv7/Make.defs             |  1 +
 arch/arm/src/stm32/Make.defs             |  1 +
 arch/arm/src/stm32f7/Make.defs           |  1 +
 arch/arm/src/stm32h7/Make.defs           |  1 +
 arch/arm/src/stm32l4/Make.defs           |  1 +
 arch/arm/src/stm32l5/Make.defs           |  1 +
 arch/arm/src/stm32u5/Make.defs           |  1 +
 arch/arm/src/tiva/Make.defs              |  1 +
 arch/arm/src/tms570/Make.defs            |  1 +
 arch/arm/src/xmc4/Make.defs              |  1 +
 arch/risc-v/src/bl602/Make.defs          |  1 +
 arch/risc-v/src/c906/Make.defs           |  1 +
 arch/risc-v/src/common/riscv_fpucmp.c    | 59 ++++++++++++++++++++++++++++++++
 arch/risc-v/src/mpfs/Make.defs           |  1 +
 arch/risc-v/src/qemu-rv/Make.defs        |  1 +
 include/nuttx/arch.h                     | 14 ++++++++
 38 files changed, 171 insertions(+)

diff --git a/arch/arm/include/armv7-m/irq_cmnvector.h b/arch/arm/include/armv7-m/irq_cmnvector.h
index 93b3835739..4c923e3d83 100644
--- a/arch/arm/include/armv7-m/irq_cmnvector.h
+++ b/arch/arm/include/armv7-m/irq_cmnvector.h
@@ -133,6 +133,8 @@
 #define XCPTCONTEXT_REGS    (HW_XCPT_REGS + SW_XCPT_REGS)
 #define XCPTCONTEXT_SIZE    (4 * XCPTCONTEXT_REGS)
 
+#define FPU_CONTEXT_REGS    SW_FPU_REGS
+
 /****************************************************************************
  * Public Types
  ****************************************************************************/
diff --git a/arch/arm/include/armv7-m/irq_lazyfpu.h b/arch/arm/include/armv7-m/irq_lazyfpu.h
index d632d4c8a2..0b2b2611e0 100644
--- a/arch/arm/include/armv7-m/irq_lazyfpu.h
+++ b/arch/arm/include/armv7-m/irq_lazyfpu.h
@@ -151,6 +151,8 @@
 #define XCPTCONTEXT_REGS    (HW_XCPT_REGS + SW_XCPT_REGS)
 #define XCPTCONTEXT_SIZE    (HW_XCPT_SIZE + SW_XCPT_SIZE)
 
+#define FPU_CONTEXT_REGS    SW_FPU_REGS
+
 /****************************************************************************
  * Public Types
  ****************************************************************************/
diff --git a/arch/arm/include/armv8-m/irq_cmnvector.h b/arch/arm/include/armv8-m/irq_cmnvector.h
index 9956374d43..c64467689f 100644
--- a/arch/arm/include/armv8-m/irq_cmnvector.h
+++ b/arch/arm/include/armv8-m/irq_cmnvector.h
@@ -139,6 +139,8 @@
 #define XCPTCONTEXT_REGS    (HW_XCPT_REGS + SW_XCPT_REGS)
 #define XCPTCONTEXT_SIZE    (4 * XCPTCONTEXT_REGS)
 
+#define FPU_CONTEXT_REGS    SW_FPU_REGS
+
 /****************************************************************************
  * Public Types
  ****************************************************************************/
diff --git a/arch/arm/include/armv8-m/irq_lazyfpu.h b/arch/arm/include/armv8-m/irq_lazyfpu.h
index 1f3f0c7774..5c159d6a45 100644
--- a/arch/arm/include/armv8-m/irq_lazyfpu.h
+++ b/arch/arm/include/armv8-m/irq_lazyfpu.h
@@ -157,6 +157,8 @@
 #define XCPTCONTEXT_REGS    (HW_XCPT_REGS + SW_XCPT_REGS)
 #define XCPTCONTEXT_SIZE    (HW_XCPT_SIZE + SW_XCPT_SIZE)
 
+#define FPU_CONTEXT_REGS    SW_FPU_REGS
+
 /****************************************************************************
  * Public Types
  ****************************************************************************/
diff --git a/arch/arm/src/a1x/Make.defs b/arch/arm/src/a1x/Make.defs
index 220bee2489..53c68204a1 100644
--- a/arch/arm/src/a1x/Make.defs
+++ b/arch/arm/src/a1x/Make.defs
@@ -105,6 +105,7 @@ CMN_CSRCS += arm_cache.c
 
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_savefpu.S arm_restorefpu.S
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 ifeq ($(CONFIG_STACK_COLORATION),y)
diff --git a/arch/arm/src/am335x/Make.defs b/arch/arm/src/am335x/Make.defs
index 81f6c36281..13bfad7d45 100644
--- a/arch/arm/src/am335x/Make.defs
+++ b/arch/arm/src/am335x/Make.defs
@@ -101,6 +101,7 @@ CMN_CSRCS += arm_cache.c
 
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_savefpu.S arm_restorefpu.S
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 ifeq ($(CONFIG_STACK_COLORATION),y)
diff --git a/arch/arm/src/common/arm_fpucmp.c b/arch/arm/src/common/arm_fpucmp.c
new file mode 100644
index 0000000000..9a69369eff
--- /dev/null
+++ b/arch/arm/src/common/arm_fpucmp.c
@@ -0,0 +1,59 @@
+/****************************************************************************
+ * arch/arm/src/common/arm_fpucmp.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <stdint.h>
+#include <string.h>
+#include <nuttx/irq.h>
+
+#include "arm_internal.h"
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#ifdef CONFIG_ARCH_FPU
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: up_fpucmp
+ *
+ * Description:
+ *   compare FPU areas from thread context
+ *
+ ****************************************************************************/
+
+bool up_fpucmp(const void *saveregs1, const void *saveregs2)
+{
+  const uint32_t *regs1 = saveregs1;
+  const uint32_t *regs2 = saveregs2;
+
+  return memcmp(&regs1[REG_S0],
+                &regs2[REG_S0], (4 * FPU_CONTEXT_REGS)) == 0;
+}
+#endif /* CONFIG_ARCH_FPU */
diff --git a/arch/arm/src/cxd56xx/Make.defs b/arch/arm/src/cxd56xx/Make.defs
index 629abecfa5..68105f0ed3 100644
--- a/arch/arm/src/cxd56xx/Make.defs
+++ b/arch/arm/src/cxd56xx/Make.defs
@@ -63,6 +63,7 @@ endif
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_fpu.S
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 ifeq ($(CONFIG_ARMV7M_ITMSYSLOG),y)
diff --git a/arch/arm/src/efm32/Make.defs b/arch/arm/src/efm32/Make.defs
index 03d70d30ca..4a47269488 100644
--- a/arch/arm/src/efm32/Make.defs
+++ b/arch/arm/src/efm32/Make.defs
@@ -59,6 +59,7 @@ endif
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_fpu.S
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 ifeq ($(CONFIG_ARMV7M_ITMSYSLOG),y)
diff --git a/arch/arm/src/eoss3/Make.defs b/arch/arm/src/eoss3/Make.defs
index b84a63a547..549b3fb97b 100644
--- a/arch/arm/src/eoss3/Make.defs
+++ b/arch/arm/src/eoss3/Make.defs
@@ -58,6 +58,7 @@ endif
 
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 CHIP_CSRCS  = eoss3_start.c eoss3_gpio.c eoss3_lowputc.c eoss3_clockconfig.c
diff --git a/arch/arm/src/imx6/Make.defs b/arch/arm/src/imx6/Make.defs
index deccf72e33..68a0bfd519 100644
--- a/arch/arm/src/imx6/Make.defs
+++ b/arch/arm/src/imx6/Make.defs
@@ -125,6 +125,7 @@ endif
 
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_savefpu.S arm_restorefpu.S
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 ifeq ($(CONFIG_STACK_COLORATION),y)
diff --git a/arch/arm/src/imxrt/Make.defs b/arch/arm/src/imxrt/Make.defs
index e2efb5adb0..37f0ae6b91 100644
--- a/arch/arm/src/imxrt/Make.defs
+++ b/arch/arm/src/imxrt/Make.defs
@@ -73,6 +73,7 @@ CMN_CSRCS += arm_cache.c
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_fpu.S
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 # Required i.MX RT files
diff --git a/arch/arm/src/kinetis/Make.defs b/arch/arm/src/kinetis/Make.defs
index 55172b856c..0863ef844c 100644
--- a/arch/arm/src/kinetis/Make.defs
+++ b/arch/arm/src/kinetis/Make.defs
@@ -77,6 +77,7 @@ endif
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_fpu.S
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 ifeq ($(CONFIG_ARMV7M_ITMSYSLOG),y)
diff --git a/arch/arm/src/lpc17xx_40xx/Make.defs b/arch/arm/src/lpc17xx_40xx/Make.defs
index 1e680a1b0b..c5552bc8a3 100644
--- a/arch/arm/src/lpc17xx_40xx/Make.defs
+++ b/arch/arm/src/lpc17xx_40xx/Make.defs
@@ -75,6 +75,7 @@ endif
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_fpu.S
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 # Required LPC17xx files
diff --git a/arch/arm/src/lpc43xx/Make.defs b/arch/arm/src/lpc43xx/Make.defs
index 220feb5e0f..71a3582d7f 100644
--- a/arch/arm/src/lpc43xx/Make.defs
+++ b/arch/arm/src/lpc43xx/Make.defs
@@ -63,6 +63,7 @@ endif
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_fpu.S
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 CHIP_CSRCS  = lpc43_allocateheap.c lpc43_cgu.c lpc43_clrpend.c lpc43_gpio.c
diff --git a/arch/arm/src/lpc54xx/Make.defs b/arch/arm/src/lpc54xx/Make.defs
index 41f2299fda..8b515c3837 100644
--- a/arch/arm/src/lpc54xx/Make.defs
+++ b/arch/arm/src/lpc54xx/Make.defs
@@ -63,6 +63,7 @@ endif
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_fpu.S
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 CHIP_CSRCS  = lpc54_start.c lpc54_clockconfig.c lpc54_irq.c lpc54_clrpend.c
diff --git a/arch/arm/src/max326xx/Make.defs b/arch/arm/src/max326xx/Make.defs
index 3a6d376126..f7bc59918f 100644
--- a/arch/arm/src/max326xx/Make.defs
+++ b/arch/arm/src/max326xx/Make.defs
@@ -61,6 +61,7 @@ endif
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_fpu.S
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 # Common MAX326XX Source Files
diff --git a/arch/arm/src/nrf52/Make.defs b/arch/arm/src/nrf52/Make.defs
index c7f225fb9b..887fc836a2 100644
--- a/arch/arm/src/nrf52/Make.defs
+++ b/arch/arm/src/nrf52/Make.defs
@@ -71,6 +71,7 @@ endif
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_fpu.S
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 CHIP_CSRCS  = nrf52_start.c nrf52_clockconfig.c nrf52_irq.c nrf52_utils.c
diff --git a/arch/arm/src/s32k1xx/Make.defs b/arch/arm/src/s32k1xx/Make.defs
index 555f948a3d..e49d552069 100644
--- a/arch/arm/src/s32k1xx/Make.defs
+++ b/arch/arm/src/s32k1xx/Make.defs
@@ -40,6 +40,7 @@ endif
 
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 # Source files common to all S32K1xx chip families.
diff --git a/arch/arm/src/sam34/Make.defs b/arch/arm/src/sam34/Make.defs
index 2cbeb3b579..a390e7a26f 100644
--- a/arch/arm/src/sam34/Make.defs
+++ b/arch/arm/src/sam34/Make.defs
@@ -67,6 +67,7 @@ endif
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_fpu.S
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 ifeq ($(CONFIG_SCHED_BACKTRACE),y)
diff --git a/arch/arm/src/sama5/Make.defs b/arch/arm/src/sama5/Make.defs
index 1aca3b5939..e6657f9f81 100644
--- a/arch/arm/src/sama5/Make.defs
+++ b/arch/arm/src/sama5/Make.defs
@@ -107,6 +107,7 @@ CMN_CSRCS += arm_cache.c
 
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_savefpu.S arm_restorefpu.S
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 ifeq ($(CONFIG_STACK_COLORATION),y)
diff --git a/arch/arm/src/samd5e5/Make.defs b/arch/arm/src/samd5e5/Make.defs
index d224240307..afa67f1b42 100644
--- a/arch/arm/src/samd5e5/Make.defs
+++ b/arch/arm/src/samd5e5/Make.defs
@@ -57,6 +57,7 @@ endif
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_fpu.S
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 ifeq ($(CONFIG_SCHED_BACKTRACE),y)
diff --git a/arch/arm/src/samv7/Make.defs b/arch/arm/src/samv7/Make.defs
index 7ff7c5084d..67d481e3b5 100644
--- a/arch/arm/src/samv7/Make.defs
+++ b/arch/arm/src/samv7/Make.defs
@@ -62,6 +62,7 @@ CMN_CSRCS += arm_cache.c
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_fpu.S
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 ifeq ($(CONFIG_ARCH_RAMVECTORS),y)
diff --git a/arch/arm/src/stm32/Make.defs b/arch/arm/src/stm32/Make.defs
index 6b73ca5a58..0103951438 100644
--- a/arch/arm/src/stm32/Make.defs
+++ b/arch/arm/src/stm32/Make.defs
@@ -71,6 +71,7 @@ endif
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_fpu.S
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 ifeq ($(CONFIG_ARMV7M_ITMSYSLOG),y)
diff --git a/arch/arm/src/stm32f7/Make.defs b/arch/arm/src/stm32f7/Make.defs
index 80ccb1d381..f0178c78cf 100644
--- a/arch/arm/src/stm32f7/Make.defs
+++ b/arch/arm/src/stm32f7/Make.defs
@@ -62,6 +62,7 @@ CMN_CSRCS += arm_cache.c
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_fpu.S
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 ifeq ($(CONFIG_ARCH_RAMVECTORS),y)
diff --git a/arch/arm/src/stm32h7/Make.defs b/arch/arm/src/stm32h7/Make.defs
index 48b601c932..78831a876a 100644
--- a/arch/arm/src/stm32h7/Make.defs
+++ b/arch/arm/src/stm32h7/Make.defs
@@ -62,6 +62,7 @@ CMN_CSRCS += arm_cache.c
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_fpu.S
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
diff --git a/arch/arm/src/stm32l4/Make.defs b/arch/arm/src/stm32l4/Make.defs
index f9d97f4e44..54d33c6084 100644
--- a/arch/arm/src/stm32l4/Make.defs
+++ b/arch/arm/src/stm32l4/Make.defs
@@ -56,6 +56,7 @@ CMN_CSRCS += arm_vectors.c
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_fpu.S
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 ifeq ($(CONFIG_ARCH_RAMVECTORS),y)
diff --git a/arch/arm/src/stm32l5/Make.defs b/arch/arm/src/stm32l5/Make.defs
index 6cc506f49c..667fdf8476 100644
--- a/arch/arm/src/stm32l5/Make.defs
+++ b/arch/arm/src/stm32l5/Make.defs
@@ -61,6 +61,7 @@ CMN_CSRCS += arm_vectors.c
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_fpu.S
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 ifeq ($(CONFIG_ARCH_RAMVECTORS),y)
diff --git a/arch/arm/src/stm32u5/Make.defs b/arch/arm/src/stm32u5/Make.defs
index dc64268e0c..44c11dbba6 100644
--- a/arch/arm/src/stm32u5/Make.defs
+++ b/arch/arm/src/stm32u5/Make.defs
@@ -61,6 +61,7 @@ CMN_CSRCS += arm_vectors.c
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_fpu.S
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 ifeq ($(CONFIG_ARCH_RAMVECTORS),y)
diff --git a/arch/arm/src/tiva/Make.defs b/arch/arm/src/tiva/Make.defs
index a659f10e93..f4460dbbee 100644
--- a/arch/arm/src/tiva/Make.defs
+++ b/arch/arm/src/tiva/Make.defs
@@ -50,6 +50,7 @@ CMN_CSRCS += arm_vectors.c
 ifeq ($(CONFIG_ARCH_FPU),y)
   CMN_ASRCS += arm_fpu.S
   CMN_CSRCS += arm_fpuconfig.c
+  CMN_CSRCS += arm_fpucmp.c
 endif
 
 ifeq ($(CONFIG_ARCH_RAMVECTORS),y)
diff --git a/arch/arm/src/tms570/Make.defs b/arch/arm/src/tms570/Make.defs
index 02a35e37d3..96662935ee 100644
--- a/arch/arm/src/tms570/Make.defs
+++ b/arch/arm/src/tms570/Make.defs
@@ -73,6 +73,7 @@ CMN_CSRCS += arm_cache.c
 
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_savefpu.S arm_restorefpu.S
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 ifeq ($(CONFIG_SCHED_BACKTRACE),y)
diff --git a/arch/arm/src/xmc4/Make.defs b/arch/arm/src/xmc4/Make.defs
index fc4b2c0340..4d3830aa14 100644
--- a/arch/arm/src/xmc4/Make.defs
+++ b/arch/arm/src/xmc4/Make.defs
@@ -76,6 +76,7 @@ endif
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += arm_fpu.S
 CMN_CSRCS += arm_fpuconfig.c
+CMN_CSRCS += arm_fpucmp.c
 endif
 
 ifeq ($(CONFIG_ARMV7M_ITMSYSLOG),y)
diff --git a/arch/risc-v/src/bl602/Make.defs b/arch/risc-v/src/bl602/Make.defs
index a88690ecdf..1a6850d8ee 100644
--- a/arch/risc-v/src/bl602/Make.defs
+++ b/arch/risc-v/src/bl602/Make.defs
@@ -47,6 +47,7 @@ endif
 
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += riscv_fpu.S
+CMN_CSRCS += riscv_fpucmp.c
 endif
 
 ifeq ($(CONFIG_ARCH_HAVE_VFORK),y)
diff --git a/arch/risc-v/src/c906/Make.defs b/arch/risc-v/src/c906/Make.defs
index 6a1a84503e..52c7cac166 100644
--- a/arch/risc-v/src/c906/Make.defs
+++ b/arch/risc-v/src/c906/Make.defs
@@ -47,6 +47,7 @@ endif
 
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += riscv_fpu.S
+CMN_CSRCS += riscv_fpucmp.c
 endif
 
 ifeq ($(CONFIG_ARCH_HAVE_VFORK),y)
diff --git a/arch/risc-v/src/common/riscv_fpucmp.c b/arch/risc-v/src/common/riscv_fpucmp.c
new file mode 100644
index 0000000000..d37faefe91
--- /dev/null
+++ b/arch/risc-v/src/common/riscv_fpucmp.c
@@ -0,0 +1,59 @@
+/****************************************************************************
+ * arch/risc-v/src/common/riscv_fpucmp.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <stdint.h>
+#include <string.h>
+#include <nuttx/irq.h>
+
+#include "riscv_internal.h"
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#ifdef CONFIG_ARCH_FPU
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: up_fpucmp
+ *
+ * Description:
+ *   compare FPU areas from thread context
+ *
+ ****************************************************************************/
+
+bool up_fpucmp(const void *saveregs1, const void *saveregs2)
+{
+  const uintptr_t *regs1 = saveregs1;
+  const uintptr_t *regs2 = saveregs2;
+
+  return memcmp(&regs1[INT_XCPT_REGS], &regs2[INT_XCPT_REGS],
+                INT_REG_SIZE * FPU_XCPT_REGS) == 0;
+}
+#endif /* CONFIG_ARCH_FPU */
diff --git a/arch/risc-v/src/mpfs/Make.defs b/arch/risc-v/src/mpfs/Make.defs
index c95c8a6d1d..c58e938036 100755
--- a/arch/risc-v/src/mpfs/Make.defs
+++ b/arch/risc-v/src/mpfs/Make.defs
@@ -48,6 +48,7 @@ endif
 
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += riscv_fpu.S
+CMN_CSRCS += riscv_fpucmp.c
 endif
 
 ifeq ($(CONFIG_ARCH_HAVE_VFORK),y)
diff --git a/arch/risc-v/src/qemu-rv/Make.defs b/arch/risc-v/src/qemu-rv/Make.defs
index 89c251ae2b..0d4d701333 100644
--- a/arch/risc-v/src/qemu-rv/Make.defs
+++ b/arch/risc-v/src/qemu-rv/Make.defs
@@ -60,6 +60,7 @@ endif
 
 ifeq ($(CONFIG_ARCH_FPU),y)
 CMN_ASRCS += riscv_fpu.S
+CMN_CSRCS += riscv_fpucmp.c
 endif
 
 ifeq ($(CONFIG_ARCH_RV_ISA_A),y)
diff --git a/include/nuttx/arch.h b/include/nuttx/arch.h
index deb1ce5233..2a930d1e7d 100644
--- a/include/nuttx/arch.h
+++ b/include/nuttx/arch.h
@@ -2573,6 +2573,20 @@ void up_perf_convert(uint32_t elapsed, FAR struct timespec *ts);
 
 int up_saveusercontext(FAR void *saveregs);
 
+/****************************************************************************
+ * Name: up_fpucmp
+ *
+ * Description:
+ *   compare FPU areas from thread context
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_ARCH_FPU
+bool up_fpucmp(FAR const void *saveregs1, FAR const void *saveregs2);
+#else
+#define up_fpucmp(r1, r2) (true)
+#endif
+
 #undef EXTERN
 #if defined(__cplusplus)
 }