]> Git Repo - linux.git/blame - arch/riscv/Kconfig
riscv: simplify Kconfig magic for 32-bit vs 64-bit kernels
[linux.git] / arch / riscv / Kconfig
CommitLineData
fbe934d6
PD
1#
2# For a description of the syntax of this configuration file,
3# see Documentation/kbuild/kconfig-language.txt.
4#
5
c3e4ed01
CH
6config 64BIT
7 bool
8
9config 32BIT
10 bool
11
fbe934d6
PD
12config RISCV
13 def_bool y
d4a451d5
CH
14 # even on 32-bit, physical (and DMA) addresses are > 32-bits
15 select PHYS_ADDR_T_64BIT
fbe934d6
PD
16 select OF
17 select OF_EARLY_FLATTREE
18 select OF_IRQ
fbe934d6
PD
19 select ARCH_WANT_FRAME_POINTERS
20 select CLONE_BACKWARDS
21 select COMMON_CLK
86e11757 22 select DMA_DIRECT_OPS
fbe934d6
PD
23 select GENERIC_CLOCKEVENTS
24 select GENERIC_CPU_DEVICES
25 select GENERIC_IRQ_SHOW
26 select GENERIC_PCI_IOMAP
27 select GENERIC_STRNCPY_FROM_USER
28 select GENERIC_STRNLEN_USER
29 select GENERIC_SMP_IDLE_THREAD
30 select GENERIC_ATOMIC64 if !64BIT || !RISCV_ISA_A
fbe934d6 31 select HAVE_MEMBLOCK
5ec9c4ff 32 select HAVE_MEMBLOCK_NODE_MAP
fbe934d6
PD
33 select HAVE_DMA_CONTIGUOUS
34 select HAVE_GENERIC_DMA_COHERENT
35 select IRQ_DOMAIN
36 select NO_BOOTMEM
37 select RISCV_ISA_A if SMP
38 select SPARSE_IRQ
39 select SYSCTL_EXCEPTION_TRACE
40 select HAVE_ARCH_TRACEHOOK
41 select MODULES_USE_ELF_RELA if MODULES
42 select THREAD_INFO_IN_TASK
fbe934d6 43 select RISCV_TIMER
cc6c9848 44 select GENERIC_IRQ_MULTI_HANDLER
fbe934d6
PD
45
46config MMU
47 def_bool y
48
5ec9c4ff
CH
49config ZONE_DMA32
50 bool
51 default y
52
fbe934d6
PD
53config PAGE_OFFSET
54 hex
55 default 0xC0000000 if 32BIT && MAXPHYSMEM_2GB
56 default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB
57 default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB
58
59config STACKTRACE_SUPPORT
60 def_bool y
61
10626c32
AK
62config TRACE_IRQFLAGS_SUPPORT
63 def_bool y
64
fbe934d6
PD
65config RWSEM_GENERIC_SPINLOCK
66 def_bool y
67
68config GENERIC_BUG
69 def_bool y
70 depends on BUG
71 select GENERIC_BUG_RELATIVE_POINTERS if 64BIT
72
73config GENERIC_BUG_RELATIVE_POINTERS
74 bool
75
76config GENERIC_CALIBRATE_DELAY
77 def_bool y
78
79config GENERIC_CSUM
80 def_bool y
81
82config GENERIC_HWEIGHT
83 def_bool y
84
85config PGTABLE_LEVELS
86 int
87 default 3 if 64BIT
88 default 2
89
90config HAVE_KPROBES
91 def_bool n
92
fbe934d6
PD
93menu "Platform type"
94
95choice
96 prompt "Base ISA"
97 default ARCH_RV64I
98 help
99 This selects the base ISA that this kernel will traget and must match
100 the target platform.
101
102config ARCH_RV32I
103 bool "RV32I"
fbe934d6
PD
104 select 32BIT
105 select GENERIC_ASHLDI3
106 select GENERIC_ASHRDI3
107 select GENERIC_LSHRDI3
108
109config ARCH_RV64I
110 bool "RV64I"
fbe934d6 111 select 64BIT
10626c32
AK
112 select HAVE_FUNCTION_TRACER
113 select HAVE_FUNCTION_GRAPH_TRACER
a1d2a6b4 114 select HAVE_FTRACE_MCOUNT_RECORD
c15ac4fd 115 select HAVE_DYNAMIC_FTRACE
aea4c671 116 select HAVE_DYNAMIC_FTRACE_WITH_REGS
fbe934d6
PD
117
118endchoice
119
120# We must be able to map all physical memory into the kernel, but the compiler
121# is still a bit more efficient when generating code if it's setup in a manner
122# such that it can only map 2GiB of memory.
123choice
124 prompt "Kernel Code Model"
125 default CMODEL_MEDLOW if 32BIT
126 default CMODEL_MEDANY if 64BIT
127
128 config CMODEL_MEDLOW
129 bool "medium low code model"
130 config CMODEL_MEDANY
131 bool "medium any code model"
132endchoice
133
ab1ef68e
ZL
134config MODULE_SECTIONS
135 bool
136 select HAVE_MOD_ARCH_SPECIFIC
137
fbe934d6
PD
138choice
139 prompt "Maximum Physical Memory"
140 default MAXPHYSMEM_2GB if 32BIT
141 default MAXPHYSMEM_2GB if 64BIT && CMODEL_MEDLOW
142 default MAXPHYSMEM_128GB if 64BIT && CMODEL_MEDANY
143
144 config MAXPHYSMEM_2GB
145 bool "2GiB"
146 config MAXPHYSMEM_128GB
147 depends on 64BIT && CMODEL_MEDANY
ab1ef68e 148 select MODULE_SECTIONS if MODULES
fbe934d6
PD
149 bool "128GiB"
150endchoice
151
152
153config SMP
154 bool "Symmetric Multi-Processing"
155 help
156 This enables support for systems with more than one CPU. If
157 you say N here, the kernel will run on single and
158 multiprocessor machines, but will use only one CPU of a
159 multiprocessor machine. If you say Y here, the kernel will run
160 on many, but not all, single processor machines. On a single
161 processor machine, the kernel will run faster if you say N
162 here.
163
164 If you don't know what to do here, say N.
165
166config NR_CPUS
167 int "Maximum number of CPUs (2-32)"
168 range 2 32
169 depends on SMP
170 default "8"
171
fbe934d6
PD
172choice
173 prompt "CPU Tuning"
174 default TUNE_GENERIC
175
176config TUNE_GENERIC
177 bool "generic"
178
179endchoice
180
181config RISCV_ISA_C
182 bool "Emit compressed instructions when building Linux"
183 default y
184 help
185 Adds "C" to the ISA subsets that the toolchain is allowed to emit
186 when building Linux, which results in compressed instructions in the
187 Linux binary.
188
189 If you don't know what to do here, say Y.
190
191config RISCV_ISA_A
192 def_bool y
193
194endmenu
195
196menu "Kernel type"
197
fbe934d6
PD
198source "mm/Kconfig"
199
200source "kernel/Kconfig.preempt"
201
202source "kernel/Kconfig.hz"
203
204endmenu
205
206menu "Bus support"
207
208config PCI
209 bool "PCI support"
210 select PCI_MSI
211 help
212 This feature enables support for PCI bus system. If you say Y
213 here, the kernel will include drivers and infrastructure code
214 to support PCI bus devices.
215
216 If you don't know what to do here, say Y.
217
218config PCI_DOMAINS
219 def_bool PCI
220
221config PCI_DOMAINS_GENERIC
222 def_bool PCI
223
224source "drivers/pci/Kconfig"
225
226endmenu
227
228source "init/Kconfig"
229
230source "kernel/Kconfig.freezer"
231
232menu "Executable file formats"
233
234source "fs/Kconfig.binfmt"
235
236endmenu
237
238menu "Power management options"
239
240source kernel/power/Kconfig
241
242endmenu
243
244source "net/Kconfig"
245
246source "drivers/Kconfig"
247
248source "fs/Kconfig"
249
250menu "Kernel hacking"
251
252config CMDLINE_BOOL
253 bool "Built-in kernel command line"
254 help
255 For most platforms, it is firmware or second stage bootloader
256 that by default specifies the kernel command line options.
257 However, it might be necessary or advantageous to either override
258 the default kernel command line or add a few extra options to it.
259 For such cases, this option allows hardcoding command line options
260 directly into the kernel.
261
262 For that, choose 'Y' here and fill in the extra boot parameters
263 in CONFIG_CMDLINE.
264
265 The built-in options will be concatenated to the default command
f6a11d9f 266 line if CMDLINE_FORCE is set to 'N'. Otherwise, the default
fbe934d6
PD
267 command line will be ignored and replaced by the built-in string.
268
269config CMDLINE
270 string "Built-in kernel command string"
271 depends on CMDLINE_BOOL
272 default ""
273 help
274 Supply command-line options at build time by entering them here.
275
f6a11d9f 276config CMDLINE_FORCE
fbe934d6
PD
277 bool "Built-in command line overrides bootloader arguments"
278 depends on CMDLINE_BOOL
279 help
280 Set this option to 'Y' to have the kernel ignore the bootloader
281 or firmware command line. Instead, the built-in command line
282 will be used exclusively.
283
284 If you don't know what to do here, say N.
285
286config EARLY_PRINTK
287 def_bool y
288
289source "lib/Kconfig.debug"
290
291config CMDLINE_BOOL
292 bool
293endmenu
294
295source "security/Kconfig"
296
297source "crypto/Kconfig"
298
299source "lib/Kconfig"
This page took 0.136541 seconds and 4 git commands to generate.