From aaf93205bb86dfb358cfe61a2fc395dcbfec21e7 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Sun, 3 May 2020 18:03:19 +0900 Subject: [PATCH] kconfig: Rename CONFIG_FP_SHARING to CONFIG_FPU_SHARING This commit renames the Kconfig `FP_SHARING` symbol to `FPU_SHARING`, since this symbol specifically refers to the hardware FPU sharing support by means of FPU context preservation, and the "FP" prefix is not fully descriptive of that; leaving room for ambiguity. Signed-off-by: Stephanos Ioannidis --- arch/Kconfig | 2 +- arch/arc/core/offsets/offsets.c | 2 +- arch/arc/core/thread.c | 4 ++-- arch/arc/include/kernel_arch_data.h | 2 +- arch/arc/include/swap_macros.h | 4 ++-- arch/arm/core/aarch32/cortex_m/mpu/Kconfig | 4 ++-- .../core/aarch32/cortex_m/mpu/arm_core_mpu.c | 2 +- arch/arm/core/aarch32/fatal.c | 2 +- arch/arm/core/aarch32/prep_c.c | 6 +++--- arch/arm/core/aarch32/swap_helper.S | 6 +++--- arch/arm/core/aarch32/thread.c | 20 +++++++++---------- arch/arm/core/offsets/offsets_aarch32.c | 8 ++++---- arch/arm/include/aarch32/offsets_short_arch.h | 2 +- arch/posix/core/offsets/offsets.c | 2 +- arch/riscv/core/isr.S | 12 +++++------ arch/riscv/core/offsets/offsets.c | 4 ++-- arch/riscv/core/thread.c | 6 +++--- arch/riscv/include/offsets_short_arch.h | 4 ++-- arch/x86/core/Kconfig.ia32 | 2 +- arch/x86/core/ia32/float.c | 2 +- arch/x86/core/ia32/thread.c | 4 ++-- doc/reference/kernel/other/float.rst | 4 ++-- doc/zephyr.doxyfile.in | 2 +- include/arch/arm/aarch32/arch.h | 4 ++-- include/arch/arm/aarch32/exc.h | 2 +- include/arch/arm/aarch32/thread.h | 6 +++--- include/arch/riscv/exp.h | 4 ++-- include/arch/riscv/thread.h | 4 ++-- include/kernel.h | 4 ++-- include/kernel_structs.h | 2 +- kernel/include/kernel_arch_interface.h | 4 ++-- kernel/include/kernel_offsets.h | 2 +- kernel/thread.c | 4 ++-- subsys/debug/openocd.c | 2 +- .../arm/arm_thread_swap/src/arm_thread_arch.c | 18 ++++++++--------- tests/arch/arm/arm_thread_swap/testcase.yaml | 4 ++-- tests/benchmarks/app_kernel/prj_fp.conf | 2 +- tests/kernel/fatal/prj_arm_fp_sharing.conf | 2 +- tests/kernel/fatal/src/main.c | 8 ++++---- .../kernel/fp_sharing/float_disable/prj.conf | 2 +- .../fp_sharing/float_disable/prj_x86.conf | 2 +- tests/kernel/fp_sharing/generic/prj.conf | 2 +- tests/kernel/fp_sharing/generic/prj_x86.conf | 2 +- tests/kernel/fp_sharing/generic/src/main.c | 4 ++-- 44 files changed, 95 insertions(+), 95 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 4c4e467dbeb..04c0ec4e068 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -543,7 +543,7 @@ config FPU those platforms is dependent on the availability of the toolchain- provided software floating point library. -config FP_SHARING +config FPU_SHARING bool "FPU register sharing" depends on FPU help diff --git a/arch/arc/core/offsets/offsets.c b/arch/arc/core/offsets/offsets.c index 1f946aed986..23736f93362 100644 --- a/arch/arc/core/offsets/offsets.c +++ b/arch/arc/core/offsets/offsets.c @@ -104,7 +104,7 @@ GEN_OFFSET_SYM(_callee_saved_stack_t, r30); GEN_OFFSET_SYM(_callee_saved_stack_t, r58); GEN_OFFSET_SYM(_callee_saved_stack_t, r59); #endif -#ifdef CONFIG_FP_SHARING +#ifdef CONFIG_FPU_SHARING GEN_OFFSET_SYM(_callee_saved_stack_t, fpu_status); GEN_OFFSET_SYM(_callee_saved_stack_t, fpu_ctrl); #ifdef CONFIG_FP_FPU_DA diff --git a/arch/arc/core/thread.c b/arch/arc/core/thread.c index a4605c5741d..ab044ea1047 100644 --- a/arch/arc/core/thread.c +++ b/arch/arc/core/thread.c @@ -262,7 +262,7 @@ FUNC_NORETURN void arch_user_mode_enter(k_thread_entry_t user_entry, #endif -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) int arch_float_disable(struct k_thread *thread) { unsigned int key; @@ -295,4 +295,4 @@ int arch_float_enable(struct k_thread *thread) return 0; } -#endif /* CONFIG_FPU && CONFIG_FP_SHARING */ +#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */ diff --git a/arch/arc/include/kernel_arch_data.h b/arch/arc/include/kernel_arch_data.h index 804449cbdeb..cbf747e92ad 100644 --- a/arch/arc/include/kernel_arch_data.h +++ b/arch/arc/include/kernel_arch_data.h @@ -143,7 +143,7 @@ struct _callee_saved_stack { u32_t r59; #endif -#ifdef CONFIG_FP_SHARING +#ifdef CONFIG_FPU_SHARING u32_t fpu_status; u32_t fpu_ctrl; #ifdef CONFIG_FP_FPU_DA diff --git a/arch/arc/include/swap_macros.h b/arch/arc/include/swap_macros.h index 3fd38882701..7659390b2ab 100644 --- a/arch/arc/include/swap_macros.h +++ b/arch/arc/include/swap_macros.h @@ -63,7 +63,7 @@ st r59, [sp, ___callee_saved_stack_t_r59_OFFSET] #endif -#ifdef CONFIG_FP_SHARING +#ifdef CONFIG_FPU_SHARING ld_s r13, [r2, ___thread_base_t_user_options_OFFSET] /* K_FP_REGS is bit 1 */ bbit0 r13, 1, 1f @@ -99,7 +99,7 @@ ld r59, [sp, ___callee_saved_stack_t_r59_OFFSET] #endif -#ifdef CONFIG_FP_SHARING +#ifdef CONFIG_FPU_SHARING ld_s r13, [r2, ___thread_base_t_user_options_OFFSET] /* K_FP_REGS is bit 1 */ bbit0 r13, 1, 2f diff --git a/arch/arm/core/aarch32/cortex_m/mpu/Kconfig b/arch/arm/core/aarch32/cortex_m/mpu/Kconfig index 877b0b4588a..fd6bebbb6dc 100644 --- a/arch/arm/core/aarch32/cortex_m/mpu/Kconfig +++ b/arch/arm/core/aarch32/cortex_m/mpu/Kconfig @@ -63,7 +63,7 @@ config MPU_STACK_GUARD config MPU_STACK_GUARD_MIN_SIZE_FLOAT int depends on MPU_STACK_GUARD - depends on FP_SHARING + depends on FPU_SHARING default 128 help Minimum size (and alignment when applicable) of an ARM MPU @@ -72,7 +72,7 @@ config MPU_STACK_GUARD_MIN_SIZE_FLOAT 128, to accommodate the length of a Cortex-M exception stack frame when the floating point context is active. The FP context is only stacked in sharing FP registers mode, therefore, the - option is applicable only when FP_SHARING is selected. + option is applicable only when FPU_SHARING is selected. config MPU_ALLOW_FLASH_WRITE bool "Add MPU access to write to flash" diff --git a/arch/arm/core/aarch32/cortex_m/mpu/arm_core_mpu.c b/arch/arm/core/aarch32/cortex_m/mpu/arm_core_mpu.c index 982a04d6f26..117fd7ef054 100644 --- a/arch/arm/core/aarch32/cortex_m/mpu/arm_core_mpu.c +++ b/arch/arm/core/aarch32/cortex_m/mpu/arm_core_mpu.c @@ -215,7 +215,7 @@ void z_arm_configure_dynamic_mpu_regions(struct k_thread *thread) u32_t guard_start; u32_t guard_size = MPU_GUARD_ALIGN_AND_SIZE; -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) if ((thread->base.user_options & K_FP_REGS) != 0) { guard_size = MPU_GUARD_ALIGN_AND_SIZE_FLOAT; } diff --git a/arch/arm/core/aarch32/fatal.c b/arch/arm/core/aarch32/fatal.c index bd825b8abcd..849a4ee69c6 100644 --- a/arch/arm/core/aarch32/fatal.c +++ b/arch/arm/core/aarch32/fatal.c @@ -23,7 +23,7 @@ static void esf_dump(const z_arch_esf_t *esf) LOG_ERR("r3/a4: 0x%08x r12/ip: 0x%08x r14/lr: 0x%08x", esf->basic.a4, esf->basic.ip, esf->basic.lr); LOG_ERR(" xpsr: 0x%08x", esf->basic.xpsr); -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) for (int i = 0; i < 16; i += 4) { LOG_ERR("s[%2d]: 0x%08x s[%2d]: 0x%08x" " s[%2d]: 0x%08x s[%2d]: 0x%08x", diff --git a/arch/arm/core/aarch32/prep_c.c b/arch/arm/core/aarch32/prep_c.c index 707958378cd..a34cc2bc82d 100644 --- a/arch/arm/core/aarch32/prep_c.c +++ b/arch/arm/core/aarch32/prep_c.c @@ -102,7 +102,7 @@ static inline void z_arm_floating_point_init(void) * Upon reset, the FPU Context Control Register is 0xC0000000 * (both Automatic and Lazy state preservation is enabled). */ -#if !defined(CONFIG_FP_SHARING) +#if !defined(CONFIG_FPU_SHARING) /* Default mode is Unshared FP registers mode. We disable the * automatic stacking of FP registers (automatic setting of * FPCA bit in the CONTROL register), upon exception entries, @@ -125,7 +125,7 @@ static inline void z_arm_floating_point_init(void) * out during context-switch. */ FPU->FPCCR = FPU_FPCCR_ASPEN_Msk | FPU_FPCCR_LSPEN_Msk; -#endif /* CONFIG_FP_SHARING */ +#endif /* CONFIG_FPU_SHARING */ /* Make the side-effects of modifying the FPCCR be realized * immediately. @@ -154,7 +154,7 @@ static inline void z_arm_floating_point_init(void) * In Sharing FP Registers mode CONTROL.FPCA is cleared before switching * to main, so it may be skipped here (saving few boot cycles). */ -#if !defined(CONFIG_FPU) || !defined(CONFIG_FP_SHARING) +#if !defined(CONFIG_FPU) || !defined(CONFIG_FPU_SHARING) __set_CONTROL(__get_CONTROL() & (~(CONTROL_FPCA_Msk))); #endif } diff --git a/arch/arm/core/aarch32/swap_helper.S b/arch/arm/core/aarch32/swap_helper.S index 91bb49718af..c9ffe96b498 100644 --- a/arch/arm/core/aarch32/swap_helper.S +++ b/arch/arm/core/aarch32/swap_helper.S @@ -89,7 +89,7 @@ SECTION_FUNC(TEXT, z_arm_pendsv) stmea r0!, {r3-r7} #elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE) stmia r0, {v1-v8, ip} -#ifdef CONFIG_FP_SHARING +#ifdef CONFIG_FPU_SHARING /* Assess whether switched-out thread had been using the FP registers. */ ldr r0, =0x10 /* EXC_RETURN.F_Type Mask */ tst lr, r0 /* EXC_RETURN & EXC_RETURN.F_Type_Msk */ @@ -108,7 +108,7 @@ out_fp_active: out_fp_endif: str r0, [r2, #_thread_offset_to_mode] -#endif /* CONFIG_FP_SHARING */ +#endif /* CONFIG_FPU_SHARING */ #elif defined(CONFIG_ARMV7_R) /* Store rest of process context */ cps #MODE_SYS @@ -248,7 +248,7 @@ _thread_irq_disabled: /* restore BASEPRI for the incoming thread */ msr BASEPRI, r0 -#ifdef CONFIG_FP_SHARING +#ifdef CONFIG_FPU_SHARING /* Assess whether switched-in thread had been using the FP registers. */ ldr r0, [r2, #_thread_offset_to_mode] tst r0, #0x04 /* thread.arch.mode & CONTROL.FPCA Msk */ diff --git a/arch/arm/core/aarch32/thread.c b/arch/arm/core/aarch32/thread.c index 6bef6d9d3cf..4402cbe066d 100644 --- a/arch/arm/core/aarch32/thread.c +++ b/arch/arm/core/aarch32/thread.c @@ -71,7 +71,7 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack, stackSize -= MPU_GUARD_ALIGN_AND_SIZE; #endif -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) \ +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) \ && defined(CONFIG_MPU_STACK_GUARD) /* For a thread which intends to use the FP services, it is required to * allocate a wider MPU guard region, to always successfully detect an @@ -137,7 +137,7 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack, thread->arch.basepri = 0; -#if defined(CONFIG_USERSPACE) || defined(CONFIG_FP_SHARING) +#if defined(CONFIG_USERSPACE) || defined(CONFIG_FPU_SHARING) thread->arch.mode = 0; #if defined(CONFIG_USERSPACE) thread->arch.priv_stack_start = 0; @@ -166,13 +166,13 @@ FUNC_NORETURN void arch_user_mode_enter(k_thread_entry_t user_entry, * privileged stack. Adjust the available (writable) stack * buffer area accordingly. */ -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) _current->arch.priv_stack_start += (_current->base.user_options & K_FP_REGS) ? MPU_GUARD_ALIGN_AND_SIZE_FLOAT : MPU_GUARD_ALIGN_AND_SIZE; #else _current->arch.priv_stack_start += MPU_GUARD_ALIGN_AND_SIZE; -#endif /* CONFIG_FPU && CONFIG_FP_SHARING */ +#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */ #endif /* CONFIG_MPU_STACK_GUARD */ z_arm_userspace_enter(user_entry, p1, p2, p3, @@ -285,12 +285,12 @@ u32_t z_check_thread_stack_fail(const u32_t fault_addr, const u32_t psp) return 0; } -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) u32_t guard_len = (thread->base.user_options & K_FP_REGS) ? MPU_GUARD_ALIGN_AND_SIZE_FLOAT : MPU_GUARD_ALIGN_AND_SIZE; #else u32_t guard_len = MPU_GUARD_ALIGN_AND_SIZE; -#endif /* CONFIG_FPU && CONFIG_FP_SHARING */ +#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */ #if defined(CONFIG_USERSPACE) if (thread->arch.priv_stack_start) { @@ -333,7 +333,7 @@ u32_t z_check_thread_stack_fail(const u32_t fault_addr, const u32_t psp) } #endif /* CONFIG_MPU_STACK_GUARD || CONFIG_USERSPACE */ -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) int arch_float_disable(struct k_thread *thread) { if (thread != _current) { @@ -365,7 +365,7 @@ int arch_float_disable(struct k_thread *thread) return 0; } -#endif /* CONFIG_FPU && CONFIG_FP_SHARING */ +#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */ void arch_switch_to_main_thread(struct k_thread *main_thread, k_thread_stack_t *main_stack, @@ -378,11 +378,11 @@ void arch_switch_to_main_thread(struct k_thread *main_thread, * initialized at thread creation for threads that make use of the FP). */ __set_FPSCR(0); -#if defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU_SHARING) /* In Sharing mode clearing FPSCR may set the CONTROL.FPCA flag. */ __set_CONTROL(__get_CONTROL() & (~(CONTROL_FPCA_Msk))); __ISB(); -#endif /* CONFIG_FP_SHARING */ +#endif /* CONFIG_FPU_SHARING */ #endif /* CONFIG_FPU */ #ifdef CONFIG_ARM_MPU diff --git a/arch/arm/core/offsets/offsets_aarch32.c b/arch/arm/core/offsets/offsets_aarch32.c index 3f78d120428..4a93a0ac647 100644 --- a/arch/arm/core/offsets/offsets_aarch32.c +++ b/arch/arm/core/offsets/offsets_aarch32.c @@ -29,14 +29,14 @@ GEN_OFFSET_SYM(_thread_arch_t, basepri); GEN_OFFSET_SYM(_thread_arch_t, swap_return_value); -#if defined(CONFIG_USERSPACE) || defined(CONFIG_FP_SHARING) +#if defined(CONFIG_USERSPACE) || defined(CONFIG_FPU_SHARING) GEN_OFFSET_SYM(_thread_arch_t, mode); #if defined(CONFIG_USERSPACE) GEN_OFFSET_SYM(_thread_arch_t, priv_stack_start); #endif #endif -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) GEN_OFFSET_SYM(_thread_arch_t, preempt_float); #endif @@ -49,7 +49,7 @@ GEN_OFFSET_SYM(_basic_sf_t, lr); GEN_OFFSET_SYM(_basic_sf_t, pc); GEN_OFFSET_SYM(_basic_sf_t, xpsr); -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) GEN_OFFSET_SYM(_esf_t, s); GEN_OFFSET_SYM(_esf_t, fpscr); #endif @@ -82,7 +82,7 @@ GEN_ABSOLUTE_SYM(___thread_stack_info_t_SIZEOF, * point registers. */ -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) GEN_ABSOLUTE_SYM(_K_THREAD_NO_FLOAT_SIZEOF, sizeof(struct k_thread) - sizeof(struct _preempt_float)); #else diff --git a/arch/arm/include/aarch32/offsets_short_arch.h b/arch/arm/include/aarch32/offsets_short_arch.h index 4268b917d45..cf473c659c9 100644 --- a/arch/arm/include/aarch32/offsets_short_arch.h +++ b/arch/arm/include/aarch32/offsets_short_arch.h @@ -26,7 +26,7 @@ #define _thread_offset_to_preempt_float \ (___thread_t_arch_OFFSET + ___thread_arch_t_preempt_float_OFFSET) -#if defined(CONFIG_USERSPACE) || defined(CONFIG_FP_SHARING) +#if defined(CONFIG_USERSPACE) || defined(CONFIG_FPU_SHARING) #define _thread_offset_to_mode \ (___thread_t_arch_OFFSET + ___thread_arch_t_mode_OFFSET) diff --git a/arch/posix/core/offsets/offsets.c b/arch/posix/core/offsets/offsets.c index 600e388e3f6..dfddbb45e23 100644 --- a/arch/posix/core/offsets/offsets.c +++ b/arch/posix/core/offsets/offsets.c @@ -28,7 +28,7 @@ #include #include -#if defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU_SHARING) GEN_OFFSET_SYM(_thread_arch_t, excNestCount); #endif diff --git a/arch/riscv/core/isr.S b/arch/riscv/core/isr.S index 14751a9bc56..189e41de2cd 100644 --- a/arch/riscv/core/isr.S +++ b/arch/riscv/core/isr.S @@ -144,7 +144,7 @@ SECTION_FUNC(exception.entry, __irq_wrapper) RV_OP_STOREREG a6, __z_arch_esf_t_a6_OFFSET(sp) RV_OP_STOREREG a7, __z_arch_esf_t_a7_OFFSET(sp) -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) /* Assess whether floating-point registers need to be saved. */ la t0, _kernel RV_OP_LOADREG t0, _kernel_offset_to_current(t0) @@ -396,7 +396,7 @@ reschedule: RV_OP_STOREREG s10, _thread_offset_to_s10(t1) RV_OP_STOREREG s11, _thread_offset_to_s11(t1) -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) /* Assess whether floating-point registers need to be saved. */ RV_OP_LOADREG t2, _thread_offset_to_user_options(t1) andi t2, t2, K_FP_REGS @@ -440,7 +440,7 @@ skip_store_fp_callee_saved: RV_OP_LOADREG s10, _thread_offset_to_s10(t1) RV_OP_LOADREG s11, _thread_offset_to_s11(t1) -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) /* Determine if we need to restore floating-point registers. */ RV_OP_LOADREG t2, _thread_offset_to_user_options(t1) andi t2, t2, K_FP_REGS @@ -482,7 +482,7 @@ skip_load_fp_callee_saved: RV_OP_STOREREG a6, __z_arch_esf_t_a6_OFFSET(sp) RV_OP_STOREREG a7, __z_arch_esf_t_a7_OFFSET(sp) -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) /* Assess whether floating-point registers need to be saved. */ RV_OP_LOADREG t2, _thread_offset_to_user_options(sp) andi t2, t2, K_FP_REGS @@ -495,7 +495,7 @@ skip_store_fp_caller_saved_benchmark: call read_timer_end_of_swap -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) /* Determine if we need to restore floating-point registers. */ RV_OP_LOADREG t2, __z_arch_esf_t_fp_state_OFFSET(sp) beqz t2, skip_load_fp_caller_saved_benchmark @@ -542,7 +542,7 @@ no_reschedule: RV_OP_LOADREG t0, __z_arch_esf_t_mstatus_OFFSET(sp) csrw mstatus, t0 -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) /* * Determine if we need to restore floating-point registers. This needs * to happen before restoring integer registers to avoid stomping on diff --git a/arch/riscv/core/offsets/offsets.c b/arch/riscv/core/offsets/offsets.c index 607854d7547..95935c4cfdc 100644 --- a/arch/riscv/core/offsets/offsets.c +++ b/arch/riscv/core/offsets/offsets.c @@ -43,7 +43,7 @@ GEN_OFFSET_SYM(_callee_saved_t, s9); GEN_OFFSET_SYM(_callee_saved_t, s10); GEN_OFFSET_SYM(_callee_saved_t, s11); -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) GEN_OFFSET_SYM(_callee_saved_t, fcsr); GEN_OFFSET_SYM(_callee_saved_t, fs0); GEN_OFFSET_SYM(_callee_saved_t, fs1); @@ -82,7 +82,7 @@ GEN_OFFSET_SYM(z_arch_esf_t, a7); GEN_OFFSET_SYM(z_arch_esf_t, mepc); GEN_OFFSET_SYM(z_arch_esf_t, mstatus); -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) GEN_OFFSET_SYM(z_arch_esf_t, fp_state); GEN_OFFSET_SYM(z_arch_esf_t, ft0); GEN_OFFSET_SYM(z_arch_esf_t, ft1); diff --git a/arch/riscv/core/thread.c b/arch/riscv/core/thread.c index 5f849ef3808..253c3a1f706 100644 --- a/arch/riscv/core/thread.c +++ b/arch/riscv/core/thread.c @@ -57,7 +57,7 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack, * thread stack. */ stack_init->mstatus = MSTATUS_DEF_RESTORE; -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) if ((thread->base.user_options & K_FP_REGS) != 0) { stack_init->mstatus |= MSTATUS_FS_INIT; } @@ -68,7 +68,7 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack, thread->callee_saved.sp = (ulong_t)stack_init; } -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) int arch_float_disable(struct k_thread *thread) { unsigned int key; @@ -131,4 +131,4 @@ int arch_float_enable(struct k_thread *thread) return 0; } -#endif /* CONFIG_FPU && CONFIG_FP_SHARING */ +#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */ diff --git a/arch/riscv/include/offsets_short_arch.h b/arch/riscv/include/offsets_short_arch.h index c45e6ee1667..9851a9953a9 100644 --- a/arch/riscv/include/offsets_short_arch.h +++ b/arch/riscv/include/offsets_short_arch.h @@ -59,7 +59,7 @@ #define _thread_offset_to_swap_return_value \ (___thread_t_arch_OFFSET + ___thread_arch_t_swap_return_value_OFFSET) -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) #define _thread_offset_to_fcsr \ (___thread_t_callee_saved_OFFSET + ___callee_saved_t_fcsr_OFFSET) @@ -100,7 +100,7 @@ #define _thread_offset_to_fs11 \ (___thread_t_callee_saved_OFFSET + ___callee_saved_t_fs11_OFFSET) -#endif /* defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) */ +#endif /* defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) */ /* end - threads */ diff --git a/arch/x86/core/Kconfig.ia32 b/arch/x86/core/Kconfig.ia32 index efcbeb6f3f9..8ebc724721c 100644 --- a/arch/x86/core/Kconfig.ia32 +++ b/arch/x86/core/Kconfig.ia32 @@ -117,7 +117,7 @@ config LAZY_FP_SHARING bool depends on FPU depends on !EAGER_FP_SHARING - depends on FP_SHARING + depends on FPU_SHARING default y if X86_NO_LAZY_FP || !USERSPACE help This hidden option allows multiple threads to use the floating point diff --git a/arch/x86/core/ia32/float.c b/arch/x86/core/ia32/float.c index 23e7c0af773..17b9aec4c72 100644 --- a/arch/x86/core/ia32/float.c +++ b/arch/x86/core/ia32/float.c @@ -13,7 +13,7 @@ * in a thread's stack region when a preemptive context switch occurs. * * Note: If the kernel has been built without floating point register sharing - * support (CONFIG_FP_SHARING), the floating point registers can still be used + * support (CONFIG_FPU_SHARING), the floating point registers can still be used * safely by one or more cooperative threads OR by a single preemptive thread, * but not by both. * diff --git a/arch/x86/core/ia32/thread.c b/arch/x86/core/ia32/thread.c index 72b619c43b4..97b39c877b4 100644 --- a/arch/x86/core/ia32/thread.c +++ b/arch/x86/core/ia32/thread.c @@ -45,7 +45,7 @@ extern void z_x86_syscall_entry_stub(void); NANO_CPU_INT_REGISTER(z_x86_syscall_entry_stub, -1, -1, 0x80, 3); #endif /* CONFIG_X86_USERSPACE */ -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) extern int z_float_disable(struct k_thread *thread); @@ -57,7 +57,7 @@ int arch_float_disable(struct k_thread *thread) return -ENOSYS; #endif /* CONFIG_LAZY_FP_SHARING */ } -#endif /* CONFIG_FPU && CONFIG_FP_SHARING */ +#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack, size_t stack_size, k_thread_entry_t entry, diff --git a/doc/reference/kernel/other/float.rst b/doc/reference/kernel/other/float.rst index c692e93908b..8b99f69d29f 100644 --- a/doc/reference/kernel/other/float.rst +++ b/doc/reference/kernel/other/float.rst @@ -265,11 +265,11 @@ Configuration Options ********************* To configure unshared FP registers mode, enable the :option:`CONFIG_FPU` -configuration option and leave the :option:`CONFIG_FP_SHARING` configuration +configuration option and leave the :option:`CONFIG_FPU_SHARING` configuration option disabled. To configure shared FP registers mode, enable both the :option:`CONFIG_FPU` -configuration option and the :option:`CONFIG_FP_SHARING` configuration option. +configuration option and the :option:`CONFIG_FPU_SHARING` configuration option. Also, ensure that any thread that uses the floating point registers has sufficient added stack space for saving floating point register values during context switches, as described above. diff --git a/doc/zephyr.doxyfile.in b/doc/zephyr.doxyfile.in index 73edc073508..ecc3800e5b4 100644 --- a/doc/zephyr.doxyfile.in +++ b/doc/zephyr.doxyfile.in @@ -1970,7 +1970,7 @@ PREDEFINED = "CONFIG_ARCH_HAS_CUSTOM_BUSY_WAIT" \ "CONFIG_EXECUTION_BENCHMARKING" \ "CONFIG_FLASH_PAGE_LAYOUT" \ "CONFIG_FPU" \ - "CONFIG_FP_SHARING" \ + "CONFIG_FPU_SHARING" \ "CONFIG_NET_L2_ETHERNET_MGMT" \ "CONFIG_NET_MGMT_EVENT" \ "CONFIG_NET_TCP" \ diff --git a/include/arch/arm/aarch32/arch.h b/include/arch/arm/aarch32/arch.h index b0c095d3514..f4e99e3d1a3 100644 --- a/include/arch/arm/aarch32/arch.h +++ b/include/arch/arm/aarch32/arch.h @@ -124,12 +124,12 @@ extern "C" { * that is using the Floating Point services. * * For threads that are using the Floating Point services under Shared - * Registers (CONFIG_FP_SHARING=y) mode, the exception stack frame may + * Registers (CONFIG_FPU_SHARING=y) mode, the exception stack frame may * contain both the basic stack frame and the FP caller-saved context, * upon exception entry. Therefore, a wide guard region is required to * guarantee that stack-overflow detection will always be successful. */ -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) \ +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) \ && defined(CONFIG_MPU_STACK_GUARD) #define MPU_GUARD_ALIGN_AND_SIZE_FLOAT CONFIG_MPU_STACK_GUARD_MIN_SIZE_FLOAT #else diff --git a/include/arch/arm/aarch32/exc.h b/include/arch/arm/aarch32/exc.h index f9c8d0e7d9d..75050d17f1f 100644 --- a/include/arch/arm/aarch32/exc.h +++ b/include/arch/arm/aarch32/exc.h @@ -84,7 +84,7 @@ struct __esf { sys_define_gpr_with_alias(pc, r15); u32_t xpsr; } basic; -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) float s[16]; u32_t fpscr; u32_t undefined; diff --git a/include/arch/arm/aarch32/thread.h b/include/arch/arm/aarch32/thread.h index d42c615684c..5e31ae85b35 100644 --- a/include/arch/arm/aarch32/thread.h +++ b/include/arch/arm/aarch32/thread.h @@ -36,7 +36,7 @@ struct _callee_saved { typedef struct _callee_saved _callee_saved_t; -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) struct _preempt_float { float s16; float s17; @@ -65,7 +65,7 @@ struct _thread_arch { /* r0 in stack frame cannot be written to reliably */ u32_t swap_return_value; -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) /* * No cooperative floating point register set structure exists for * the Cortex-M as it automatically saves the necessary registers @@ -74,7 +74,7 @@ struct _thread_arch { struct _preempt_float preempt_float; #endif -#if defined(CONFIG_USERSPACE) || defined(CONFIG_FP_SHARING) +#if defined(CONFIG_USERSPACE) || defined(CONFIG_FPU_SHARING) u32_t mode; #if defined(CONFIG_USERSPACE) u32_t priv_stack_start; diff --git a/include/arch/riscv/exp.h b/include/arch/riscv/exp.h index 0b4c97ce142..74adc48f8ab 100644 --- a/include/arch/riscv/exp.h +++ b/include/arch/riscv/exp.h @@ -41,7 +41,7 @@ struct soc_esf { }; #endif -#if !defined(RV_FP_TYPE) && defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if !defined(RV_FP_TYPE) && defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) #ifdef CONFIG_CPU_HAS_FPU_DOUBLE_PRECISION #define RV_FP_TYPE u64_t #else @@ -74,7 +74,7 @@ struct __esf { ulong_t mepc; /* machine exception program counter */ ulong_t mstatus; /* machine status register */ -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) ulong_t fp_state; /* Floating-point saved context state. */ RV_FP_TYPE ft0; /* Caller-saved temporary floating register */ RV_FP_TYPE ft1; /* Caller-saved temporary floating register */ diff --git a/include/arch/riscv/thread.h b/include/arch/riscv/thread.h index 70a697546ff..819dbde121c 100644 --- a/include/arch/riscv/thread.h +++ b/include/arch/riscv/thread.h @@ -22,7 +22,7 @@ #ifndef _ASMLANGUAGE #include -#if !defined(RV_FP_TYPE) && defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if !defined(RV_FP_TYPE) && defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) #ifdef CONFIG_CPU_HAS_FPU_DOUBLE_PRECISION #define RV_FP_TYPE u64_t #else @@ -50,7 +50,7 @@ struct _callee_saved { ulong_t s10; /* saved register */ ulong_t s11; /* saved register */ -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) u32_t fcsr; /* Control and status register */ RV_FP_TYPE fs0; /* saved floating-point register */ RV_FP_TYPE fs1; /* saved floating-point register */ diff --git a/include/kernel.h b/include/kernel.h index e2de042322f..cc646216325 100644 --- a/include/kernel.h +++ b/include/kernel.h @@ -698,7 +698,7 @@ extern void k_thread_foreach_unlocked( * */ #define K_ESSENTIAL (BIT(0)) -#if defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU_SHARING) /** * @brief thread uses floating point registers */ @@ -726,7 +726,7 @@ extern void k_thread_foreach_unlocked( #ifdef CONFIG_X86 /* x86 Bitmask definitions for threads user options */ -#if defined(CONFIG_FP_SHARING) && defined(CONFIG_SSE) +#if defined(CONFIG_FPU_SHARING) && defined(CONFIG_SSE) /* thread uses SSEx (and also FP) registers */ #define K_SSE_REGS (BIT(7)) #endif diff --git a/include/kernel_structs.h b/include/kernel_structs.h index e067a7f765c..30e6c337b8d 100644 --- a/include/kernel_structs.h +++ b/include/kernel_structs.h @@ -168,7 +168,7 @@ struct z_kernel { */ struct _ready_q ready_q; -#ifdef CONFIG_FP_SHARING +#ifdef CONFIG_FPU_SHARING /* * A 'current_sse' field does not exist in addition to the 'current_fp' * field since it's not possible to divide the IA-32 non-integer diff --git a/kernel/include/kernel_arch_interface.h b/kernel/include/kernel_arch_interface.h index d0084f14f73..781a40dd7c2 100644 --- a/kernel/include/kernel_arch_interface.h +++ b/kernel/include/kernel_arch_interface.h @@ -165,7 +165,7 @@ void arch_switch_to_main_thread(struct k_thread *main_thread, k_thread_entry_t _main); #endif /* CONFIG_ARCH_HAS_CUSTOM_SWAP_TO_MAIN */ -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) /** * @brief Disable floating point context preservation * @@ -179,7 +179,7 @@ void arch_switch_to_main_thread(struct k_thread *main_thread, * @retval -EINVAL If the floating point disabling could not be performed. */ int arch_float_disable(struct k_thread *thread); -#endif /* CONFIG_FPU && CONFIG_FP_SHARING */ +#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */ /** @} */ diff --git a/kernel/include/kernel_offsets.h b/kernel/include/kernel_offsets.h index 8e233b1e9d0..bb1d359e8cf 100644 --- a/kernel/include/kernel_offsets.h +++ b/kernel/include/kernel_offsets.h @@ -47,7 +47,7 @@ GEN_OFFSET_SYM(_kernel_t, ready_q); GEN_OFFSET_SYM(_ready_q_t, cache); #endif -#ifdef CONFIG_FP_SHARING +#ifdef CONFIG_FPU_SHARING GEN_OFFSET_SYM(_kernel_t, current_fp); #endif diff --git a/kernel/thread.c b/kernel/thread.c index 68d9abb9e1d..90b998a103e 100644 --- a/kernel/thread.c +++ b/kernel/thread.c @@ -791,11 +791,11 @@ void z_spin_lock_set_owner(struct k_spinlock *l) int z_impl_k_float_disable(struct k_thread *thread) { -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) return arch_float_disable(thread); #else return -ENOSYS; -#endif /* CONFIG_FPU && CONFIG_FP_SHARING */ +#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */ } #ifdef CONFIG_USERSPACE diff --git a/subsys/debug/openocd.c b/subsys/debug/openocd.c index dec5a4008a9..b927c0843dd 100644 --- a/subsys/debug/openocd.c +++ b/subsys/debug/openocd.c @@ -78,7 +78,7 @@ size_t _kernel_openocd_offsets[] = { [OPENOCD_OFFSET_T_NAME] = offsetof(struct k_thread, name), [OPENOCD_OFFSET_T_ARCH] = offsetof(struct k_thread, arch), -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) && defined(CONFIG_ARM) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) && defined(CONFIG_ARM) [OPENOCD_OFFSET_T_PREEMPT_FLOAT] = offsetof(struct _thread_arch, preempt_float), [OPENOCD_OFFSET_T_COOP_FLOAT] = OPENOCD_UNIMPLEMENTED, diff --git a/tests/arch/arm/arm_thread_swap/src/arm_thread_arch.c b/tests/arch/arm/arm_thread_swap/src/arm_thread_arch.c index 0e038a775d3..5110eddeba2 100644 --- a/tests/arch/arm/arm_thread_swap/src/arm_thread_arch.c +++ b/tests/arch/arm/arm_thread_swap/src/arm_thread_arch.c @@ -110,7 +110,7 @@ static void verify_callee_saved(const _callee_saved_t *src, ); } -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) /* Arbitrary values for the floating-point callee-saved registers */ struct _preempt_float ztest_thread_fp_callee_saved_regs = { .s16 = 0x11111111, .s17 = 0x22222222, @@ -194,7 +194,7 @@ static void verify_fp_callee_saved(const struct _preempt_float *src, ); } -#endif /* CONFIG_FPU && CONFIG_FP_SHARING */ +#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */ static void alt_thread_entry(void) { @@ -239,7 +239,7 @@ static void alt_thread_entry(void) memset(&ztest_thread_callee_saved_regs_container, 0, sizeof(_callee_saved_t)); -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) /* Verify that the _current_ (alt) thread is initialized with FPCA cleared. */ zassert_true((__get_CONTROL() & CONTROL_FPCA_Msk) == 0, @@ -268,7 +268,7 @@ static void alt_thread_entry(void) memset(&ztest_thread_fp_callee_saved_regs, 0, sizeof(ztest_thread_fp_callee_saved_regs)); -#endif /* CONFIG_FPU && CONFIG_FP_SHARING */ +#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */ /* Modify the arch.basepri flag of the main test thread, to verify, * later, that this is passed properly to the BASEPRI. @@ -341,7 +341,7 @@ void test_arm_thread_swap(void) * Simulating initial conditions: * - set arbitrary values at the callee-saved registers * - set arbitrary values at the FP callee-saved registers, - * if building with CONFIG_FPU/CONFIG_FP_SHARING + * if building with CONFIG_FPU/CONFIG_FPU_SHARING * - zero the thread's callee-saved data structure * - set thread's priority same as the alternative test thread */ @@ -389,7 +389,7 @@ void test_arm_thread_swap(void) _current->arch.mode); #endif /* CONFIG_USERSPACE */ -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) /* The main test thread is not (yet) actively using the FP registers */ zassert_true((_current->arch.mode & CONTROL_FPCA_Msk) == 0, "Thread FPCA flag not clear at initialization 0x%0x\n", @@ -422,7 +422,7 @@ void test_arm_thread_swap(void) */ zassert_true((_current->arch.mode & CONTROL_FPCA_Msk) == 0, "Thread FPCA flag not clear at initialization\n"); -#endif /* CONFIG_FPU && CONFIG_FP_SHARING */ +#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */ /* Create an alternative (supervisor) testing thread */ k_thread_create(&alt_thread, @@ -611,7 +611,7 @@ void test_arm_thread_swap(void) _current->arch.swap_return_value, ztest_swap_return_val); #endif -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) /* Dump callee-saved registers to memory. */ __asm__ volatile ( "vstmia %0, {s16-s31};\n\t" @@ -632,7 +632,7 @@ void test_arm_thread_swap(void) zassert_true((__get_FPSCR() & 0x1) == 0x1, "FPSCR bit-0 not restored at swap: 0x%x\n", __get_FPSCR()); -#endif /* CONFIG_FPU && CONFIG_FP_SHARING */ +#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */ } /** diff --git a/tests/arch/arm/arm_thread_swap/testcase.yaml b/tests/arch/arm/arm_thread_swap/testcase.yaml index 16f85e59855..71196f95a81 100644 --- a/tests/arch/arm/arm_thread_swap/testcase.yaml +++ b/tests/arch/arm/arm_thread_swap/testcase.yaml @@ -16,14 +16,14 @@ tests: filter: CONFIG_ARMV7_M_ARMV8_M_FP extra_configs: - CONFIG_FPU=y - - CONFIG_FP_SHARING=y + - CONFIG_FPU_SHARING=y tags: arm arch.arm.swap.common.fp_sharing.no_optimizations: arch_whitelist: arm filter: CONFIG_ARMV7_M_ARMV8_M_FP extra_configs: - CONFIG_FPU=y - - CONFIG_FP_SHARING=y + - CONFIG_FPU_SHARING=y - CONFIG_NO_OPTIMIZATIONS=y - CONFIG_IDLE_STACK_SIZE=512 tags: arm diff --git a/tests/benchmarks/app_kernel/prj_fp.conf b/tests/benchmarks/app_kernel/prj_fp.conf index c22f8691244..ef6c986ff95 100644 --- a/tests/benchmarks/app_kernel/prj_fp.conf +++ b/tests/benchmarks/app_kernel/prj_fp.conf @@ -5,7 +5,7 @@ CONFIG_MAIN_THREAD_PRIORITY=6 CONFIG_FPU=y CONFIG_SSE=y -CONFIG_FP_SHARING=y +CONFIG_FPU_SHARING=y CONFIG_SSE_FP_MATH=y # eliminate timer interrupts during the benchmark diff --git a/tests/kernel/fatal/prj_arm_fp_sharing.conf b/tests/kernel/fatal/prj_arm_fp_sharing.conf index 3e56752eec5..a426bc5db5c 100644 --- a/tests/kernel/fatal/prj_arm_fp_sharing.conf +++ b/tests/kernel/fatal/prj_arm_fp_sharing.conf @@ -1,5 +1,5 @@ CONFIG_FPU=y -CONFIG_FP_SHARING=y +CONFIG_FPU_SHARING=y CONFIG_ZTEST=y CONFIG_COVERAGE=n CONFIG_TEST_USERSPACE=y diff --git a/tests/kernel/fatal/src/main.c b/tests/kernel/fatal/src/main.c index 8349f9ceba6..dad727d1907 100644 --- a/tests/kernel/fatal/src/main.c +++ b/tests/kernel/fatal/src/main.c @@ -341,13 +341,13 @@ void test_fatal(void) TC_PRINT("test stack HW-based overflow - supervisor 2\n"); check_stack_overflow(stack_hw_overflow, 0); -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) TC_PRINT("test stack HW-based overflow (FPU thread) - supervisor 1\n"); check_stack_overflow(stack_hw_overflow, K_FP_REGS); TC_PRINT("test stack HW-based overflow (FPU thread) - supervisor 2\n"); check_stack_overflow(stack_hw_overflow, K_FP_REGS); -#endif /* CONFIG_FPU && CONFIG_FP_SHARING */ +#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */ #endif /* CONFIG_HW_STACK_PROTECTION */ @@ -365,13 +365,13 @@ void test_fatal(void) TC_PRINT("test stack HW-based overflow - user priv stack 2\n"); check_stack_overflow(user_priv_stack_hw_overflow, K_USER); -#if defined(CONFIG_FPU) && defined(CONFIG_FP_SHARING) +#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) TC_PRINT("test stack HW-based overflow (FPU thread) - user 1\n"); check_stack_overflow(stack_hw_overflow, K_USER | K_FP_REGS); TC_PRINT("test stack HW-based overflow (FPU thread) - user 2\n"); check_stack_overflow(stack_hw_overflow, K_USER | K_FP_REGS); -#endif /* CONFIG_FPU && CONFIG_FP_SHARING */ +#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */ #endif /* CONFIG_USERSPACE */ diff --git a/tests/kernel/fp_sharing/float_disable/prj.conf b/tests/kernel/fp_sharing/float_disable/prj.conf index 1413e088cfa..98a6cf6eeff 100644 --- a/tests/kernel/fp_sharing/float_disable/prj.conf +++ b/tests/kernel/fp_sharing/float_disable/prj.conf @@ -1,4 +1,4 @@ CONFIG_ZTEST=y CONFIG_TEST_USERSPACE=y CONFIG_FPU=y -CONFIG_FP_SHARING=y +CONFIG_FPU_SHARING=y diff --git a/tests/kernel/fp_sharing/float_disable/prj_x86.conf b/tests/kernel/fp_sharing/float_disable/prj_x86.conf index f7e54768c36..1bc68cde9ae 100644 --- a/tests/kernel/fp_sharing/float_disable/prj_x86.conf +++ b/tests/kernel/fp_sharing/float_disable/prj_x86.conf @@ -1,6 +1,6 @@ CONFIG_ZTEST=y CONFIG_TEST_USERSPACE=y CONFIG_FPU=y -CONFIG_FP_SHARING=y +CONFIG_FPU_SHARING=y CONFIG_SSE=y CONFIG_SSE_FP_MATH=y diff --git a/tests/kernel/fp_sharing/generic/prj.conf b/tests/kernel/fp_sharing/generic/prj.conf index eee634013a3..aec34b14e69 100644 --- a/tests/kernel/fp_sharing/generic/prj.conf +++ b/tests/kernel/fp_sharing/generic/prj.conf @@ -1,4 +1,4 @@ CONFIG_ZTEST=y CONFIG_FPU=y -CONFIG_FP_SHARING=y +CONFIG_FPU_SHARING=y CONFIG_STDOUT_CONSOLE=y diff --git a/tests/kernel/fp_sharing/generic/prj_x86.conf b/tests/kernel/fp_sharing/generic/prj_x86.conf index ea30a80ae38..a341e4a17f8 100644 --- a/tests/kernel/fp_sharing/generic/prj_x86.conf +++ b/tests/kernel/fp_sharing/generic/prj_x86.conf @@ -1,6 +1,6 @@ CONFIG_ZTEST=y CONFIG_FPU=y CONFIG_SSE=y -CONFIG_FP_SHARING=y +CONFIG_FPU_SHARING=y CONFIG_SSE_FP_MATH=y CONFIG_STDOUT_CONSOLE=y diff --git a/tests/kernel/fp_sharing/generic/src/main.c b/tests/kernel/fp_sharing/generic/src/main.c index c74a088f1ff..d32a6b4ed6d 100644 --- a/tests/kernel/fp_sharing/generic/src/main.c +++ b/tests/kernel/fp_sharing/generic/src/main.c @@ -13,8 +13,8 @@ #error Rebuild with the FPU config option enabled #endif -#ifndef CONFIG_FP_SHARING -#error Rebuild with the FP_SHARING config option enabled +#ifndef CONFIG_FPU_SHARING +#error Rebuild with the FPU_SHARING config option enabled #endif #if defined(CONFIG_X86) && !defined(CONFIG_SSE)