Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

riscv: simplify Kconfig magic for 32-bit vs 64-bit kernels

We can deduct this directly using a select from ARCH_RV32I/ARCH_RV64I.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>

+6 -25
+6 -25
arch/riscv/Kconfig
··· 3 3 # see Documentation/kbuild/kconfig-language.txt. 4 4 # 5 5 6 + config 64BIT 7 + bool 8 + 9 + config 32BIT 10 + bool 11 + 6 12 config RISCV 7 13 def_bool y 8 14 # even on 32-bit, physical (and DMA) addresses are > 32-bits ··· 101 95 102 96 config ARCH_RV32I 103 97 bool "RV32I" 104 - select CPU_SUPPORTS_32BIT_KERNEL 105 98 select 32BIT 106 99 select GENERIC_ASHLDI3 107 100 select GENERIC_ASHRDI3 ··· 108 103 109 104 config ARCH_RV64I 110 105 bool "RV64I" 111 - select CPU_SUPPORTS_64BIT_KERNEL 112 106 select 64BIT 113 107 select HAVE_FUNCTION_TRACER 114 108 select HAVE_FUNCTION_GRAPH_TRACER ··· 169 165 depends on SMP 170 166 default "8" 171 167 172 - config CPU_SUPPORTS_32BIT_KERNEL 173 - bool 174 - config CPU_SUPPORTS_64BIT_KERNEL 175 - bool 176 - 177 168 choice 178 169 prompt "CPU Tuning" 179 170 default TUNE_GENERIC ··· 194 195 endmenu 195 196 196 197 menu "Kernel type" 197 - 198 - choice 199 - prompt "Kernel code model" 200 - default 64BIT 201 - 202 - config 32BIT 203 - bool "32-bit kernel" 204 - depends on CPU_SUPPORTS_32BIT_KERNEL 205 - help 206 - Select this option to build a 32-bit kernel. 207 - 208 - config 64BIT 209 - bool "64-bit kernel" 210 - depends on CPU_SUPPORTS_64BIT_KERNEL 211 - help 212 - Select this option to build a 64-bit kernel. 213 - 214 - endchoice 215 198 216 199 source "mm/Kconfig" 217 200