Merge branch 'pcmcia' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia
[platform/kernel/linux-rpi.git] / arch / tile / Kconfig
1 # SPDX-License-Identifier: GPL-2.0
2 # For a description of the syntax of this configuration file,
3 # see Documentation/kbuild/kconfig-language.txt.
4
5 config TILE
6         def_bool y
7         select ARCH_HAS_DEVMEM_IS_ALLOWED
8         select ARCH_HAVE_NMI_SAFE_CMPXCHG
9         select ARCH_WANT_FRAME_POINTERS
10         select CC_OPTIMIZE_FOR_SIZE
11         select EDAC_SUPPORT
12         select GENERIC_CLOCKEVENTS
13         select GENERIC_FIND_FIRST_BIT
14         select GENERIC_IRQ_PROBE
15         select GENERIC_IRQ_SHOW
16         select GENERIC_PENDING_IRQ if SMP
17         select GENERIC_STRNCPY_FROM_USER
18         select GENERIC_STRNLEN_USER
19         select HAVE_ARCH_SECCOMP_FILTER
20         select HAVE_ARCH_TRACEHOOK
21         select HAVE_CONTEXT_TRACKING
22         select HAVE_DEBUG_BUGVERBOSE
23         select HAVE_DEBUG_KMEMLEAK
24         select HAVE_DEBUG_STACKOVERFLOW
25         select HAVE_DMA_API_DEBUG
26         select HAVE_EXIT_THREAD
27         select HAVE_KVM if !TILEGX
28         select HAVE_NMI if USE_PMC
29         select HAVE_PERF_EVENTS
30         select HAVE_SYSCALL_TRACEPOINTS
31         select MODULES_USE_ELF_RELA
32         select SYSCTL_EXCEPTION_TRACE
33         select SYS_HYPERVISOR
34         select USER_STACKTRACE_SUPPORT
35         select USE_PMC if PERF_EVENTS
36         select VIRT_TO_BUS
37
38 config MMU
39         def_bool y
40
41 config GENERIC_CSUM
42         def_bool y
43
44 config HAVE_ARCH_ALLOC_REMAP
45         def_bool y
46
47 config HAVE_SETUP_PER_CPU_AREA
48         def_bool y
49
50 config NEED_PER_CPU_PAGE_FIRST_CHUNK
51         def_bool y
52
53 config SYS_SUPPORTS_HUGETLBFS
54         def_bool y
55
56 # Support for additional huge page sizes besides HPAGE_SIZE.
57 # The software support is currently only present in the TILE-Gx
58 # hypervisor. TILEPro in any case does not support page sizes
59 # larger than the default HPAGE_SIZE.
60 config HUGETLB_SUPER_PAGES
61         depends on HUGETLB_PAGE && TILEGX
62         def_bool y
63
64 config GENERIC_TIME_VSYSCALL
65         def_bool y
66
67 # Enable PMC if PERF_EVENTS, OPROFILE, or WATCHPOINTS are enabled.
68 config USE_PMC
69         bool
70
71 # FIXME: tilegx can implement a more efficient rwsem.
72 config RWSEM_GENERIC_SPINLOCK
73         def_bool y
74
75 # We only support gcc 4.4 and above, so this should work.
76 config ARCH_SUPPORTS_OPTIMIZED_INLINING
77         def_bool y
78
79 config ARCH_PHYS_ADDR_T_64BIT
80         def_bool y
81
82 config ARCH_DMA_ADDR_T_64BIT
83         def_bool y
84
85 config NEED_DMA_MAP_STATE
86         def_bool y
87
88 config ARCH_HAS_DMA_SET_COHERENT_MASK
89         bool
90
91 config LOCKDEP_SUPPORT
92         def_bool y
93
94 config STACKTRACE_SUPPORT
95         def_bool y
96         select STACKTRACE
97
98 # We use discontigmem for now; at some point we may want to switch
99 # to sparsemem (Tilera bug 7996).
100 config ARCH_DISCONTIGMEM_ENABLE
101         def_bool y
102
103 config ARCH_DISCONTIGMEM_DEFAULT
104         def_bool y
105
106 config TRACE_IRQFLAGS_SUPPORT
107         def_bool y
108
109 # SMP is required for Tilera Linux.
110 config SMP
111         def_bool y
112
113 config HVC_TILE
114         depends on TTY
115         select HVC_DRIVER
116         select HVC_IRQ if TILEGX
117         def_bool y
118
119 # Building with ARCH=tilegx (or ARCH=tile) implies using the
120 # 64-bit TILE-Gx toolchain, so force CONFIG_TILEGX on.
121 config TILEGX
122         def_bool ARCH != "tilepro"
123         select ARCH_SUPPORTS_ATOMIC_RMW
124         select GENERIC_IRQ_LEGACY_ALLOC_HWIRQ
125         select HAVE_ARCH_JUMP_LABEL
126         select HAVE_ARCH_KGDB
127         select HAVE_DYNAMIC_FTRACE
128         select HAVE_FTRACE_MCOUNT_RECORD
129         select HAVE_FUNCTION_GRAPH_TRACER
130         select HAVE_FUNCTION_TRACER
131         select HAVE_KPROBES
132         select HAVE_KRETPROBES
133         select SPARSE_IRQ
134
135 config TILEPRO
136         def_bool !TILEGX
137
138 config 64BIT
139         def_bool TILEGX
140
141 config ARCH_DEFCONFIG
142         string
143         default "arch/tile/configs/tilepro_defconfig" if !TILEGX
144         default "arch/tile/configs/tilegx_defconfig" if TILEGX
145
146 config PGTABLE_LEVELS
147         int
148         default 3 if 64BIT
149         default 2
150
151 source "init/Kconfig"
152
153 source "kernel/Kconfig.freezer"
154
155 menu "Tilera-specific configuration"
156
157 config NR_CPUS
158         int "Maximum number of tiles (2-255)"
159         range 2 255
160         depends on SMP
161         default "64"
162         ---help---
163           Building with 64 is the recommended value, but a slightly
164           smaller kernel memory footprint results from using a smaller
165           value on chips with fewer tiles.
166
167 choice
168         prompt "Kernel page size"
169         default PAGE_SIZE_64KB
170         help
171           This lets you select the page size of the kernel.  For best
172           performance on memory-intensive applications, a page size of 64KB
173           is recommended.  For workloads involving many small files, many
174           connections, etc., it may be better to select 16KB, which uses
175           memory more efficiently at some cost in TLB performance.
176
177           Note that for TILEPro, you must also rebuild the hypervisor
178           with a matching page size.
179
180 config PAGE_SIZE_4KB
181         bool "4KB" if TILEPRO
182
183 config PAGE_SIZE_16KB
184         bool "16KB"
185
186 config PAGE_SIZE_64KB
187         bool "64KB"
188
189 endchoice
190
191 source "kernel/Kconfig.hz"
192
193 config KEXEC
194         bool "kexec system call"
195         select KEXEC_CORE
196         ---help---
197           kexec is a system call that implements the ability to shutdown your
198           current kernel, and to start another kernel.  It is like a reboot
199           but it is independent of the system firmware.   It is used
200           to implement the "mboot" Tilera booter.
201
202           The name comes from the similarity to the exec system call.
203
204 config COMPAT
205         bool "Support 32-bit TILE-Gx binaries in addition to 64-bit"
206         depends on TILEGX
207         select COMPAT_BINFMT_ELF
208         default y
209         ---help---
210           If enabled, the kernel will support running TILE-Gx binaries
211           that were built with the -m32 option.
212
213 config SECCOMP
214         bool "Enable seccomp to safely compute untrusted bytecode"
215         depends on PROC_FS
216         help
217           This kernel feature is useful for number crunching applications
218           that may need to compute untrusted bytecode during their
219           execution. By using pipes or other transports made available to
220           the process as file descriptors supporting the read/write
221           syscalls, it's possible to isolate those applications in
222           their own address space using seccomp. Once seccomp is
223           enabled via prctl, it cannot be disabled and the task is only
224           allowed to execute a few safe syscalls defined by each seccomp
225           mode.
226
227           If unsure, say N.
228
229 config SYSVIPC_COMPAT
230         def_bool y
231         depends on COMPAT && SYSVIPC
232
233 # We do not currently support disabling HIGHMEM on tilepro.
234 config HIGHMEM
235         bool # "Support for more than 512 MB of RAM"
236         default !TILEGX
237         ---help---
238           Linux can use the full amount of RAM in the system by
239           default.  However, the address space of TILE processors is
240           only 4 Gigabytes large. That means that, if you have a large
241           amount of physical memory, not all of it can be "permanently
242           mapped" by the kernel. The physical memory that's not
243           permanently mapped is called "high memory".
244
245           If you are compiling a kernel which will never run on a
246           machine with more than 512 MB total physical RAM, answer
247           "false" here. This will result in the kernel mapping all of
248           physical memory into the top 1 GB of virtual memory space.
249
250           If unsure, say "true".
251
252 config ZONE_DMA32
253         def_bool y
254
255 config IOMMU_HELPER
256         bool
257
258 config NEED_SG_DMA_LENGTH
259         bool
260
261 config SWIOTLB
262         bool
263         default TILEGX
264         select DMA_DIRECT_OPS
265         select IOMMU_HELPER
266         select NEED_SG_DMA_LENGTH
267         select ARCH_HAS_DMA_SET_COHERENT_MASK
268
269 # We do not currently support disabling NUMA.
270 config NUMA
271         bool # "NUMA Memory Allocation and Scheduler Support"
272         depends on SMP && DISCONTIGMEM
273         default y
274         ---help---
275           NUMA memory allocation is required for TILE processors
276           unless booting with memory striping enabled in the
277           hypervisor, or with only a single memory controller.
278           It is recommended that this option always be enabled.
279
280 config NODES_SHIFT
281         int "Log base 2 of the max number of memory controllers"
282         default 2
283         depends on NEED_MULTIPLE_NODES
284         ---help---
285           By default, 2, i.e. 2^2 == 4 DDR2 controllers.
286           In a system with more controllers, this value should be raised.
287
288 choice
289         depends on !TILEGX
290         prompt "Memory split" if EXPERT
291         default VMSPLIT_3G
292         ---help---
293           Select the desired split between kernel and user memory.
294
295           If the address range available to the kernel is less than the
296           physical memory installed, the remaining memory will be available
297           as "high memory". Accessing high memory is a little more costly
298           than low memory, as it needs to be mapped into the kernel first.
299           Note that increasing the kernel address space limits the range
300           available to user programs, making the address space there
301           tighter.  Selecting anything other than the default 3G/1G split
302           will also likely make your kernel incompatible with binary-only
303           kernel modules.
304
305           If you are not absolutely sure what you are doing, leave this
306           option alone!
307
308         config VMSPLIT_3_75G
309                 bool "3.75G/0.25G user/kernel split (no kernel networking)"
310         config VMSPLIT_3_5G
311                 bool "3.5G/0.5G user/kernel split"
312         config VMSPLIT_3G
313                 bool "3G/1G user/kernel split"
314         config VMSPLIT_2_75G
315                 bool "2.75G/1.25G user/kernel split (for full 1G low memory)"
316         config VMSPLIT_2_5G
317                 bool "2.5G/1.5G user/kernel split"
318         config VMSPLIT_2_25G
319                 bool "2.25G/1.75G user/kernel split"
320         config VMSPLIT_2G
321                 bool "2G/2G user/kernel split"
322         config VMSPLIT_1G
323                 bool "1G/3G user/kernel split"
324 endchoice
325
326 config PAGE_OFFSET
327         hex
328         depends on !64BIT
329         default 0xF0000000 if VMSPLIT_3_75G
330         default 0xE0000000 if VMSPLIT_3_5G
331         default 0xB0000000 if VMSPLIT_2_75G
332         default 0xA0000000 if VMSPLIT_2_5G
333         default 0x90000000 if VMSPLIT_2_25G
334         default 0x80000000 if VMSPLIT_2G
335         default 0x40000000 if VMSPLIT_1G
336         default 0xC0000000
337
338 source "mm/Kconfig"
339
340 source "kernel/Kconfig.preempt"
341
342 config CMDLINE_BOOL
343         bool "Built-in kernel command line"
344         default n
345         ---help---
346           Allow for specifying boot arguments to the kernel at
347           build time.  On some systems (e.g. embedded ones), it is
348           necessary or convenient to provide some or all of the
349           kernel boot arguments with the kernel itself (that is,
350           to not rely on the boot loader to provide them.)
351
352           To compile command line arguments into the kernel,
353           set this option to 'Y', then fill in the
354           the boot arguments in CONFIG_CMDLINE.
355
356           Systems with fully functional boot loaders (e.g. mboot, or
357           if booting over PCI) should leave this option set to 'N'.
358
359 config CMDLINE
360         string "Built-in kernel command string"
361         depends on CMDLINE_BOOL
362         default ""
363         ---help---
364           Enter arguments here that should be compiled into the kernel
365           image and used at boot time.  If the boot loader provides a
366           command line at boot time, it is appended to this string to
367           form the full kernel command line, when the system boots.
368
369           However, you can use the CONFIG_CMDLINE_OVERRIDE option to
370           change this behavior.
371
372           In most cases, the command line (whether built-in or provided
373           by the boot loader) should specify the device for the root
374           file system.
375
376 config CMDLINE_OVERRIDE
377         bool "Built-in command line overrides boot loader arguments"
378         default n
379         depends on CMDLINE_BOOL
380         ---help---
381           Set this option to 'Y' to have the kernel ignore the boot loader
382           command line, and use ONLY the built-in command line.
383
384           This is used to work around broken boot loaders.  This should
385           be set to 'N' under normal conditions.
386
387 config VMALLOC_RESERVE
388         hex
389         default 0x2000000
390
391 config HARDWALL
392         bool "Hardwall support to allow access to user dynamic network"
393         default y
394
395 config KERNEL_PL
396         int "Processor protection level for kernel"
397         range 1 2
398         default 2 if TILEGX
399         default 1 if !TILEGX
400         ---help---
401           Since MDE 4.2, the Tilera hypervisor runs the kernel
402           at PL2 by default.  If running under an older hypervisor,
403           or as a KVM guest, you must run at PL1.  (The current
404           hypervisor may also be recompiled with "make HV_PL=2" to
405           allow it to run a kernel at PL1, but clients running at PL1
406           are not expected to be supported indefinitely.)
407
408           If you're not sure, don't change the default.
409
410 source "arch/tile/gxio/Kconfig"
411
412 endmenu  # Tilera-specific configuration
413
414 menu "Bus options"
415
416 config PCI
417         bool "PCI support"
418         default y
419         select PCI_DOMAINS
420         select GENERIC_PCI_IOMAP
421         select TILE_GXIO_TRIO if TILEGX
422         select PCI_MSI if TILEGX
423         ---help---
424           Enable PCI root complex support, so PCIe endpoint devices can
425           be attached to the Tile chip.  Many, but not all, PCI devices
426           are supported under Tilera's root complex driver.
427
428 config PCI_DOMAINS
429         bool
430
431 config NO_IOMEM
432         def_bool !PCI
433
434 config NO_IOPORT_MAP
435         def_bool !PCI
436
437 config TILE_PCI_IO
438         bool "PCI I/O space support"
439         default n
440         depends on PCI
441         depends on TILEGX
442         ---help---
443           Enable PCI I/O space support on TILEGx. Since the PCI I/O space
444           is used by few modern PCIe endpoint devices, its support is disabled
445           by default to save the TRIO PIO Region resource for other purposes.
446
447 source "drivers/pci/Kconfig"
448
449 config TILE_USB
450         tristate "Tilera USB host adapter support"
451         default y
452         depends on USB
453         depends on TILEGX
454         select TILE_GXIO_USB_HOST
455         ---help---
456           Provides USB host adapter support for the built-in EHCI and OHCI
457           interfaces on TILE-Gx chips.
458
459 endmenu
460
461 menu "Executable file formats"
462
463 source "fs/Kconfig.binfmt"
464
465 endmenu
466
467 source "net/Kconfig"
468
469 source "drivers/Kconfig"
470
471 source "fs/Kconfig"
472
473 source "arch/tile/Kconfig.debug"
474
475 source "security/Kconfig"
476
477 source "crypto/Kconfig"
478
479 source "lib/Kconfig"
480
481 source "arch/tile/kvm/Kconfig"