blob: cd4fd85fde84e76fa205737076c5a721b9f4c6f4 [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_API_DEBUG
26 select HAVE_DMA_CONTIGUOUS
27 select HAVE_GENERIC_DMA_COHERENT
28 select IRQ_DOMAIN
29 select NO_BOOTMEM
30 select RISCV_ISA_A if SMP
31 select SPARSE_IRQ
32 select SYSCTL_EXCEPTION_TRACE
33 select HAVE_ARCH_TRACEHOOK
34 select MODULES_USE_ELF_RELA if MODULES
35 select THREAD_INFO_IN_TASK
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070036 select RISCV_TIMER
Palmer Dabbeltcc6c9842018-03-07 15:57:28 -080037 select GENERIC_IRQ_MULTI_HANDLER
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070038
39config MMU
40 def_bool y
41
42# even on 32-bit, physical (and DMA) addresses are > 32-bits
43config ARCH_PHYS_ADDR_T_64BIT
44 def_bool y
45
Christoph Hellwig5ec9c4f2018-01-16 09:37:50 +010046config ZONE_DMA32
47 bool
48 default y
49
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070050config ARCH_DMA_ADDR_T_64BIT
51 def_bool y
52
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
Alan Kao10626c32017-12-18 17:52:48 +080062config TRACE_IRQFLAGS_SUPPORT
63 def_bool y
64
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070065config 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
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070093menu "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"
104 select CPU_SUPPORTS_32BIT_KERNEL
105 select 32BIT
106 select GENERIC_ASHLDI3
107 select GENERIC_ASHRDI3
108 select GENERIC_LSHRDI3
109
110config ARCH_RV64I
111 bool "RV64I"
112 select CPU_SUPPORTS_64BIT_KERNEL
113 select 64BIT
Alan Kao10626c32017-12-18 17:52:48 +0800114 select HAVE_FUNCTION_TRACER
115 select HAVE_FUNCTION_GRAPH_TRACER
Alan Kaoa1d2a6b2018-02-13 13:13:16 +0800116 select HAVE_FTRACE_MCOUNT_RECORD
Alan Kaoc15ac4f2018-02-13 13:13:17 +0800117 select HAVE_DYNAMIC_FTRACE
Alan Kaoaea4c672018-02-13 13:13:20 +0800118 select HAVE_DYNAMIC_FTRACE_WITH_REGS
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -0700119
120endchoice
121
122# We must be able to map all physical memory into the kernel, but the compiler
123# is still a bit more efficient when generating code if it's setup in a manner
124# such that it can only map 2GiB of memory.
125choice
126 prompt "Kernel Code Model"
127 default CMODEL_MEDLOW if 32BIT
128 default CMODEL_MEDANY if 64BIT
129
130 config CMODEL_MEDLOW
131 bool "medium low code model"
132 config CMODEL_MEDANY
133 bool "medium any code model"
134endchoice
135
Zong Liab1ef682018-03-15 16:50:41 +0800136config MODULE_SECTIONS
137 bool
138 select HAVE_MOD_ARCH_SPECIFIC
139
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -0700140choice
141 prompt "Maximum Physical Memory"
142 default MAXPHYSMEM_2GB if 32BIT
143 default MAXPHYSMEM_2GB if 64BIT && CMODEL_MEDLOW
144 default MAXPHYSMEM_128GB if 64BIT && CMODEL_MEDANY
145
146 config MAXPHYSMEM_2GB
147 bool "2GiB"
148 config MAXPHYSMEM_128GB
149 depends on 64BIT && CMODEL_MEDANY
Zong Liab1ef682018-03-15 16:50:41 +0800150 select MODULE_SECTIONS if MODULES
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -0700151 bool "128GiB"
152endchoice
153
154
155config SMP
156 bool "Symmetric Multi-Processing"
157 help
158 This enables support for systems with more than one CPU. If
159 you say N here, the kernel will run on single and
160 multiprocessor machines, but will use only one CPU of a
161 multiprocessor machine. If you say Y here, the kernel will run
162 on many, but not all, single processor machines. On a single
163 processor machine, the kernel will run faster if you say N
164 here.
165
166 If you don't know what to do here, say N.
167
168config NR_CPUS
169 int "Maximum number of CPUs (2-32)"
170 range 2 32
171 depends on SMP
172 default "8"
173
174config CPU_SUPPORTS_32BIT_KERNEL
175 bool
176config CPU_SUPPORTS_64BIT_KERNEL
177 bool
178
179choice
180 prompt "CPU Tuning"
181 default TUNE_GENERIC
182
183config TUNE_GENERIC
184 bool "generic"
185
186endchoice
187
188config RISCV_ISA_C
189 bool "Emit compressed instructions when building Linux"
190 default y
191 help
192 Adds "C" to the ISA subsets that the toolchain is allowed to emit
193 when building Linux, which results in compressed instructions in the
194 Linux binary.
195
196 If you don't know what to do here, say Y.
197
198config RISCV_ISA_A
199 def_bool y
200
201endmenu
202
203menu "Kernel type"
204
205choice
206 prompt "Kernel code model"
207 default 64BIT
208
209config 32BIT
210 bool "32-bit kernel"
211 depends on CPU_SUPPORTS_32BIT_KERNEL
212 help
213 Select this option to build a 32-bit kernel.
214
215config 64BIT
216 bool "64-bit kernel"
217 depends on CPU_SUPPORTS_64BIT_KERNEL
218 help
219 Select this option to build a 64-bit kernel.
220
221endchoice
222
223source "mm/Kconfig"
224
225source "kernel/Kconfig.preempt"
226
227source "kernel/Kconfig.hz"
228
229endmenu
230
231menu "Bus support"
232
233config PCI
234 bool "PCI support"
235 select PCI_MSI
236 help
237 This feature enables support for PCI bus system. If you say Y
238 here, the kernel will include drivers and infrastructure code
239 to support PCI bus devices.
240
241 If you don't know what to do here, say Y.
242
243config PCI_DOMAINS
244 def_bool PCI
245
246config PCI_DOMAINS_GENERIC
247 def_bool PCI
248
249source "drivers/pci/Kconfig"
250
251endmenu
252
253source "init/Kconfig"
254
255source "kernel/Kconfig.freezer"
256
257menu "Executable file formats"
258
259source "fs/Kconfig.binfmt"
260
261endmenu
262
263menu "Power management options"
264
265source kernel/power/Kconfig
266
267endmenu
268
269source "net/Kconfig"
270
271source "drivers/Kconfig"
272
273source "fs/Kconfig"
274
275menu "Kernel hacking"
276
277config CMDLINE_BOOL
278 bool "Built-in kernel command line"
279 help
280 For most platforms, it is firmware or second stage bootloader
281 that by default specifies the kernel command line options.
282 However, it might be necessary or advantageous to either override
283 the default kernel command line or add a few extra options to it.
284 For such cases, this option allows hardcoding command line options
285 directly into the kernel.
286
287 For that, choose 'Y' here and fill in the extra boot parameters
288 in CONFIG_CMDLINE.
289
290 The built-in options will be concatenated to the default command
Palmer Dabbeltf6a11d92018-03-13 13:31:20 -0700291 line if CMDLINE_FORCE is set to 'N'. Otherwise, the default
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -0700292 command line will be ignored and replaced by the built-in string.
293
294config CMDLINE
295 string "Built-in kernel command string"
296 depends on CMDLINE_BOOL
297 default ""
298 help
299 Supply command-line options at build time by entering them here.
300
Palmer Dabbeltf6a11d92018-03-13 13:31:20 -0700301config CMDLINE_FORCE
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -0700302 bool "Built-in command line overrides bootloader arguments"
303 depends on CMDLINE_BOOL
304 help
305 Set this option to 'Y' to have the kernel ignore the bootloader
306 or firmware command line. Instead, the built-in command line
307 will be used exclusively.
308
309 If you don't know what to do here, say N.
310
311config EARLY_PRINTK
312 def_bool y
313
314source "lib/Kconfig.debug"
315
316config CMDLINE_BOOL
317 bool
318endmenu
319
320source "security/Kconfig"
321
322source "crypto/Kconfig"
323
324source "lib/Kconfig"