Merge tag 'riscv-for-linus-5.17-mw1' of git://git.kernel.org/pub/scm/linux/kernel...
[platform/kernel/linux-starfive.git] / arch / riscv / Kconfig
index 171ecc6..5adcbd9 100644 (file)
@@ -147,27 +147,16 @@ config MMU
          Select if you want MMU-based virtualised addressing space
          support by paged memory management. If unsure, say 'Y'.
 
-config VA_BITS
-       int
-       default 32 if 32BIT
-       default 39 if 64BIT
-
-config PA_BITS
-       int
-       default 34 if 32BIT
-       default 56 if 64BIT
-
 config PAGE_OFFSET
        hex
-       default 0xC0000000 if 32BIT && MAXPHYSMEM_1GB
+       default 0xC0000000 if 32BIT
        default 0x80000000 if 64BIT && !MMU
-       default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB
-       default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB
+       default 0xffffaf8000000000 if 64BIT
 
 config KASAN_SHADOW_OFFSET
        hex
        depends on KASAN_GENERIC
-       default 0xdfffffc800000000 if 64BIT
+       default 0xdfffffff00000000 if 64BIT
        default 0xffffffff if 32BIT
 
 config ARCH_FLATMEM_ENABLE
@@ -213,7 +202,7 @@ config FIX_EARLYCON_MEM
 
 config PGTABLE_LEVELS
        int
-       default 3 if 64BIT
+       default 4 if 64BIT
        default 2
 
 config LOCKDEP_SUPPORT
@@ -271,24 +260,6 @@ config MODULE_SECTIONS
        bool
        select HAVE_MOD_ARCH_SPECIFIC
 
-choice
-       prompt "Maximum Physical Memory"
-       default MAXPHYSMEM_1GB if 32BIT
-       default MAXPHYSMEM_2GB if 64BIT && CMODEL_MEDLOW
-       default MAXPHYSMEM_128GB if 64BIT && CMODEL_MEDANY
-
-       config MAXPHYSMEM_1GB
-               depends on 32BIT
-               bool "1GiB"
-       config MAXPHYSMEM_2GB
-               depends on 64BIT
-               bool "2GiB"
-       config MAXPHYSMEM_128GB
-               depends on 64BIT && CMODEL_MEDANY
-               bool "128GiB"
-endchoice
-
-
 config SMP
        bool "Symmetric Multi-Processing"
        help
@@ -392,12 +363,25 @@ source "kernel/Kconfig.hz"
 
 config RISCV_SBI_V01
        bool "SBI v0.1 support"
-       default y
        depends on RISCV_SBI
        help
          This config allows kernel to use SBI v0.1 APIs. This will be
          deprecated in future once legacy M-mode software are no longer in use.
 
+config RISCV_BOOT_SPINWAIT
+       bool "Spinwait booting method"
+       depends on SMP
+       default y
+       help
+         This enables support for booting Linux via spinwait method. In the
+         spinwait method, all cores randomly jump to Linux. One of the cores
+         gets chosen via lottery and all other keep spinning on a percpu
+         variable. This method cannot support CPU hotplug and sparse hartid
+         scheme. It should be only enabled for M-mode Linux or platforms relying
+         on older firmware without SBI HSM extension. All other platforms should
+         rely on ordered booting via SBI HSM extension which gets chosen
+         dynamically at runtime if the firmware supports it.
+
 config KEXEC
        bool "Kexec system call"
        select KEXEC_CORE