blob: 274bc064c41f84698b7023d616a243eebc57adcc [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
Christoph Hellwigc3e4ed02018-04-27 08:38:23 +02006config 64BIT
7 bool
8
9config 32BIT
10 bool
11
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070012config RISCV
13 def_bool y
Christoph Hellwigd4a451d2018-04-03 16:24:20 +020014 # even on 32-bit, physical (and DMA) addresses are > 32-bits
15 select PHYS_ADDR_T_64BIT
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070016 select OF
17 select OF_EARLY_FLATTREE
18 select OF_IRQ
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070019 select ARCH_WANT_FRAME_POINTERS
20 select CLONE_BACKWARDS
21 select COMMON_CLK
Christoph Hellwig86e11752018-04-16 14:53:51 +020022 select DMA_DIRECT_OPS
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070023 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
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070031 select HAVE_MEMBLOCK
Christoph Hellwig5ec9c4f2018-01-16 09:37:50 +010032 select HAVE_MEMBLOCK_NODE_MAP
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070033 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
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070043 select RISCV_TIMER
Palmer Dabbeltcc6c9842018-03-07 15:57:28 -080044 select GENERIC_IRQ_MULTI_HANDLER
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070045
46config MMU
47 def_bool y
48
Christoph Hellwig5ec9c4f2018-01-16 09:37:50 +010049config ZONE_DMA32
50 bool
Christoph Hellwigf1306f02018-04-27 08:41:09 +020051 default y if 64BIT
Christoph Hellwig5ec9c4f2018-01-16 09:37:50 +010052
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070053config 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"
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -0700104 select 32BIT
105 select GENERIC_ASHLDI3
106 select GENERIC_ASHRDI3
107 select GENERIC_LSHRDI3
108
109config ARCH_RV64I
110 bool "RV64I"
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -0700111 select 64BIT
Alan Kao10626c32017-12-18 17:52:48 +0800112 select HAVE_FUNCTION_TRACER
113 select HAVE_FUNCTION_GRAPH_TRACER
Alan Kaoa1d2a6b2018-02-13 13:13:16 +0800114 select HAVE_FTRACE_MCOUNT_RECORD
Alan Kaoc15ac4f2018-02-13 13:13:17 +0800115 select HAVE_DYNAMIC_FTRACE
Alan Kaoaea4c672018-02-13 13:13:20 +0800116 select HAVE_DYNAMIC_FTRACE_WITH_REGS
Christoph Hellwig10314e02018-04-27 08:43:14 +0200117 select SWIOTLB
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
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -0700173choice
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
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -0700199source "mm/Kconfig"
200
201source "kernel/Kconfig.preempt"
202
203source "kernel/Kconfig.hz"
204
205endmenu
206
207menu "Bus support"
208
209config PCI
210 bool "PCI support"
211 select PCI_MSI
212 help
213 This feature enables support for PCI bus system. If you say Y
214 here, the kernel will include drivers and infrastructure code
215 to support PCI bus devices.
216
217 If you don't know what to do here, say Y.
218
219config PCI_DOMAINS
220 def_bool PCI
221
222config PCI_DOMAINS_GENERIC
223 def_bool PCI
224
225source "drivers/pci/Kconfig"
226
227endmenu
228
229source "init/Kconfig"
230
231source "kernel/Kconfig.freezer"
232
233menu "Executable file formats"
234
235source "fs/Kconfig.binfmt"
236
237endmenu
238
239menu "Power management options"
240
241source kernel/power/Kconfig
242
243endmenu
244
245source "net/Kconfig"
246
247source "drivers/Kconfig"
248
249source "fs/Kconfig"
250
251menu "Kernel hacking"
252
253config CMDLINE_BOOL
254 bool "Built-in kernel command line"
255 help
256 For most platforms, it is firmware or second stage bootloader
257 that by default specifies the kernel command line options.
258 However, it might be necessary or advantageous to either override
259 the default kernel command line or add a few extra options to it.
260 For such cases, this option allows hardcoding command line options
261 directly into the kernel.
262
263 For that, choose 'Y' here and fill in the extra boot parameters
264 in CONFIG_CMDLINE.
265
266 The built-in options will be concatenated to the default command
Palmer Dabbeltf6a11d92018-03-13 13:31:20 -0700267 line if CMDLINE_FORCE is set to 'N'. Otherwise, the default
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -0700268 command line will be ignored and replaced by the built-in string.
269
270config CMDLINE
271 string "Built-in kernel command string"
272 depends on CMDLINE_BOOL
273 default ""
274 help
275 Supply command-line options at build time by entering them here.
276
Palmer Dabbeltf6a11d92018-03-13 13:31:20 -0700277config CMDLINE_FORCE
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -0700278 bool "Built-in command line overrides bootloader arguments"
279 depends on CMDLINE_BOOL
280 help
281 Set this option to 'Y' to have the kernel ignore the bootloader
282 or firmware command line. Instead, the built-in command line
283 will be used exclusively.
284
285 If you don't know what to do here, say N.
286
287config EARLY_PRINTK
288 def_bool y
289
290source "lib/Kconfig.debug"
291
292config CMDLINE_BOOL
293 bool
294endmenu
295
296source "security/Kconfig"
297
298source "crypto/Kconfig"
299
300source "lib/Kconfig"