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