diff --git a/arch/Kconfig b/arch/Kconfig index 0e2218d727e..8784638b11b 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -710,6 +710,34 @@ config FPU_SHARING endmenu +menu "Cache Options" + +config CACHE_LINE_SIZE_DETECT + bool "Detect cache line size at runtime" + help + This option enables querying some architecture-specific hardware for + finding the cache line size at the expense of taking more memory and + code and a slightly increased boot time. + + If the CPU's cache line size is known in advance, disable this option and + manually enter the value for CACHE_LINE_SIZE. + +config CACHE_LINE_SIZE + int "Cache line size" if !CACHE_LINE_SIZE_DETECT + default 0 + help + Size in bytes of a CPU cache line. + + Detect automatically at runtime by selecting CACHE_LINE_SIZE_DETECT. + +config CACHE_FLUSHING + bool "Enable cache flushing mechanism" + help + This links in the cache flushing functions (d-cache and i-cache where + possible). + +endmenu + config ARCH string help diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index 3099d9ace39..7e513d440f3 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -282,34 +282,8 @@ source "arch/arc/core/mpu/Kconfig" endmenu -config CACHE_LINE_SIZE_DETECT - bool "Detect d-cache line size at runtime" - help - This option enables querying the d-cache build register for finding - the d-cache line size at the expense of taking more memory and code - and a slightly increased boot time. - - If the CPU's d-cache line size is known in advance, disable this - option and manually enter the value for CACHE_LINE_SIZE. - config CACHE_LINE_SIZE - int "Cache line size" if !CACHE_LINE_SIZE_DETECT default 32 - help - Size in bytes of a CPU d-cache line. - - Detect automatically at runtime by selecting CACHE_LINE_SIZE_DETECT. - -config ARCH_CACHE_FLUSH_DETECT - bool - -config CACHE_FLUSHING - bool "Enable d-cache flushing mechanism" - help - This links in the sys_cache_flush() function, which provides a - way to flush multiple lines of the d-cache. - If the d-cache is present, set this to y. - If the d-cache is NOT present, set this to n. config ARC_EXCEPTION_STACK_SIZE int "ARC exception handling stack size" diff --git a/arch/x86/core/Kconfig.ia32 b/arch/x86/core/Kconfig.ia32 index 5f9972bb013..edec460c89b 100644 --- a/arch/x86/core/Kconfig.ia32 +++ b/arch/x86/core/Kconfig.ia32 @@ -140,25 +140,8 @@ config LAZY_FPU_SHARING endmenu -config CACHE_LINE_SIZE_DETECT - bool "Detect cache line size at runtime" - default y - help - This option enables querying the CPUID register for finding the cache line - size at the expense of taking more memory and code and a slightly increased - boot time. - - If the CPU's cache line size is known in advance, disable this option and - manually enter the value for CACHE_LINE_SIZE. - config CACHE_LINE_SIZE - int "Cache line size" if !CACHE_LINE_SIZE_DETECT default 64 if CPU_ATOM - default 0 - help - Size in bytes of a CPU cache line. - - Detect automatically at runtime by selecting CACHE_LINE_SIZE_DETECT. config CLFLUSH_INSTRUCTION_SUPPORTED bool "CLFLUSH instruction supported" @@ -185,18 +168,6 @@ config CLFLUSH_DETECT If the CPU's support (or lack thereof) of CLFLUSH is known in advance, then disable this option and set CLFLUSH_INSTRUCTION_SUPPORTED as appropriate. -config ARCH_CACHE_FLUSH_DETECT - bool - default y - depends on CLFLUSH_DETECT - -config CACHE_FLUSHING - bool "Enable cache flushing mechanism" - help - This links in the sys_cache_flush() function. A mechanism for flushing the - cache must be selected as well. By default, that mechanism is discovered at - runtime. - config X86_DYNAMIC_IRQ_STUBS int "Number of dynamic interrupt stubs" depends on DYNAMIC_INTERRUPTS