tests: float_disable: this is no longer applicable to RISC-V

With lazy FPU context switching, k_float_disable() is merely triggering
a synchronous FPU context save and k_float_enable() is a no-op.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit is contained in:
Nicolas Pitre 2023-01-19 13:22:45 -05:00 committed by Carles Cufí
commit 189fcbb3af
2 changed files with 5 additions and 7 deletions

View file

@ -14,7 +14,7 @@
*/
#define PRIORITY K_PRIO_COOP(0)
#if defined(CONFIG_ARM) || defined(CONFIG_RISCV) || defined(CONFIG_SPARC)
#if defined(CONFIG_ARM) || defined(CONFIG_SPARC)
#define K_FP_OPTS K_FP_REGS
#elif defined(CONFIG_X86)
#define K_FP_OPTS (K_FP_REGS | K_SSE_REGS)
@ -32,8 +32,7 @@ static void usr_fp_thread_entry_1(void)
k_yield();
}
#if defined(CONFIG_ARM) || defined(CONFIG_RISCV) || \
(defined(CONFIG_X86) && defined(CONFIG_LAZY_FPU_SHARING))
#if defined(CONFIG_ARM) || (defined(CONFIG_X86) && defined(CONFIG_LAZY_FPU_SHARING))
#define K_FLOAT_DISABLE_SYSCALL_RETVAL 0
#else
#define K_FLOAT_DISABLE_SYSCALL_RETVAL -ENOTSUP
@ -78,7 +77,7 @@ ZTEST(k_float_disable, test_k_float_disable_common)
"usr_fp_thread FP options not set (0x%0x)",
usr_fp_thread.base.user_options);
#if defined(CONFIG_ARM) || defined(CONFIG_RISCV)
#if defined(CONFIG_ARM)
/* Verify FP mode can only be disabled for current thread */
zassert_true((k_float_disable(&usr_fp_thread) == -EINVAL),
"k_float_disable() successful on thread other than current!");
@ -130,8 +129,7 @@ ZTEST(k_float_disable, test_k_float_disable_syscall)
/* Yield will swap-in usr_fp_thread */
k_yield();
#if defined(CONFIG_ARM) || defined(CONFIG_RISCV) || \
(defined(CONFIG_X86) && defined(CONFIG_LAZY_FPU_SHARING))
#if defined(CONFIG_ARM) || (defined(CONFIG_X86) && defined(CONFIG_LAZY_FPU_SHARING))
/* Verify K_FP_OPTS are now cleared by the user thread itself */
zassert_true(

View file

@ -2,7 +2,7 @@ common:
tags: fpu kernel userspace
tests:
kernel.fpu_sharing.float_disable:
arch_allow: arm riscv32 riscv64 sparc
arch_allow: arm sparc
filter: CONFIG_ARMV7_M_ARMV8_M_FP or CONFIG_ARMV7_R_FP or CONFIG_CPU_HAS_FPU
extra_configs:
- arch:arm:CONFIG_DYNAMIC_INTERRUPTS=y