arm64: add cpu power configs to arm64/Kconfig
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / Kconfig
1 config ARM64
2         def_bool y
3         select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
4         select ARCH_HAS_OPP
5         select ARCH_USE_CMPXCHG_LOCKREF
6         select ARCH_HAS_OPP
7         select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
8         select ARCH_SUPPORTS_ATOMIC_RMW
9         select ARCH_HAS_GCOV_PROFILE_ALL
10         select ARCH_WANT_OPTIONAL_GPIOLIB
11         select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
12         select ARCH_WANT_FRAME_POINTERS
13         select ARM_AMBA
14         select ARM_ARCH_TIMER
15         select ARM_GIC
16         select ARM_GIC_V3
17         select BUILDTIME_EXTABLE_SORT
18         select AUDIT_ARCH_COMPAT_GENERIC
19         select CLONE_BACKWARDS
20         select COMMON_CLK
21         select CPU_PM if (SUSPEND || CPU_IDLE)
22         select DCACHE_WORD_ACCESS
23         select GENERIC_ALLOCATOR
24         select GENERIC_CLOCKEVENTS
25         select GENERIC_CLOCKEVENTS_BROADCAST if SMP
26         select GENERIC_CPU_AUTOPROBE
27         select GENERIC_EARLY_IOREMAP
28         select GENERIC_IOMAP
29         select GENERIC_IRQ_PROBE
30         select GENERIC_IRQ_SHOW
31         select GENERIC_SMP_IDLE_THREAD
32         select GENERIC_STRNCPY_FROM_USER
33         select GENERIC_STRNLEN_USER
34         select GENERIC_TIME_VSYSCALL
35         select HARDIRQS_SW_RESEND
36         select HAVE_ARCH_JUMP_LABEL
37         select HAVE_ARCH_KGDB
38         select HAVE_ARCH_AUDITSYSCALL
39         select HAVE_ARCH_SECCOMP_FILTER
40         select HAVE_ARCH_TRACEHOOK
41         select HAVE_C_RECORDMCOUNT
42         select HAVE_CC_STACKPROTECTOR
43         select HAVE_DEBUG_BUGVERBOSE
44         select HAVE_DEBUG_KMEMLEAK
45         select HAVE_DMA_API_DEBUG
46         select HAVE_DMA_ATTRS
47         select HAVE_DMA_CONTIGUOUS
48         select HAVE_DYNAMIC_FTRACE
49         select HAVE_EFFICIENT_UNALIGNED_ACCESS
50         select HAVE_FTRACE_MCOUNT_RECORD
51         select HAVE_FUNCTION_TRACER
52         select HAVE_FUNCTION_GRAPH_TRACER
53         select HAVE_GENERIC_DMA_COHERENT
54         select HAVE_GENERIC_HARDIRQS
55         select HAVE_HW_BREAKPOINT if PERF_EVENTS
56         select HAVE_MEMBLOCK
57         select HAVE_PATA_PLATFORM
58         select HAVE_PERF_EVENTS
59         select HAVE_PERF_REGS
60         select HAVE_PERF_USER_STACK_DUMP
61         select HAVE_SYSCALL_TRACEPOINTS
62         select IRQ_DOMAIN
63         select MODULES_USE_ELF_RELA
64         select NO_BOOTMEM
65         select OF
66         select OF_EARLY_FLATTREE
67         select OF_RESERVED_MEM
68         select PERF_USE_VMALLOC
69         select POWER_RESET
70         select POWER_SUPPLY
71         select RTC_LIB
72         select SPARSE_IRQ
73         select SYSCTL_EXCEPTION_TRACE
74         help
75           ARM 64-bit (AArch64) Linux support.
76
77 config 64BIT
78         def_bool y
79
80 config ARCH_PHYS_ADDR_T_64BIT
81         def_bool y
82
83 config MMU
84         def_bool y
85
86 config NO_IOPORT
87         def_bool y
88
89 config STACKTRACE_SUPPORT
90         def_bool y
91
92 config LOCKDEP_SUPPORT
93         def_bool y
94
95 config TRACE_IRQFLAGS_SUPPORT
96         def_bool y
97
98 config RWSEM_XCHGADD_ALGORITHM
99         def_bool y
100
101 config GENERIC_HWEIGHT
102         def_bool y
103
104 config GENERIC_CSUM
105         def_bool y
106
107 config GENERIC_CALIBRATE_DELAY
108         def_bool y
109
110 config ZONE_DMA
111         def_bool y
112
113 config ARCH_DMA_ADDR_T_64BIT
114         def_bool y
115
116 config NEED_DMA_MAP_STATE
117         def_bool y
118
119 config NEED_SG_DMA_LENGTH
120         def_bool y
121
122 config SWIOTLB
123         def_bool y
124
125 config IOMMU_HELPER
126         def_bool SWIOTLB
127
128 config FIX_EARLYCON_MEM
129         def_bool y
130
131 source "init/Kconfig"
132
133 source "kernel/Kconfig.freezer"
134
135 menu "Platform selection"
136
137 config ARCH_ROCKCHIP
138         bool "Rockchip SoCs"
139         select PINCTRL
140         select PINCTRL_RK3368
141         select ARCH_REQUIRE_GPIOLIB
142
143 source "arch/arm64/mach-rockchip/Kconfig"
144
145 config ARCH_VEXPRESS
146         bool "ARMv8 software model (Versatile Express)"
147         select ARCH_REQUIRE_GPIOLIB
148         select COMMON_CLK_VERSATILE
149         select POWER_RESET_VEXPRESS
150         select VEXPRESS_CONFIG
151         help
152           This enables support for the ARMv8 software model (Versatile
153           Express).
154
155 config ARCH_XGENE
156         bool "AppliedMicro X-Gene SOC Family"
157         help
158           This enables support for AppliedMicro X-Gene SOC Family
159
160 endmenu
161
162 menu "Bus support"
163
164 config ARM_AMBA
165         bool
166
167 endmenu
168
169 menu "Kernel Features"
170
171 config ARM64_64K_PAGES
172         bool "Enable 64KB pages support"
173         help
174           This feature enables 64KB pages support (4KB by default)
175           allowing only two levels of page tables and faster TLB
176           look-up. AArch32 emulation is not available when this feature
177           is enabled.
178
179 config CPU_BIG_ENDIAN
180        bool "Build big-endian kernel"
181        help
182          Say Y if you plan on running a kernel in big-endian mode.
183
184 config SMP
185         bool "Symmetric Multi-Processing"
186         select USE_GENERIC_SMP_HELPERS
187         help
188           This enables support for systems with more than one CPU.  If
189           you say N here, the kernel will run on single and
190           multiprocessor machines, but will use only one CPU of a
191           multiprocessor machine. If you say Y here, the kernel will run
192           on many, but not all, single processor machines. On a single
193           processor machine, the kernel will run faster if you say N
194           here.
195
196           If you don't know what to do here, say N.
197
198 config SCHED_MC
199         bool "Multi-core scheduler support"
200         depends on SMP
201         help
202           Multi-core scheduler support improves the CPU scheduler's decision
203           making when dealing with multi-core CPU chips at a cost of slightly
204           increased overhead in some places. If unsure say N here.
205
206 config SCHED_SMT
207         bool "SMT scheduler support"
208         depends on SMP
209         help
210           Improves the CPU scheduler's decision making when dealing with
211           MultiThreading at a cost of slightly increased overhead in some
212           places. If unsure say N here.
213
214 config DISABLE_CPU_SCHED_DOMAIN_BALANCE
215         bool "(EXPERIMENTAL) Disable CPU level scheduler load-balancing"
216         help
217           Disables scheduler load-balancing at CPU sched domain level.
218
219 config SCHED_HMP
220         bool "(EXPERIMENTAL) Heterogenous multiprocessor scheduling"
221         depends on DISABLE_CPU_SCHED_DOMAIN_BALANCE && SCHED_MC && FAIR_GROUP_SCHED && !SCHED_AUTOGROUP
222         help
223           Experimental scheduler optimizations for heterogeneous platforms.
224           Attempts to introspectively select task affinity to optimize power
225           and performance. Basic support for multiple (>2) cpu types is in place,
226           but it has only been tested with two types of cpus.
227           There is currently no support for migration of task groups, hence
228           !SCHED_AUTOGROUP. Furthermore, normal load-balancing must be disabled
229           between cpus of different type (DISABLE_CPU_SCHED_DOMAIN_BALANCE).
230
231 config SCHED_HMP_PRIO_FILTER
232         bool "(EXPERIMENTAL) Filter HMP migrations by task priority"
233         depends on SCHED_HMP
234         help
235           Enables task priority based HMP migration filter. Any task with
236           a NICE value above the threshold will always be on low-power cpus
237           with less compute capacity.
238
239 config SCHED_HMP_PRIO_FILTER_VAL
240         int "NICE priority threshold"
241         default 5
242         depends on SCHED_HMP_PRIO_FILTER
243
244 config HMP_FAST_CPU_MASK
245         string "HMP scheduler fast CPU mask"
246         depends on SCHED_HMP
247         help
248           Leave empty to use device tree information.
249           Specify the cpuids of the fast CPUs in the system as a list string,
250           e.g. cpuid 0+1 should be specified as 0-1.
251
252 config HMP_SLOW_CPU_MASK
253         string "HMP scheduler slow CPU mask"
254         depends on SCHED_HMP
255         help
256           Leave empty to use device tree information.
257           Specify the cpuids of the slow CPUs in the system as a list string,
258           e.g. cpuid 0+1 should be specified as 0-1.
259
260 config HMP_VARIABLE_SCALE
261         bool "Allows changing the load tracking scale through sysfs"
262         depends on SCHED_HMP
263         help
264           When turned on, this option exports the thresholds and load average
265           period value for the load tracking patches through sysfs.
266           The values can be modified to change the rate of load accumulation
267           and the thresholds used for HMP migration.
268           The load_avg_period_ms is the time in ms to reach a load average of
269           0.5 for an idle task of 0 load average ratio that start a busy loop.
270           The up_threshold and down_threshold is the value to go to a faster
271           CPU or to go back to a slower cpu.
272           The {up,down}_threshold are devided by 1024 before being compared
273           to the load average.
274           For examples, with load_avg_period_ms = 128 and up_threshold = 512,
275           a running task with a load of 0 will be migrated to a bigger CPU after
276           128ms, because after 128ms its load_avg_ratio is 0.5 and the real
277           up_threshold is 0.5.
278           This patch has the same behavior as changing the Y of the load
279           average computation to
280                 (1002/1024)^(LOAD_AVG_PERIOD/load_avg_period_ms)
281           but it remove intermadiate overflows in computation.
282
283 config HMP_FREQUENCY_INVARIANT_SCALE
284         bool "(EXPERIMENTAL) Frequency-Invariant Tracked Load for HMP"
285         depends on HMP_VARIABLE_SCALE && CPU_FREQ
286         help
287           Scales the current load contribution in line with the frequency
288           of the CPU that the task was executed on.
289           In this version, we use a simple linear scale derived from the
290           maximum frequency reported by CPUFreq.
291           Restricting tracked load to be scaled by the CPU's frequency
292           represents the consumption of possible compute capacity
293           (rather than consumption of actual instantaneous capacity as
294           normal) and allows the HMP migration's simple threshold
295           migration strategy to interact more predictably with CPUFreq's
296           asynchronous compute capacity changes.
297
298 config SCHED_HMP_LITTLE_PACKING
299         bool "Small task packing for HMP"
300         depends on SCHED_HMP
301         default n
302         help
303           Allows the HMP Scheduler to pack small tasks into CPUs in the
304           smallest HMP domain.
305           Controlled by two sysfs files in sys/kernel/hmp.
306           packing_enable: 1 to enable, 0 to disable packing. Default 1.
307           packing_limit: runqueue load ratio where a RQ is considered
308             to be full. Default is NICE_0_LOAD * 9/8.
309
310 config NR_CPUS
311         int "Maximum number of CPUs (2-32)"
312         range 2 32
313         depends on SMP
314         # These have to remain sorted largest to smallest
315         default "8"
316
317 config HOTPLUG_CPU
318         bool "Support for hot-pluggable CPUs"
319         depends on SMP
320         help
321           Say Y here to experiment with turning CPUs off and on.  CPUs
322           can be controlled through /sys/devices/system/cpu.
323
324 config SWP_EMULATE
325         bool "Emulate SWP/SWPB instructions"
326         help
327           ARMv6 architecture deprecates use of the SWP/SWPB instructions. ARMv8
328           oblosetes the use of SWP/SWPB instructions. ARMv7 multiprocessing
329           extensions introduce the ability to disable these instructions,
330           triggering an undefined instruction exception when executed. Say Y
331           here to enable software emulation of these instructions for userspace
332           (not kernel) using LDREX/STREX. Also creates /proc/cpu/swp_emulation
333           for statistics.
334
335           In some older versions of glibc [<=2.8] SWP is used during futex
336           trylock() operations with the assumption that the code will not
337           be preempted. This invalid assumption may be more likely to fail
338           with SWP emulation enabled, leading to deadlock of the user
339           application.
340
341           NOTE: when accessing uncached shared regions, LDREX/STREX rely
342           on an external transaction monitoring block called a global
343           monitor to maintain update atomicity. If your system does not
344           implement a global monitor, this option can cause programs that
345           perform SWP operations to uncached memory to deadlock.
346
347           If unsure, say Y.
348
349 source kernel/Kconfig.preempt
350
351 config HZ
352         int
353         default 100
354
355 config ARCH_HAS_HOLES_MEMORYMODEL
356         def_bool y if SPARSEMEM
357
358 config ARCH_SPARSEMEM_ENABLE
359         def_bool y
360         select SPARSEMEM_VMEMMAP_ENABLE
361
362 config ARCH_SPARSEMEM_DEFAULT
363         def_bool ARCH_SPARSEMEM_ENABLE
364
365 config ARCH_SELECT_MEMORY_MODEL
366         def_bool ARCH_SPARSEMEM_ENABLE
367
368 config HAVE_ARCH_PFN_VALID
369         def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM
370
371 config HW_PERF_EVENTS
372         bool "Enable hardware performance counter support for perf events"
373         depends on PERF_EVENTS
374         default y
375         help
376           Enable hardware performance counter support for perf events. If
377           disabled, perf events will use software events only.
378
379 config SYS_SUPPORTS_HUGETLBFS
380         def_bool y
381
382 config ARCH_WANT_GENERAL_HUGETLB
383         def_bool y
384
385 config ARCH_WANT_HUGE_PMD_SHARE
386         def_bool y if !ARM64_64K_PAGES
387
388 config HAVE_ARCH_TRANSPARENT_HUGEPAGE
389         def_bool y
390
391 config ARMV7_COMPAT
392         bool "Kernel support for ARMv7 applications"
393         depends on COMPAT
394         select SWP_EMULATE
395         help
396          This option enables features that allow that ran on an ARMv7 or older
397          processor to continue functioning.
398
399          If you want to execute ARMv7 applications, say Y
400
401 config ARMV7_COMPAT_CPUINFO
402         bool "Report backwards compatible cpu features in /proc/cpuinfo"
403         depends on ARMV7_COMPAT
404         default y
405         help
406          This option makes /proc/cpuinfo list CPU features that an ARMv7 or
407          earlier kernel would report, but are not optional on an ARMv8 or later
408          processor.
409
410          If you want to execute ARMv7 applications, say Y
411
412 source "mm/Kconfig"
413
414 config FORCE_MAX_ZONEORDER
415         int
416         default "14" if (ARM64_64K_PAGES && TRANSPARENT_HUGEPAGE)
417         default "11"
418
419 config SECCOMP
420         bool "Enable seccomp to safely compute untrusted bytecode"
421         ---help---
422           This kernel feature is useful for number crunching applications
423           that may need to compute untrusted bytecode during their
424           execution. By using pipes or other transports made available to
425           the process as file descriptors supporting the read/write
426           syscalls, it's possible to isolate those applications in
427           their own address space using seccomp. Once seccomp is
428           enabled via prctl(PR_SET_SECCOMP), it cannot be disabled
429           and the task is only allowed to execute a few safe syscalls
430           defined by each seccomp mode.
431
432 endmenu
433
434 menu "Boot options"
435
436 config CMDLINE
437         string "Default kernel command string"
438         default ""
439         help
440           Provide a set of default command-line options at build time by
441           entering them here. As a minimum, you should specify the the
442           root device (e.g. root=/dev/nfs).
443
444 choice
445         prompt "Kernel command line type" if CMDLINE != ""
446         default CMDLINE_FROM_BOOTLOADER
447
448 config CMDLINE_FROM_BOOTLOADER
449         bool "Use bootloader kernel arguments if available"
450         help
451           Uses the command-line options passed by the boot loader. If
452           the boot loader doesn't provide any, the default kernel command
453           string provided in CMDLINE will be used.
454
455 config CMDLINE_EXTEND
456         bool "Extend bootloader kernel arguments"
457         help
458           The command-line arguments provided by the boot loader will be
459           appended to the default kernel command string.
460
461 config CMDLINE_FORCE
462         bool "Always use the default kernel command string"
463         help
464           Always use the default kernel command string, even if the boot
465           loader passes other arguments to the kernel.
466           This is useful if you cannot or don't want to change the
467           command-line options your boot loader passes to the kernel.
468 endchoice
469
470 config BUILD_ARM64_APPENDED_DTB_IMAGE
471         bool "Build a concatenated Image.gz/dtb by default"
472         depends on OF
473         help
474           Enabling this option will cause a concatenated Image.gz and list of
475           DTBs to be built by default (instead of a standalone Image.gz.)
476           The image will built in arch/arm64/boot/Image.gz-dtb
477
478 config BUILD_ARM64_APPENDED_DTB_IMAGE_NAMES
479         string "Default dtb names"
480         depends on BUILD_ARM64_APPENDED_DTB_IMAGE
481         help
482           Space separated list of names of dtbs to append when
483           building a concatenated Image.gz-dtb.
484
485 config EFI
486         bool "UEFI runtime support"
487         depends on OF && !CPU_BIG_ENDIAN
488         select LIBFDT
489         select UCS2_STRING
490         select EFI_PARAMS_FROM_FDT
491         default y
492         help
493           This option provides support for runtime services provided
494           by UEFI firmware (such as non-volatile variables, realtime
495           clock, and platform reset). A UEFI stub is also provided to
496           allow the kernel to be booted as an EFI application. This
497           is only useful on systems that have UEFI firmware.
498
499 endmenu
500
501 menu "Userspace binary formats"
502
503 source "fs/Kconfig.binfmt"
504
505 config COMPAT
506         bool "Kernel support for 32-bit EL0"
507         depends on !ARM64_64K_PAGES
508         select COMPAT_BINFMT_ELF
509         select HAVE_UID16
510         select OLD_SIGSUSPEND3
511         select COMPAT_OLD_SIGACTION
512         help
513           This option enables support for a 32-bit EL0 running under a 64-bit
514           kernel at EL1. AArch32-specific components such as system calls,
515           the user helper functions, VFP support and the ptrace interface are
516           handled appropriately by the kernel.
517
518           If you want to execute 32-bit userspace applications, say Y.
519
520 config SYSVIPC_COMPAT
521         def_bool y
522         depends on COMPAT && SYSVIPC
523
524 endmenu
525
526 menu "Power management options"
527
528 source "kernel/power/Kconfig"
529
530 source "drivers/cpufreq/Kconfig"
531 config ARCH_SUSPEND_POSSIBLE
532         def_bool y
533
534 config ARM64_CPU_SUSPEND
535         def_bool PM_SLEEP
536
537 endmenu
538
539 menu "CPU Power Management"
540
541 source "drivers/cpuidle/Kconfig"
542
543 source "drivers/cpuquiet/Kconfig"
544
545 endmenu
546
547 source "net/Kconfig"
548
549 source "drivers/Kconfig"
550
551 source "drivers/firmware/Kconfig"
552
553 source "fs/Kconfig"
554
555 source "arch/arm64/kvm/Kconfig"
556
557 source "arch/arm64/Kconfig.debug"
558
559 source "security/Kconfig"
560
561 source "crypto/Kconfig"
562 if CRYPTO
563 source "arch/arm64/crypto/Kconfig"
564 endif
565
566 source "lib/Kconfig"