arch: Move CONFIG_DEBUG_RODATA and CONFIG_SET_MODULE_RONX to be common
[linux-block.git] / arch / arm64 / Kconfig
CommitLineData
8c2c3df3
CM
1config ARM64
2 def_bool y
b6197b93 3 select ACPI_CCA_REQUIRED if ACPI
d8f4f161 4 select ACPI_GENERIC_GSI if ACPI
6933de0c 5 select ACPI_REDUCED_HARDWARE_ONLY if ACPI
0cb0786b 6 select ACPI_MCFG if ACPI
888125a7 7 select ACPI_SPCR_TABLE if ACPI
1d8f51d4 8 select ARCH_CLOCKSOURCE_DATA
21266be9 9 select ARCH_HAS_DEVMEM_IS_ALLOWED
38b04a74 10 select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
2b68f6ca 11 select ARCH_HAS_ELF_RANDOMIZE
957e3fac 12 select ARCH_HAS_GCOV_PROFILE_ALL
14f09910 13 select ARCH_HAS_GIGANTIC_PAGE
5e4c7549 14 select ARCH_HAS_KCOV
308c09f1 15 select ARCH_HAS_SG_CHAIN
ad21fc4f
LA
16 select ARCH_HAS_STRICT_KERNEL_RWX
17 select ARCH_HAS_STRICT_MODULE_RWX
1f85008e 18 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
c63c8700 19 select ARCH_USE_CMPXCHG_LOCKREF
4badad35 20 select ARCH_SUPPORTS_ATOMIC_RMW
56166230 21 select ARCH_SUPPORTS_NUMA_BALANCING
6212a512 22 select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
b6f35981 23 select ARCH_WANT_FRAME_POINTERS
f0b7f8a4 24 select ARCH_HAS_UBSAN_SANITIZE_ALL
25c92a37 25 select ARM_AMBA
1aee5d7a 26 select ARM_ARCH_TIMER
c4188edc 27 select ARM_GIC
875cbf3e 28 select AUDIT_ARCH_COMPAT_GENERIC
3ee80364 29 select ARM_GIC_V2M if PCI
021f6537 30 select ARM_GIC_V3
3ee80364 31 select ARM_GIC_V3_ITS if PCI
bff60792 32 select ARM_PSCI_FW
adace895 33 select BUILDTIME_EXTABLE_SORT
db2789b5 34 select CLONE_BACKWARDS
7ca2ef33 35 select COMMON_CLK
166936ba 36 select CPU_PM if (SUSPEND || CPU_IDLE)
7bc13fd3 37 select DCACHE_WORD_ACCESS
ef37566c 38 select EDAC_SUPPORT
2f34f173 39 select FRAME_POINTER
d4932f9e 40 select GENERIC_ALLOCATOR
8c2c3df3 41 select GENERIC_CLOCKEVENTS
4b3dc967 42 select GENERIC_CLOCKEVENTS_BROADCAST
3be1a5c4 43 select GENERIC_CPU_AUTOPROBE
bf4b558e 44 select GENERIC_EARLY_IOREMAP
2314ee4d 45 select GENERIC_IDLE_POLL_SETUP
8c2c3df3
CM
46 select GENERIC_IRQ_PROBE
47 select GENERIC_IRQ_SHOW
6544e67b 48 select GENERIC_IRQ_SHOW_LEVEL
cb61f676 49 select GENERIC_PCI_IOMAP
65cd4f6c 50 select GENERIC_SCHED_CLOCK
8c2c3df3 51 select GENERIC_SMP_IDLE_THREAD
12a0ef7b
WD
52 select GENERIC_STRNCPY_FROM_USER
53 select GENERIC_STRNLEN_USER
8c2c3df3 54 select GENERIC_TIME_VSYSCALL
a1ddc74a 55 select HANDLE_DOMAIN_IRQ
8c2c3df3 56 select HARDIRQS_SW_RESEND
9f9a35a7 57 select HAVE_ACPI_APEI if (ACPI && EFI)
5284e1b4 58 select HAVE_ALIGNED_STRUCT_PAGE if SLUB
875cbf3e 59 select HAVE_ARCH_AUDITSYSCALL
8e7a4cef 60 select HAVE_ARCH_BITREVERSE
faf5b63e 61 select HAVE_ARCH_HARDENED_USERCOPY
324420bf 62 select HAVE_ARCH_HUGE_VMAP
9732cafd 63 select HAVE_ARCH_JUMP_LABEL
f1b9032f 64 select HAVE_ARCH_KASAN if SPARSEMEM_VMEMMAP && !(ARM64_16K_PAGES && ARM64_VA_BITS_48)
9529247d 65 select HAVE_ARCH_KGDB
8f0d3aa9
DC
66 select HAVE_ARCH_MMAP_RND_BITS
67 select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
a1ae65b2 68 select HAVE_ARCH_SECCOMP_FILTER
8c2c3df3 69 select HAVE_ARCH_TRACEHOOK
8ee70879
YS
70 select HAVE_ARCH_TRANSPARENT_HUGEPAGE
71 select HAVE_ARM_SMCCC
6077776b 72 select HAVE_EBPF_JIT
af64d2aa 73 select HAVE_C_RECORDMCOUNT
c0c264ae 74 select HAVE_CC_STACKPROTECTOR
5284e1b4 75 select HAVE_CMPXCHG_DOUBLE
95eff6b2 76 select HAVE_CMPXCHG_LOCAL
8ee70879 77 select HAVE_CONTEXT_TRACKING
9b2a60c4 78 select HAVE_DEBUG_BUGVERBOSE
b69ec42b 79 select HAVE_DEBUG_KMEMLEAK
8c2c3df3 80 select HAVE_DMA_API_DEBUG
6ac2104d 81 select HAVE_DMA_CONTIGUOUS
bd7d38db 82 select HAVE_DYNAMIC_FTRACE
50afc33a 83 select HAVE_EFFICIENT_UNALIGNED_ACCESS
af64d2aa 84 select HAVE_FTRACE_MCOUNT_RECORD
819e50e2
AT
85 select HAVE_FUNCTION_TRACER
86 select HAVE_FUNCTION_GRAPH_TRACER
6b90bd4b 87 select HAVE_GCC_PLUGINS
8c2c3df3 88 select HAVE_GENERIC_DMA_COHERENT
8c2c3df3 89 select HAVE_HW_BREAKPOINT if PERF_EVENTS
24da208d 90 select HAVE_IRQ_TIME_ACCOUNTING
8c2c3df3 91 select HAVE_MEMBLOCK
1a2db300 92 select HAVE_MEMBLOCK_NODE_MAP if NUMA
55834a77 93 select HAVE_PATA_PLATFORM
8c2c3df3 94 select HAVE_PERF_EVENTS
2ee0d7fd
JP
95 select HAVE_PERF_REGS
96 select HAVE_PERF_USER_STACK_DUMP
0a8ea52c 97 select HAVE_REGS_AND_STACK_ACCESS_API
5e5f6dc1 98 select HAVE_RCU_TABLE_FREE
055b1212 99 select HAVE_SYSCALL_TRACEPOINTS
2dd0e8d2 100 select HAVE_KPROBES
fcfd708b 101 select HAVE_KRETPROBES if HAVE_KPROBES
876945db 102 select IOMMU_DMA if IOMMU_SUPPORT
8c2c3df3 103 select IRQ_DOMAIN
e8557d1f 104 select IRQ_FORCED_THREADING
fea2acaa 105 select MODULES_USE_ELF_RELA
8c2c3df3
CM
106 select NO_BOOTMEM
107 select OF
108 select OF_EARLY_FLATTREE
9bf14b7c 109 select OF_RESERVED_MEM
0cb0786b 110 select PCI_ECAM if ACPI
aa1e8ec1
CM
111 select POWER_RESET
112 select POWER_SUPPLY
8c2c3df3 113 select SPARSE_IRQ
7ac57a89 114 select SYSCTL_EXCEPTION_TRACE
c02433dd 115 select THREAD_INFO_IN_TASK
8c2c3df3
CM
116 help
117 ARM 64-bit (AArch64) Linux support.
118
119config 64BIT
120 def_bool y
121
122config ARCH_PHYS_ADDR_T_64BIT
123 def_bool y
124
125config MMU
126 def_bool y
127
030c4d24
MR
128config ARM64_PAGE_SHIFT
129 int
130 default 16 if ARM64_64K_PAGES
131 default 14 if ARM64_16K_PAGES
132 default 12
133
134config ARM64_CONT_SHIFT
135 int
136 default 5 if ARM64_64K_PAGES
137 default 7 if ARM64_16K_PAGES
138 default 4
139
8f0d3aa9
DC
140config ARCH_MMAP_RND_BITS_MIN
141 default 14 if ARM64_64K_PAGES
142 default 16 if ARM64_16K_PAGES
143 default 18
144
145# max bits determined by the following formula:
146# VA_BITS - PAGE_SHIFT - 3
147config ARCH_MMAP_RND_BITS_MAX
148 default 19 if ARM64_VA_BITS=36
149 default 24 if ARM64_VA_BITS=39
150 default 27 if ARM64_VA_BITS=42
151 default 30 if ARM64_VA_BITS=47
152 default 29 if ARM64_VA_BITS=48 && ARM64_64K_PAGES
153 default 31 if ARM64_VA_BITS=48 && ARM64_16K_PAGES
154 default 33 if ARM64_VA_BITS=48
155 default 14 if ARM64_64K_PAGES
156 default 16 if ARM64_16K_PAGES
157 default 18
158
159config ARCH_MMAP_RND_COMPAT_BITS_MIN
160 default 7 if ARM64_64K_PAGES
161 default 9 if ARM64_16K_PAGES
162 default 11
163
164config ARCH_MMAP_RND_COMPAT_BITS_MAX
165 default 16
166
ce816fa8 167config NO_IOPORT_MAP
d1e6dc91 168 def_bool y if !PCI
8c2c3df3
CM
169
170config STACKTRACE_SUPPORT
171 def_bool y
172
bf0c4e04
JVS
173config ILLEGAL_POINTER_VALUE
174 hex
175 default 0xdead000000000000
176
8c2c3df3
CM
177config LOCKDEP_SUPPORT
178 def_bool y
179
180config TRACE_IRQFLAGS_SUPPORT
181 def_bool y
182
c209f799 183config RWSEM_XCHGADD_ALGORITHM
8c2c3df3
CM
184 def_bool y
185
9fb7410f
DM
186config GENERIC_BUG
187 def_bool y
188 depends on BUG
189
190config GENERIC_BUG_RELATIVE_POINTERS
191 def_bool y
192 depends on GENERIC_BUG
193
8c2c3df3
CM
194config GENERIC_HWEIGHT
195 def_bool y
196
197config GENERIC_CSUM
198 def_bool y
199
200config GENERIC_CALIBRATE_DELAY
201 def_bool y
202
19e7640d 203config ZONE_DMA
8c2c3df3
CM
204 def_bool y
205
29e56940
SC
206config HAVE_GENERIC_RCU_GUP
207 def_bool y
208
8c2c3df3
CM
209config ARCH_DMA_ADDR_T_64BIT
210 def_bool y
211
212config NEED_DMA_MAP_STATE
213 def_bool y
214
215config NEED_SG_DMA_LENGTH
216 def_bool y
217
4b3dc967
WD
218config SMP
219 def_bool y
220
8c2c3df3
CM
221config SWIOTLB
222 def_bool y
223
224config IOMMU_HELPER
225 def_bool SWIOTLB
226
4cfb3613
AB
227config KERNEL_MODE_NEON
228 def_bool y
229
92cc15fc
RH
230config FIX_EARLYCON_MEM
231 def_bool y
232
9f25e6ad
KS
233config PGTABLE_LEVELS
234 int
21539939 235 default 2 if ARM64_16K_PAGES && ARM64_VA_BITS_36
9f25e6ad
KS
236 default 2 if ARM64_64K_PAGES && ARM64_VA_BITS_42
237 default 3 if ARM64_64K_PAGES && ARM64_VA_BITS_48
238 default 3 if ARM64_4K_PAGES && ARM64_VA_BITS_39
44eaacf1
SP
239 default 3 if ARM64_16K_PAGES && ARM64_VA_BITS_47
240 default 4 if !ARM64_64K_PAGES && ARM64_VA_BITS_48
9f25e6ad 241
9842ceae
PA
242config ARCH_SUPPORTS_UPROBES
243 def_bool y
244
8c2c3df3
CM
245source "init/Kconfig"
246
247source "kernel/Kconfig.freezer"
248
6a377491 249source "arch/arm64/Kconfig.platforms"
8c2c3df3
CM
250
251menu "Bus support"
252
d1e6dc91
LD
253config PCI
254 bool "PCI support"
255 help
256 This feature enables support for PCI bus system. If you say Y
257 here, the kernel will include drivers and infrastructure code
258 to support PCI bus devices.
259
260config PCI_DOMAINS
261 def_bool PCI
262
263config PCI_DOMAINS_GENERIC
264 def_bool PCI
265
266config PCI_SYSCALL
267 def_bool PCI
268
269source "drivers/pci/Kconfig"
d1e6dc91 270
8c2c3df3
CM
271endmenu
272
273menu "Kernel Features"
274
c0a01b84
AP
275menu "ARM errata workarounds via the alternatives framework"
276
277config ARM64_ERRATUM_826319
278 bool "Cortex-A53: 826319: System might deadlock if a write cannot complete until read data is accepted"
279 default y
280 help
281 This option adds an alternative code sequence to work around ARM
282 erratum 826319 on Cortex-A53 parts up to r0p2 with an AMBA 4 ACE or
283 AXI master interface and an L2 cache.
284
285 If a Cortex-A53 uses an AMBA AXI4 ACE interface to other processors
286 and is unable to accept a certain write via this interface, it will
287 not progress on read data presented on the read data channel and the
288 system can deadlock.
289
290 The workaround promotes data cache clean instructions to
291 data cache clean-and-invalidate.
292 Please note that this does not necessarily enable the workaround,
293 as it depends on the alternative framework, which will only patch
294 the kernel if an affected CPU is detected.
295
296 If unsure, say Y.
297
298config ARM64_ERRATUM_827319
299 bool "Cortex-A53: 827319: Data cache clean instructions might cause overlapping transactions to the interconnect"
300 default y
301 help
302 This option adds an alternative code sequence to work around ARM
303 erratum 827319 on Cortex-A53 parts up to r0p2 with an AMBA 5 CHI
304 master interface and an L2 cache.
305
306 Under certain conditions this erratum can cause a clean line eviction
307 to occur at the same time as another transaction to the same address
308 on the AMBA 5 CHI interface, which can cause data corruption if the
309 interconnect reorders the two transactions.
310
311 The workaround promotes data cache clean instructions to
312 data cache clean-and-invalidate.
313 Please note that this does not necessarily enable the workaround,
314 as it depends on the alternative framework, which will only patch
315 the kernel if an affected CPU is detected.
316
317 If unsure, say Y.
318
319config ARM64_ERRATUM_824069
320 bool "Cortex-A53: 824069: Cache line might not be marked as clean after a CleanShared snoop"
321 default y
322 help
323 This option adds an alternative code sequence to work around ARM
324 erratum 824069 on Cortex-A53 parts up to r0p2 when it is connected
325 to a coherent interconnect.
326
327 If a Cortex-A53 processor is executing a store or prefetch for
328 write instruction at the same time as a processor in another
329 cluster is executing a cache maintenance operation to the same
330 address, then this erratum might cause a clean cache line to be
331 incorrectly marked as dirty.
332
333 The workaround promotes data cache clean instructions to
334 data cache clean-and-invalidate.
335 Please note that this option does not necessarily enable the
336 workaround, as it depends on the alternative framework, which will
337 only patch the kernel if an affected CPU is detected.
338
339 If unsure, say Y.
340
341config ARM64_ERRATUM_819472
342 bool "Cortex-A53: 819472: Store exclusive instructions might cause data corruption"
343 default y
344 help
345 This option adds an alternative code sequence to work around ARM
346 erratum 819472 on Cortex-A53 parts up to r0p1 with an L2 cache
347 present when it is connected to a coherent interconnect.
348
349 If the processor is executing a load and store exclusive sequence at
350 the same time as a processor in another cluster is executing a cache
351 maintenance operation to the same address, then this erratum might
352 cause data corruption.
353
354 The workaround promotes data cache clean instructions to
355 data cache clean-and-invalidate.
356 Please note that this does not necessarily enable the workaround,
357 as it depends on the alternative framework, which will only patch
358 the kernel if an affected CPU is detected.
359
360 If unsure, say Y.
361
362config ARM64_ERRATUM_832075
363 bool "Cortex-A57: 832075: possible deadlock on mixing exclusive memory accesses with device loads"
364 default y
365 help
366 This option adds an alternative code sequence to work around ARM
367 erratum 832075 on Cortex-A57 parts up to r1p2.
368
369 Affected Cortex-A57 parts might deadlock when exclusive load/store
370 instructions to Write-Back memory are mixed with Device loads.
371
372 The workaround is to promote device loads to use Load-Acquire
373 semantics.
374 Please note that this does not necessarily enable the workaround,
498cd5c3
MZ
375 as it depends on the alternative framework, which will only patch
376 the kernel if an affected CPU is detected.
377
378 If unsure, say Y.
379
380config ARM64_ERRATUM_834220
381 bool "Cortex-A57: 834220: Stage 2 translation fault might be incorrectly reported in presence of a Stage 1 fault"
382 depends on KVM
383 default y
384 help
385 This option adds an alternative code sequence to work around ARM
386 erratum 834220 on Cortex-A57 parts up to r1p2.
387
388 Affected Cortex-A57 parts might report a Stage 2 translation
389 fault as the result of a Stage 1 fault for load crossing a
390 page boundary when there is a permission or device memory
391 alignment fault at Stage 1 and a translation fault at Stage 2.
392
393 The workaround is to verify that the Stage 1 translation
394 doesn't generate a fault before handling the Stage 2 fault.
395 Please note that this does not necessarily enable the workaround,
c0a01b84
AP
396 as it depends on the alternative framework, which will only patch
397 the kernel if an affected CPU is detected.
398
399 If unsure, say Y.
400
905e8c5d
WD
401config ARM64_ERRATUM_845719
402 bool "Cortex-A53: 845719: a load might read incorrect data"
403 depends on COMPAT
404 default y
405 help
406 This option adds an alternative code sequence to work around ARM
407 erratum 845719 on Cortex-A53 parts up to r0p4.
408
409 When running a compat (AArch32) userspace on an affected Cortex-A53
410 part, a load at EL0 from a virtual address that matches the bottom 32
411 bits of the virtual address used by a recent load at (AArch64) EL1
412 might return incorrect data.
413
414 The workaround is to write the contextidr_el1 register on exception
415 return to a 32-bit task.
416 Please note that this does not necessarily enable the workaround,
417 as it depends on the alternative framework, which will only patch
418 the kernel if an affected CPU is detected.
419
420 If unsure, say Y.
421
df057cc7
WD
422config ARM64_ERRATUM_843419
423 bool "Cortex-A53: 843419: A load or store might access an incorrect address"
df057cc7 424 default y
6ffe9923 425 select ARM64_MODULE_CMODEL_LARGE if MODULES
df057cc7 426 help
6ffe9923
WD
427 This option links the kernel with '--fix-cortex-a53-843419' and
428 builds modules using the large memory model in order to avoid the use
429 of the ADRP instruction, which can cause a subsequent memory access
430 to use an incorrect address on Cortex-A53 parts up to r0p4.
df057cc7
WD
431
432 If unsure, say Y.
433
94100970
RR
434config CAVIUM_ERRATUM_22375
435 bool "Cavium erratum 22375, 24313"
436 default y
437 help
438 Enable workaround for erratum 22375, 24313.
439
440 This implements two gicv3-its errata workarounds for ThunderX. Both
441 with small impact affecting only ITS table allocation.
442
443 erratum 22375: only alloc 8MB table size
444 erratum 24313: ignore memory access type
445
446 The fixes are in ITS initialization and basically ignore memory access
447 type and table size provided by the TYPER and BASER registers.
448
449 If unsure, say Y.
450
fbf8f40e
GK
451config CAVIUM_ERRATUM_23144
452 bool "Cavium erratum 23144: ITS SYNC hang on dual socket system"
453 depends on NUMA
454 default y
455 help
456 ITS SYNC command hang for cross node io and collections/cpu mapping.
457
458 If unsure, say Y.
459
6d4e11c5
RR
460config CAVIUM_ERRATUM_23154
461 bool "Cavium erratum 23154: Access to ICC_IAR1_EL1 is not sync'ed"
462 default y
463 help
464 The gicv3 of ThunderX requires a modified version for
465 reading the IAR status to ensure data synchronization
466 (access to icc_iar1_el1 is not sync'ed before and after).
467
468 If unsure, say Y.
469
104a0c02
AP
470config CAVIUM_ERRATUM_27456
471 bool "Cavium erratum 27456: Broadcast TLBI instructions may cause icache corruption"
472 default y
473 help
474 On ThunderX T88 pass 1.x through 2.1 parts, broadcast TLBI
475 instructions may cause the icache to become corrupted if it
476 contains data for a non-current ASID. The fix is to
477 invalidate the icache when changing the mm context.
478
479 If unsure, say Y.
480
c0a01b84
AP
481endmenu
482
483
e41ceed0
JL
484choice
485 prompt "Page size"
486 default ARM64_4K_PAGES
487 help
488 Page size (translation granule) configuration.
489
490config ARM64_4K_PAGES
491 bool "4KB"
492 help
493 This feature enables 4KB pages support.
494
44eaacf1
SP
495config ARM64_16K_PAGES
496 bool "16KB"
497 help
498 The system will use 16KB pages support. AArch32 emulation
499 requires applications compiled with 16K (or a multiple of 16K)
500 aligned segments.
501
8c2c3df3 502config ARM64_64K_PAGES
e41ceed0 503 bool "64KB"
8c2c3df3
CM
504 help
505 This feature enables 64KB pages support (4KB by default)
506 allowing only two levels of page tables and faster TLB
db488be3
SP
507 look-up. AArch32 emulation requires applications compiled
508 with 64K aligned segments.
8c2c3df3 509
e41ceed0
JL
510endchoice
511
512choice
513 prompt "Virtual address space size"
514 default ARM64_VA_BITS_39 if ARM64_4K_PAGES
44eaacf1 515 default ARM64_VA_BITS_47 if ARM64_16K_PAGES
e41ceed0
JL
516 default ARM64_VA_BITS_42 if ARM64_64K_PAGES
517 help
518 Allows choosing one of multiple possible virtual address
519 space sizes. The level of translation table is determined by
520 a combination of page size and virtual address space size.
521
21539939 522config ARM64_VA_BITS_36
56a3f30e 523 bool "36-bit" if EXPERT
21539939
SP
524 depends on ARM64_16K_PAGES
525
e41ceed0
JL
526config ARM64_VA_BITS_39
527 bool "39-bit"
528 depends on ARM64_4K_PAGES
529
530config ARM64_VA_BITS_42
531 bool "42-bit"
532 depends on ARM64_64K_PAGES
533
44eaacf1
SP
534config ARM64_VA_BITS_47
535 bool "47-bit"
536 depends on ARM64_16K_PAGES
537
c79b954b
JL
538config ARM64_VA_BITS_48
539 bool "48-bit"
c79b954b 540
e41ceed0
JL
541endchoice
542
543config ARM64_VA_BITS
544 int
21539939 545 default 36 if ARM64_VA_BITS_36
e41ceed0
JL
546 default 39 if ARM64_VA_BITS_39
547 default 42 if ARM64_VA_BITS_42
44eaacf1 548 default 47 if ARM64_VA_BITS_47
c79b954b 549 default 48 if ARM64_VA_BITS_48
e41ceed0 550
a872013d
WD
551config CPU_BIG_ENDIAN
552 bool "Build big-endian kernel"
553 help
554 Say Y if you plan on running a kernel in big-endian mode.
555
f6e763b9
MB
556config SCHED_MC
557 bool "Multi-core scheduler support"
f6e763b9
MB
558 help
559 Multi-core scheduler support improves the CPU scheduler's decision
560 making when dealing with multi-core CPU chips at a cost of slightly
561 increased overhead in some places. If unsure say N here.
562
563config SCHED_SMT
564 bool "SMT scheduler support"
f6e763b9
MB
565 help
566 Improves the CPU scheduler's decision making when dealing with
567 MultiThreading at a cost of slightly increased overhead in some
568 places. If unsure say N here.
569
8c2c3df3 570config NR_CPUS
62aa9655
GK
571 int "Maximum number of CPUs (2-4096)"
572 range 2 4096
15942853 573 # These have to remain sorted largest to smallest
e3672649 574 default "64"
8c2c3df3 575
9327e2c6
MR
576config HOTPLUG_CPU
577 bool "Support for hot-pluggable CPUs"
217d453d 578 select GENERIC_IRQ_MIGRATION
9327e2c6
MR
579 help
580 Say Y here to experiment with turning CPUs off and on. CPUs
581 can be controlled through /sys/devices/system/cpu.
582
1a2db300
GK
583# Common NUMA Features
584config NUMA
585 bool "Numa Memory Allocation and Scheduler Support"
0c2a6cce
KW
586 select ACPI_NUMA if ACPI
587 select OF_NUMA
1a2db300
GK
588 help
589 Enable NUMA (Non Uniform Memory Access) support.
590
591 The kernel will try to allocate memory used by a CPU on the
592 local memory of the CPU and add some more
593 NUMA awareness to the kernel.
594
595config NODES_SHIFT
596 int "Maximum NUMA Nodes (as a power of 2)"
597 range 1 10
598 default "2"
599 depends on NEED_MULTIPLE_NODES
600 help
601 Specify the maximum number of NUMA Nodes available on the target
602 system. Increases memory reserved to accommodate various tables.
603
604config USE_PERCPU_NUMA_NODE_ID
605 def_bool y
606 depends on NUMA
607
7af3a0a9
ZL
608config HAVE_SETUP_PER_CPU_AREA
609 def_bool y
610 depends on NUMA
611
612config NEED_PER_CPU_EMBED_FIRST_CHUNK
613 def_bool y
614 depends on NUMA
615
8c2c3df3 616source kernel/Kconfig.preempt
f90df5e2 617source kernel/Kconfig.hz
8c2c3df3 618
83863f25
LA
619config ARCH_SUPPORTS_DEBUG_PAGEALLOC
620 def_bool y
621
8c2c3df3
CM
622config ARCH_HAS_HOLES_MEMORYMODEL
623 def_bool y if SPARSEMEM
624
625config ARCH_SPARSEMEM_ENABLE
626 def_bool y
627 select SPARSEMEM_VMEMMAP_ENABLE
628
629config ARCH_SPARSEMEM_DEFAULT
630 def_bool ARCH_SPARSEMEM_ENABLE
631
632config ARCH_SELECT_MEMORY_MODEL
633 def_bool ARCH_SPARSEMEM_ENABLE
634
635config HAVE_ARCH_PFN_VALID
636 def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM
637
638config HW_PERF_EVENTS
6475b2d8
MR
639 def_bool y
640 depends on ARM_PMU
8c2c3df3 641
084bd298
SC
642config SYS_SUPPORTS_HUGETLBFS
643 def_bool y
644
084bd298 645config ARCH_WANT_HUGE_PMD_SHARE
21539939 646 def_bool y if ARM64_4K_PAGES || (ARM64_16K_PAGES && !ARM64_VA_BITS_36)
084bd298 647
a41dc0e8
CM
648config ARCH_HAS_CACHE_LINE_SIZE
649 def_bool y
650
8c2c3df3
CM
651source "mm/Kconfig"
652
a1ae65b2
AT
653config SECCOMP
654 bool "Enable seccomp to safely compute untrusted bytecode"
655 ---help---
656 This kernel feature is useful for number crunching applications
657 that may need to compute untrusted bytecode during their
658 execution. By using pipes or other transports made available to
659 the process as file descriptors supporting the read/write
660 syscalls, it's possible to isolate those applications in
661 their own address space using seccomp. Once seccomp is
662 enabled via prctl(PR_SET_SECCOMP), it cannot be disabled
663 and the task is only allowed to execute a few safe syscalls
664 defined by each seccomp mode.
665
dfd57bc3
SS
666config PARAVIRT
667 bool "Enable paravirtualization code"
668 help
669 This changes the kernel so it can modify itself when it is run
670 under a hypervisor, potentially improving performance significantly
671 over full virtualization.
672
673config PARAVIRT_TIME_ACCOUNTING
674 bool "Paravirtual steal time accounting"
675 select PARAVIRT
676 default n
677 help
678 Select this option to enable fine granularity task steal time
679 accounting. Time spent executing other tasks in parallel with
680 the current vCPU is discounted from the vCPU power. To account for
681 that, there can be a small performance impact.
682
683 If in doubt, say N here.
684
d28f6df1
GL
685config KEXEC
686 depends on PM_SLEEP_SMP
687 select KEXEC_CORE
688 bool "kexec system call"
689 ---help---
690 kexec is a system call that implements the ability to shutdown your
691 current kernel, and to start another kernel. It is like a reboot
692 but it is independent of the system firmware. And like a reboot
693 you can start any kernel with it, not just Linux.
694
aa42aa13
SS
695config XEN_DOM0
696 def_bool y
697 depends on XEN
698
699config XEN
c2ba1f7d 700 bool "Xen guest support on ARM64"
aa42aa13 701 depends on ARM64 && OF
83862ccf 702 select SWIOTLB_XEN
dfd57bc3 703 select PARAVIRT
aa42aa13
SS
704 help
705 Say Y if you want to run Linux in a Virtual Machine on Xen on ARM64.
706
d03bb145
SC
707config FORCE_MAX_ZONEORDER
708 int
709 default "14" if (ARM64_64K_PAGES && TRANSPARENT_HUGEPAGE)
44eaacf1 710 default "12" if (ARM64_16K_PAGES && TRANSPARENT_HUGEPAGE)
d03bb145 711 default "11"
44eaacf1
SP
712 help
713 The kernel memory allocator divides physically contiguous memory
714 blocks into "zones", where each zone is a power of two number of
715 pages. This option selects the largest power of two that the kernel
716 keeps in the memory allocator. If you need to allocate very large
717 blocks of physically contiguous memory, then you may need to
718 increase this value.
719
720 This config option is actually maximum order plus one. For example,
721 a value of 11 means that the largest free memory block is 2^10 pages.
722
723 We make sure that we can allocate upto a HugePage size for each configuration.
724 Hence we have :
725 MAX_ORDER = (PMD_SHIFT - PAGE_SHIFT) + 1 => PAGE_SHIFT - 2
726
727 However for 4K, we choose a higher default value, 11 as opposed to 10, giving us
728 4M allocations matching the default size used by generic code.
d03bb145 729
1b907f46
WD
730menuconfig ARMV8_DEPRECATED
731 bool "Emulate deprecated/obsolete ARMv8 instructions"
732 depends on COMPAT
733 help
734 Legacy software support may require certain instructions
735 that have been deprecated or obsoleted in the architecture.
736
737 Enable this config to enable selective emulation of these
738 features.
739
740 If unsure, say Y
741
742if ARMV8_DEPRECATED
743
744config SWP_EMULATION
745 bool "Emulate SWP/SWPB instructions"
746 help
747 ARMv8 obsoletes the use of A32 SWP/SWPB instructions such that
748 they are always undefined. Say Y here to enable software
749 emulation of these instructions for userspace using LDXR/STXR.
750
751 In some older versions of glibc [<=2.8] SWP is used during futex
752 trylock() operations with the assumption that the code will not
753 be preempted. This invalid assumption may be more likely to fail
754 with SWP emulation enabled, leading to deadlock of the user
755 application.
756
757 NOTE: when accessing uncached shared regions, LDXR/STXR rely
758 on an external transaction monitoring block called a global
759 monitor to maintain update atomicity. If your system does not
760 implement a global monitor, this option can cause programs that
761 perform SWP operations to uncached memory to deadlock.
762
763 If unsure, say Y
764
765config CP15_BARRIER_EMULATION
766 bool "Emulate CP15 Barrier instructions"
767 help
768 The CP15 barrier instructions - CP15ISB, CP15DSB, and
769 CP15DMB - are deprecated in ARMv8 (and ARMv7). It is
770 strongly recommended to use the ISB, DSB, and DMB
771 instructions instead.
772
773 Say Y here to enable software emulation of these
774 instructions for AArch32 userspace code. When this option is
775 enabled, CP15 barrier usage is traced which can help
776 identify software that needs updating.
777
778 If unsure, say Y
779
2d888f48
SP
780config SETEND_EMULATION
781 bool "Emulate SETEND instruction"
782 help
783 The SETEND instruction alters the data-endianness of the
784 AArch32 EL0, and is deprecated in ARMv8.
785
786 Say Y here to enable software emulation of the instruction
787 for AArch32 userspace code.
788
789 Note: All the cpus on the system must have mixed endian support at EL0
790 for this feature to be enabled. If a new CPU - which doesn't support mixed
791 endian - is hotplugged in after this feature has been enabled, there could
792 be unexpected results in the applications.
793
794 If unsure, say Y
1b907f46
WD
795endif
796
ba42822a
CM
797config ARM64_SW_TTBR0_PAN
798 bool "Emulate Privileged Access Never using TTBR0_EL1 switching"
799 help
800 Enabling this option prevents the kernel from accessing
801 user-space memory directly by pointing TTBR0_EL1 to a reserved
802 zeroed area and reserved ASID. The user access routines
803 restore the valid TTBR0_EL1 temporarily.
804
0e4a0709
WD
805menu "ARMv8.1 architectural features"
806
807config ARM64_HW_AFDBM
808 bool "Support for hardware updates of the Access and Dirty page flags"
809 default y
810 help
811 The ARMv8.1 architecture extensions introduce support for
812 hardware updates of the access and dirty information in page
813 table entries. When enabled in TCR_EL1 (HA and HD bits) on
814 capable processors, accesses to pages with PTE_AF cleared will
815 set this bit instead of raising an access flag fault.
816 Similarly, writes to read-only pages with the DBM bit set will
817 clear the read-only bit (AP[2]) instead of raising a
818 permission fault.
819
820 Kernels built with this configuration option enabled continue
821 to work on pre-ARMv8.1 hardware and the performance impact is
822 minimal. If unsure, say Y.
823
824config ARM64_PAN
825 bool "Enable support for Privileged Access Never (PAN)"
826 default y
827 help
828 Privileged Access Never (PAN; part of the ARMv8.1 Extensions)
829 prevents the kernel or hypervisor from accessing user-space (EL0)
830 memory directly.
831
832 Choosing this option will cause any unprotected (not using
833 copy_to_user et al) memory access to fail with a permission fault.
834
835 The feature is detected at runtime, and will remain as a 'nop'
836 instruction if the cpu does not implement the feature.
837
838config ARM64_LSE_ATOMICS
839 bool "Atomic instructions"
840 help
841 As part of the Large System Extensions, ARMv8.1 introduces new
842 atomic instructions that are designed specifically to scale in
843 very large systems.
844
845 Say Y here to make use of these instructions for the in-kernel
846 atomic routines. This incurs a small overhead on CPUs that do
847 not support these instructions and requires the kernel to be
848 built with binutils >= 2.25.
849
1f364c8c
MZ
850config ARM64_VHE
851 bool "Enable support for Virtualization Host Extensions (VHE)"
852 default y
853 help
854 Virtualization Host Extensions (VHE) allow the kernel to run
855 directly at EL2 (instead of EL1) on processors that support
856 it. This leads to better performance for KVM, as they reduce
857 the cost of the world switch.
858
859 Selecting this option allows the VHE feature to be detected
860 at runtime, and does not affect processors that do not
861 implement this feature.
862
0e4a0709
WD
863endmenu
864
f993318b
WD
865menu "ARMv8.2 architectural features"
866
57f4959b
JM
867config ARM64_UAO
868 bool "Enable support for User Access Override (UAO)"
869 default y
870 help
871 User Access Override (UAO; part of the ARMv8.2 Extensions)
872 causes the 'unprivileged' variant of the load/store instructions to
873 be overriden to be privileged.
874
875 This option changes get_user() and friends to use the 'unprivileged'
876 variant of the load/store instructions. This ensures that user-space
877 really did have access to the supplied memory. When addr_limit is
878 set to kernel memory the UAO bit will be set, allowing privileged
879 access to kernel memory.
880
881 Choosing this option will cause copy_to_user() et al to use user-space
882 memory permissions.
883
884 The feature is detected at runtime, the kernel will use the
885 regular load/store instructions if the cpu does not implement the
886 feature.
887
f993318b
WD
888endmenu
889
fd045f6c
AB
890config ARM64_MODULE_CMODEL_LARGE
891 bool
892
893config ARM64_MODULE_PLTS
894 bool
895 select ARM64_MODULE_CMODEL_LARGE
896 select HAVE_MOD_ARCH_SPECIFIC
897
1e48ef7f
AB
898config RELOCATABLE
899 bool
900 help
901 This builds the kernel as a Position Independent Executable (PIE),
902 which retains all relocation metadata required to relocate the
903 kernel binary at runtime to a different virtual address than the
904 address it was linked at.
905 Since AArch64 uses the RELA relocation format, this requires a
906 relocation pass at runtime even if the kernel is loaded at the
907 same address it was linked at.
908
f80fb3a3
AB
909config RANDOMIZE_BASE
910 bool "Randomize the address of the kernel image"
b9c220b5 911 select ARM64_MODULE_PLTS if MODULES
f80fb3a3
AB
912 select RELOCATABLE
913 help
914 Randomizes the virtual address at which the kernel image is
915 loaded, as a security feature that deters exploit attempts
916 relying on knowledge of the location of kernel internals.
917
918 It is the bootloader's job to provide entropy, by passing a
919 random u64 value in /chosen/kaslr-seed at kernel entry.
920
2b5fe07a
AB
921 When booting via the UEFI stub, it will invoke the firmware's
922 EFI_RNG_PROTOCOL implementation (if available) to supply entropy
923 to the kernel proper. In addition, it will randomise the physical
924 location of the kernel Image as well.
925
f80fb3a3
AB
926 If unsure, say N.
927
928config RANDOMIZE_MODULE_REGION_FULL
929 bool "Randomize the module region independently from the core kernel"
8fe88a41 930 depends on RANDOMIZE_BASE && !DYNAMIC_FTRACE
f80fb3a3
AB
931 default y
932 help
933 Randomizes the location of the module region without considering the
934 location of the core kernel. This way, it is impossible for modules
935 to leak information about the location of core kernel data structures
936 but it does imply that function calls between modules and the core
937 kernel will need to be resolved via veneers in the module PLT.
938
939 When this option is not set, the module region will be randomized over
940 a limited range that contains the [_stext, _etext] interval of the
941 core kernel, so branch relocations are always in range.
942
8c2c3df3
CM
943endmenu
944
945menu "Boot options"
946
5e89c55e
LP
947config ARM64_ACPI_PARKING_PROTOCOL
948 bool "Enable support for the ARM64 ACPI parking protocol"
949 depends on ACPI
950 help
951 Enable support for the ARM64 ACPI parking protocol. If disabled
952 the kernel will not allow booting through the ARM64 ACPI parking
953 protocol even if the corresponding data is present in the ACPI
954 MADT table.
955
8c2c3df3
CM
956config CMDLINE
957 string "Default kernel command string"
958 default ""
959 help
960 Provide a set of default command-line options at build time by
961 entering them here. As a minimum, you should specify the the
962 root device (e.g. root=/dev/nfs).
963
964config CMDLINE_FORCE
965 bool "Always use the default kernel command string"
966 help
967 Always use the default kernel command string, even if the boot
968 loader passes other arguments to the kernel.
969 This is useful if you cannot or don't want to change the
970 command-line options your boot loader passes to the kernel.
971
f4f75ad5
AB
972config EFI_STUB
973 bool
974
f84d0275
MS
975config EFI
976 bool "UEFI runtime support"
977 depends on OF && !CPU_BIG_ENDIAN
978 select LIBFDT
979 select UCS2_STRING
980 select EFI_PARAMS_FROM_FDT
e15dd494 981 select EFI_RUNTIME_WRAPPERS
f4f75ad5
AB
982 select EFI_STUB
983 select EFI_ARMSTUB
f84d0275
MS
984 default y
985 help
986 This option provides support for runtime services provided
987 by UEFI firmware (such as non-volatile variables, realtime
3c7f2550
MS
988 clock, and platform reset). A UEFI stub is also provided to
989 allow the kernel to be booted as an EFI application. This
990 is only useful on systems that have UEFI firmware.
f84d0275 991
d1ae8c00
YL
992config DMI
993 bool "Enable support for SMBIOS (DMI) tables"
994 depends on EFI
995 default y
996 help
997 This enables SMBIOS/DMI feature for systems.
998
999 This option is only useful on systems that have UEFI firmware.
1000 However, even with this option, the resultant kernel should
1001 continue to boot on existing non-UEFI platforms.
1002
8c2c3df3
CM
1003endmenu
1004
1005menu "Userspace binary formats"
1006
1007source "fs/Kconfig.binfmt"
1008
1009config COMPAT
1010 bool "Kernel support for 32-bit EL0"
755e70b7 1011 depends on ARM64_4K_PAGES || EXPERT
8c2c3df3 1012 select COMPAT_BINFMT_ELF
af1839eb 1013 select HAVE_UID16
84b9e9b4 1014 select OLD_SIGSUSPEND3
51682036 1015 select COMPAT_OLD_SIGACTION
8c2c3df3
CM
1016 help
1017 This option enables support for a 32-bit EL0 running under a 64-bit
1018 kernel at EL1. AArch32-specific components such as system calls,
1019 the user helper functions, VFP support and the ptrace interface are
1020 handled appropriately by the kernel.
1021
44eaacf1
SP
1022 If you use a page size other than 4KB (i.e, 16KB or 64KB), please be aware
1023 that you will only be able to execute AArch32 binaries that were compiled
1024 with page size aligned segments.
a8fcd8b1 1025
8c2c3df3
CM
1026 If you want to execute 32-bit userspace applications, say Y.
1027
1028config SYSVIPC_COMPAT
1029 def_bool y
1030 depends on COMPAT && SYSVIPC
1031
1032endmenu
1033
166936ba
LP
1034menu "Power management options"
1035
1036source "kernel/power/Kconfig"
1037
82869ac5
JM
1038config ARCH_HIBERNATION_POSSIBLE
1039 def_bool y
1040 depends on CPU_PM
1041
1042config ARCH_HIBERNATION_HEADER
1043 def_bool y
1044 depends on HIBERNATION
1045
166936ba
LP
1046config ARCH_SUSPEND_POSSIBLE
1047 def_bool y
1048
166936ba
LP
1049endmenu
1050
1307220d
LP
1051menu "CPU Power Management"
1052
1053source "drivers/cpuidle/Kconfig"
1054
52e7e816
RH
1055source "drivers/cpufreq/Kconfig"
1056
1057endmenu
1058
8c2c3df3
CM
1059source "net/Kconfig"
1060
1061source "drivers/Kconfig"
1062
f84d0275
MS
1063source "drivers/firmware/Kconfig"
1064
b6a02173
GG
1065source "drivers/acpi/Kconfig"
1066
8c2c3df3
CM
1067source "fs/Kconfig"
1068
c3eb5b14
MZ
1069source "arch/arm64/kvm/Kconfig"
1070
8c2c3df3
CM
1071source "arch/arm64/Kconfig.debug"
1072
1073source "security/Kconfig"
1074
1075source "crypto/Kconfig"
2c98833a
AB
1076if CRYPTO
1077source "arch/arm64/crypto/Kconfig"
1078endif
8c2c3df3
CM
1079
1080source "lib/Kconfig"