arch/x86/Kconfig: remove CONFIG_CMOV

The only we support cores that don't have CMOV insns are the MINUTEIAs,
so we simply check for that rather this using a layer of indirection.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This commit is contained in:
Charles E. Youse 2019-06-11 10:48:41 -07:00 committed by Anas Nashif
commit 8013277cd6
2 changed files with 20 additions and 25 deletions

View file

@ -62,7 +62,6 @@ source "arch/x86/core/Kconfig"
config CPU_ATOM config CPU_ATOM
# Hidden # Hidden
bool bool
select CMOV
select CPU_HAS_FPU select CPU_HAS_FPU
select ARCH_HAS_STACK_PROTECTION if X86_MMU select ARCH_HAS_STACK_PROTECTION if X86_MMU
select ARCH_HAS_USERSPACE if X86_MMU select ARCH_HAS_USERSPACE if X86_MMU
@ -80,7 +79,6 @@ config CPU_MINUTEIA
config CPU_APOLLO_LAKE config CPU_APOLLO_LAKE
# Hidden # Hidden
bool bool
select CMOV
select CPU_HAS_FPU select CPU_HAS_FPU
select ARCH_HAS_STACK_PROTECTION if X86_MMU select ARCH_HAS_STACK_PROTECTION if X86_MMU
select ARCH_HAS_USERSPACE if X86_MMU select ARCH_HAS_USERSPACE if X86_MMU
@ -265,12 +263,6 @@ config REBOOT_RST_CNT
endchoice endchoice
config CMOV
bool
help
This option signifies the use of an Intel CPU that supports
the CMOV instruction.
config CACHE_LINE_SIZE_DETECT config CACHE_LINE_SIZE_DETECT
bool "Detect cache line size at runtime" bool "Detect cache line size at runtime"
default y default y

View file

@ -47,15 +47,9 @@ static ALWAYS_INLINE unsigned int find_lsb_set(u32_t op)
__asm__ volatile ( __asm__ volatile (
#if defined(CONFIG_CMOV) #ifdef CONFIG_CPU_MINUTEIA
"bsfl %1, %0;\n\t" /* Minute IA doesn't support cmov */
"cmovzl %2, %0;\n\t"
: "=r" (bitpos)
: "rm" (op), "r" (-1)
: "cc"
#else
"bsfl %1, %0;\n\t" "bsfl %1, %0;\n\t"
"jnz 1f;\n\t" "jnz 1f;\n\t"
@ -64,8 +58,15 @@ static ALWAYS_INLINE unsigned int find_lsb_set(u32_t op)
: "=r" (bitpos) : "=r" (bitpos)
: "rm" (op) : "rm" (op)
: "cc" : "cc"
#else
#endif /* CONFIG_CMOV */ "bsfl %1, %0;\n\t"
"cmovzl %2, %0;\n\t"
: "=r" (bitpos)
: "rm" (op), "r" (-1)
: "cc"
#endif /* CONFIG_CPU_MINUTEIA */
); );
return (bitpos + 1); return (bitpos + 1);
@ -97,14 +98,9 @@ static ALWAYS_INLINE unsigned int find_msb_set(u32_t op)
__asm__ volatile ( __asm__ volatile (
#if defined(CONFIG_CMOV) #ifdef CONFIG_CPU_MINUTEIA
"bsrl %1, %0;\n\t" /* again, Minute IA doesn't support cmov */
"cmovzl %2, %0;\n\t"
: "=r" (bitpos)
: "rm" (op), "r" (-1)
#else
"bsrl %1, %0;\n\t" "bsrl %1, %0;\n\t"
"jnz 1f;\n\t" "jnz 1f;\n\t"
@ -114,7 +110,14 @@ static ALWAYS_INLINE unsigned int find_msb_set(u32_t op)
: "rm" (op) : "rm" (op)
: "cc" : "cc"
#endif /* CONFIG_CMOV */ #else
"bsrl %1, %0;\n\t"
"cmovzl %2, %0;\n\t"
: "=r" (bitpos)
: "rm" (op), "r" (-1)
#endif /* CONFIG_CPU_MINUTEIA */
); );
return (bitpos + 1); return (bitpos + 1);