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