riscv: implement Zicbom-based CMO instructions + the t-head variant
[linux-2.6-microblaze.git] / arch / riscv / Kconfig
index 897ae28..3d49317 100644 (file)
@@ -38,7 +38,7 @@ config RISCV
        select ARCH_SUPPORTS_ATOMIC_RMW
        select ARCH_SUPPORTS_DEBUG_PAGEALLOC if MMU
        select ARCH_SUPPORTS_HUGETLBFS if MMU
-       select ARCH_SUPPORTS_PAGE_TABLE_CHECK
+       select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU
        select ARCH_USE_MEMTEST
        select ARCH_USE_QUEUED_RWLOCKS
        select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
@@ -86,7 +86,7 @@ config RISCV
        select HAVE_ARCH_THREAD_STRUCT_WHITELIST
        select HAVE_ARCH_VMAP_STACK if MMU && 64BIT
        select HAVE_ASM_MODVERSIONS
-       select HAVE_CONTEXT_TRACKING
+       select HAVE_CONTEXT_TRACKING_USER
        select HAVE_DEBUG_KMEMLEAK
        select HAVE_DMA_CONTIGUOUS if MMU
        select HAVE_EBPF_JIT if MMU
@@ -232,6 +232,21 @@ source "arch/riscv/Kconfig.erratas"
 
 menu "Platform type"
 
+config NONPORTABLE
+       bool "Allow configurations that result in non-portable kernels"
+       help
+         RISC-V kernel binaries are compatible between all known systems
+         whenever possible, but there are some use cases that can only be
+         satisfied by configurations that result in kernel binaries that are
+         not portable between systems.
+
+         Selecting N does not guarantee kernels will be portable to all known
+         systems.  Selecting any of the options guarded by NONPORTABLE will
+         result in kernel binaries that are unlikely to be portable between
+         systems.
+
+         If unsure, say N.
+
 choice
        prompt "Base ISA"
        default ARCH_RV64I
@@ -241,6 +256,7 @@ choice
 
 config ARCH_RV32I
        bool "RV32I"
+       depends on NONPORTABLE
        select 32BIT
        select GENERIC_LIB_ASHLDI3
        select GENERIC_LIB_ASHRDI3
@@ -361,11 +377,11 @@ config RISCV_ISA_C
        bool "Emit compressed instructions when building Linux"
        default y
        help
-          Adds "C" to the ISA subsets that the toolchain is allowed to emit
-          when building Linux, which results in compressed instructions in the
-          Linux binary.
+         Adds "C" to the ISA subsets that the toolchain is allowed to emit
+         when building Linux, which results in compressed instructions in the
+         Linux binary.
 
-          If you don't know what to do here, say Y.
+         If you don't know what to do here, say Y.
 
 config RISCV_ISA_SVPBMT
        bool "SVPBMT extension support"
@@ -393,7 +409,7 @@ config CC_HAS_ZICBOM
 config RISCV_ISA_ZICBOM
        bool "Zicbom extension support for non-coherent DMA operation"
        depends on CC_HAS_ZICBOM
-       depends on !XIP_KERNEL
+       depends on !XIP_KERNEL && MMU
        select RISCV_DMA_NONCOHERENT
        select RISCV_ALTERNATIVE
        default y
@@ -416,7 +432,7 @@ config FPU
 
          If you don't know what to do here, say Y.
 
-endmenu
+endmenu # "Platform type"
 
 menu "Kernel features"
 
@@ -505,7 +521,7 @@ config COMPAT
 
          If you want to execute 32-bit userspace applications, say Y.
 
-endmenu
+endmenu # "Kernel features"
 
 menu "Boot options"
 
@@ -541,7 +557,6 @@ config CMDLINE_EXTEND
          cases where the provided arguments are insufficient and
          you don't want to or cannot modify them.
 
-
 config CMDLINE_FORCE
        bool "Always use the default kernel command string"
        help
@@ -584,6 +599,7 @@ config STACKPROTECTOR_PER_TASK
 
 config PHYS_RAM_BASE_FIXED
        bool "Explicitly specified physical RAM address"
+       depends on NONPORTABLE
        default n
 
 config PHYS_RAM_BASE
@@ -597,7 +613,7 @@ config PHYS_RAM_BASE
 
 config XIP_KERNEL
        bool "Kernel Execute-In-Place from ROM"
-       depends on MMU && SPARSEMEM
+       depends on MMU && SPARSEMEM && NONPORTABLE
        # This prevents XIP from being enabled by all{yes,mod}config, which
        # fail to build since XIP doesn't support large kernels.
        depends on !COMPILE_TEST
@@ -633,23 +649,30 @@ config XIP_PHYS_ADDR
          be linked for and stored to.  This address is dependent on your
          own flash usage.
 
-endmenu
+endmenu # "Boot options"
 
 config BUILTIN_DTB
        bool
-       depends on OF
+       depends on OF && NONPORTABLE
        default y if XIP_KERNEL
 
+config PORTABLE
+       bool
+       default !NONPORTABLE
+       select EFI
+       select OF
+       select MMU
+
 menu "Power management options"
 
 source "kernel/power/Kconfig"
 
-endmenu
+endmenu # "Power management options"
 
 menu "CPU Power Management"
 
 source "drivers/cpuidle/Kconfig"
 
-endmenu
+endmenu # "CPU Power Management"
 
 source "arch/riscv/kvm/Kconfig"