Merge tag 'mips_4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
[linux-2.6-block.git] / arch / riscv / Kconfig
index 5287c1441d66a588ff7820c1fb7cc422635acbf5..42e581a268e1901997de938de01f5b9181f02033 100644 (file)
@@ -3,14 +3,23 @@
 # see Documentation/kbuild/kconfig-language.txt.
 #
 
+config 64BIT
+       bool
+
+config 32BIT
+       bool
+
 config RISCV
        def_bool y
+       # even on 32-bit, physical (and DMA) addresses are > 32-bits
+       select PHYS_ADDR_T_64BIT
        select OF
        select OF_EARLY_FLATTREE
        select OF_IRQ
        select ARCH_WANT_FRAME_POINTERS
        select CLONE_BACKWARDS
        select COMMON_CLK
+       select DMA_DIRECT_OPS
        select GENERIC_CLOCKEVENTS
        select GENERIC_CPU_DEVICES
        select GENERIC_IRQ_SHOW
@@ -21,7 +30,6 @@ config RISCV
        select GENERIC_ATOMIC64 if !64BIT || !RISCV_ISA_A
        select HAVE_MEMBLOCK
        select HAVE_MEMBLOCK_NODE_MAP
-       select HAVE_DMA_API_DEBUG
        select HAVE_DMA_CONTIGUOUS
        select HAVE_GENERIC_DMA_COHERENT
        select IRQ_DOMAIN
@@ -34,20 +42,14 @@ config RISCV
        select THREAD_INFO_IN_TASK
        select RISCV_TIMER
        select GENERIC_IRQ_MULTI_HANDLER
+       select ARCH_HAS_PTE_SPECIAL
 
 config MMU
        def_bool y
 
-# even on 32-bit, physical (and DMA) addresses are > 32-bits
-config ARCH_PHYS_ADDR_T_64BIT
-       def_bool y
-
 config ZONE_DMA32
        bool
-       default y
-
-config ARCH_DMA_ADDR_T_64BIT
-       def_bool y
+       default y if 64BIT
 
 config PAGE_OFFSET
        hex
@@ -89,9 +91,6 @@ config PGTABLE_LEVELS
 config HAVE_KPROBES
        def_bool n
 
-config DMA_DIRECT_OPS
-       def_bool y
-
 menu "Platform type"
 
 choice
@@ -103,7 +102,6 @@ choice
 
 config ARCH_RV32I
        bool "RV32I"
-       select CPU_SUPPORTS_32BIT_KERNEL
        select 32BIT
        select GENERIC_LIB_ASHLDI3
        select GENERIC_LIB_ASHRDI3
@@ -111,13 +109,13 @@ config ARCH_RV32I
 
 config ARCH_RV64I
        bool "RV64I"
-       select CPU_SUPPORTS_64BIT_KERNEL
        select 64BIT
        select HAVE_FUNCTION_TRACER
        select HAVE_FUNCTION_GRAPH_TRACER
        select HAVE_FTRACE_MCOUNT_RECORD
        select HAVE_DYNAMIC_FTRACE
        select HAVE_DYNAMIC_FTRACE_WITH_REGS
+       select SWIOTLB
 
 endchoice
 
@@ -173,11 +171,6 @@ config NR_CPUS
        depends on SMP
        default "8"
 
-config CPU_SUPPORTS_32BIT_KERNEL
-       bool
-config CPU_SUPPORTS_64BIT_KERNEL
-       bool
-
 choice
        prompt "CPU Tuning"
        default TUNE_GENERIC
@@ -204,24 +197,6 @@ endmenu
 
 menu "Kernel type"
 
-choice
-       prompt "Kernel code model"
-       default 64BIT
-
-config 32BIT
-       bool "32-bit kernel"
-       depends on CPU_SUPPORTS_32BIT_KERNEL
-       help
-         Select this option to build a 32-bit kernel.
-
-config 64BIT
-       bool "64-bit kernel"
-       depends on CPU_SUPPORTS_64BIT_KERNEL
-       help
-         Select this option to build a 64-bit kernel.
-
-endchoice
-
 source "mm/Kconfig"
 
 source "kernel/Kconfig.preempt"