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