Add the rt linux 4.1.3-rt3 as base
[kvmfornfv.git] / kernel / arch / Kconfig
1 #
2 # General architecture dependent options
3 #
4
5 config OPROFILE
6         tristate "OProfile system profiling"
7         depends on PROFILING
8         depends on HAVE_OPROFILE
9         depends on !PREEMPT_RT_FULL
10         select RING_BUFFER
11         select RING_BUFFER_ALLOW_SWAP
12         help
13           OProfile is a profiling system capable of profiling the
14           whole system, include the kernel, kernel modules, libraries,
15           and applications.
16
17           If unsure, say N.
18
19 config OPROFILE_EVENT_MULTIPLEX
20         bool "OProfile multiplexing support (EXPERIMENTAL)"
21         default n
22         depends on OPROFILE && X86
23         help
24           The number of hardware counters is limited. The multiplexing
25           feature enables OProfile to gather more events than counters
26           are provided by the hardware. This is realized by switching
27           between events at an user specified time interval.
28
29           If unsure, say N.
30
31 config HAVE_OPROFILE
32         bool
33
34 config OPROFILE_NMI_TIMER
35         def_bool y
36         depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !PPC64
37
38 config KPROBES
39         bool "Kprobes"
40         depends on MODULES
41         depends on HAVE_KPROBES
42         select KALLSYMS
43         help
44           Kprobes allows you to trap at almost any kernel address and
45           execute a callback function.  register_kprobe() establishes
46           a probepoint and specifies the callback.  Kprobes is useful
47           for kernel debugging, non-intrusive instrumentation and testing.
48           If in doubt, say "N".
49
50 config JUMP_LABEL
51        bool "Optimize very unlikely/likely branches"
52        depends on HAVE_ARCH_JUMP_LABEL
53        help
54          This option enables a transparent branch optimization that
55          makes certain almost-always-true or almost-always-false branch
56          conditions even cheaper to execute within the kernel.
57
58          Certain performance-sensitive kernel code, such as trace points,
59          scheduler functionality, networking code and KVM have such
60          branches and include support for this optimization technique.
61
62          If it is detected that the compiler has support for "asm goto",
63          the kernel will compile such branches with just a nop
64          instruction. When the condition flag is toggled to true, the
65          nop will be converted to a jump instruction to execute the
66          conditional block of instructions.
67
68          This technique lowers overhead and stress on the branch prediction
69          of the processor and generally makes the kernel faster. The update
70          of the condition is slower, but those are always very rare.
71
72          ( On 32-bit x86, the necessary options added to the compiler
73            flags may increase the size of the kernel slightly. )
74
75 config OPTPROBES
76         def_bool y
77         depends on KPROBES && HAVE_OPTPROBES
78         depends on !PREEMPT
79
80 config KPROBES_ON_FTRACE
81         def_bool y
82         depends on KPROBES && HAVE_KPROBES_ON_FTRACE
83         depends on DYNAMIC_FTRACE_WITH_REGS
84         help
85          If function tracer is enabled and the arch supports full
86          passing of pt_regs to function tracing, then kprobes can
87          optimize on top of function tracing.
88
89 config UPROBES
90         def_bool n
91         select PERCPU_RWSEM
92         help
93           Uprobes is the user-space counterpart to kprobes: they
94           enable instrumentation applications (such as 'perf probe')
95           to establish unintrusive probes in user-space binaries and
96           libraries, by executing handler functions when the probes
97           are hit by user-space applications.
98
99           ( These probes come in the form of single-byte breakpoints,
100             managed by the kernel and kept transparent to the probed
101             application. )
102
103 config HAVE_64BIT_ALIGNED_ACCESS
104         def_bool 64BIT && !HAVE_EFFICIENT_UNALIGNED_ACCESS
105         help
106           Some architectures require 64 bit accesses to be 64 bit
107           aligned, which also requires structs containing 64 bit values
108           to be 64 bit aligned too. This includes some 32 bit
109           architectures which can do 64 bit accesses, as well as 64 bit
110           architectures without unaligned access.
111
112           This symbol should be selected by an architecture if 64 bit
113           accesses are required to be 64 bit aligned in this way even
114           though it is not a 64 bit architecture.
115
116           See Documentation/unaligned-memory-access.txt for more
117           information on the topic of unaligned memory accesses.
118
119 config HAVE_EFFICIENT_UNALIGNED_ACCESS
120         bool
121         help
122           Some architectures are unable to perform unaligned accesses
123           without the use of get_unaligned/put_unaligned. Others are
124           unable to perform such accesses efficiently (e.g. trap on
125           unaligned access and require fixing it up in the exception
126           handler.)
127
128           This symbol should be selected by an architecture if it can
129           perform unaligned accesses efficiently to allow different
130           code paths to be selected for these cases. Some network
131           drivers, for example, could opt to not fix up alignment
132           problems with received packets if doing so would not help
133           much.
134
135           See Documentation/unaligned-memory-access.txt for more
136           information on the topic of unaligned memory accesses.
137
138 config ARCH_USE_BUILTIN_BSWAP
139        bool
140        help
141          Modern versions of GCC (since 4.4) have builtin functions
142          for handling byte-swapping. Using these, instead of the old
143          inline assembler that the architecture code provides in the
144          __arch_bswapXX() macros, allows the compiler to see what's
145          happening and offers more opportunity for optimisation. In
146          particular, the compiler will be able to combine the byteswap
147          with a nearby load or store and use load-and-swap or
148          store-and-swap instructions if the architecture has them. It
149          should almost *never* result in code which is worse than the
150          hand-coded assembler in <asm/swab.h>.  But just in case it
151          does, the use of the builtins is optional.
152
153          Any architecture with load-and-swap or store-and-swap
154          instructions should set this. And it shouldn't hurt to set it
155          on architectures that don't have such instructions.
156
157 config KRETPROBES
158         def_bool y
159         depends on KPROBES && HAVE_KRETPROBES
160
161 config USER_RETURN_NOTIFIER
162         bool
163         depends on HAVE_USER_RETURN_NOTIFIER
164         help
165           Provide a kernel-internal notification when a cpu is about to
166           switch to user mode.
167
168 config HAVE_IOREMAP_PROT
169         bool
170
171 config HAVE_KPROBES
172         bool
173
174 config HAVE_KRETPROBES
175         bool
176
177 config HAVE_OPTPROBES
178         bool
179
180 config HAVE_KPROBES_ON_FTRACE
181         bool
182
183 config HAVE_NMI_WATCHDOG
184         bool
185 #
186 # An arch should select this if it provides all these things:
187 #
188 #       task_pt_regs()          in asm/processor.h or asm/ptrace.h
189 #       arch_has_single_step()  if there is hardware single-step support
190 #       arch_has_block_step()   if there is hardware block-step support
191 #       asm/syscall.h           supplying asm-generic/syscall.h interface
192 #       linux/regset.h          user_regset interfaces
193 #       CORE_DUMP_USE_REGSET    #define'd in linux/elf.h
194 #       TIF_SYSCALL_TRACE       calls tracehook_report_syscall_{entry,exit}
195 #       TIF_NOTIFY_RESUME       calls tracehook_notify_resume()
196 #       signal delivery         calls tracehook_signal_handler()
197 #
198 config HAVE_ARCH_TRACEHOOK
199         bool
200
201 config HAVE_DMA_ATTRS
202         bool
203
204 config HAVE_DMA_CONTIGUOUS
205         bool
206
207 config GENERIC_SMP_IDLE_THREAD
208        bool
209
210 config GENERIC_IDLE_POLL_SETUP
211        bool
212
213 # Select if arch init_task initializer is different to init/init_task.c
214 config ARCH_INIT_TASK
215        bool
216
217 # Select if arch has its private alloc_task_struct() function
218 config ARCH_TASK_STRUCT_ALLOCATOR
219         bool
220
221 # Select if arch has its private alloc_thread_info() function
222 config ARCH_THREAD_INFO_ALLOCATOR
223         bool
224
225 config HAVE_REGS_AND_STACK_ACCESS_API
226         bool
227         help
228           This symbol should be selected by an architecure if it supports
229           the API needed to access registers and stack entries from pt_regs,
230           declared in asm/ptrace.h
231           For example the kprobes-based event tracer needs this API.
232
233 config HAVE_CLK
234         bool
235         help
236           The <linux/clk.h> calls support software clock gating and
237           thus are a key power management tool on many systems.
238
239 config HAVE_DMA_API_DEBUG
240         bool
241
242 config HAVE_HW_BREAKPOINT
243         bool
244         depends on PERF_EVENTS
245
246 config HAVE_MIXED_BREAKPOINTS_REGS
247         bool
248         depends on HAVE_HW_BREAKPOINT
249         help
250           Depending on the arch implementation of hardware breakpoints,
251           some of them have separate registers for data and instruction
252           breakpoints addresses, others have mixed registers to store
253           them but define the access type in a control register.
254           Select this option if your arch implements breakpoints under the
255           latter fashion.
256
257 config HAVE_USER_RETURN_NOTIFIER
258         bool
259
260 config HAVE_PERF_EVENTS_NMI
261         bool
262         help
263           System hardware can generate an NMI using the perf event
264           subsystem.  Also has support for calculating CPU cycle events
265           to determine how many clock cycles in a given period.
266
267 config HAVE_PERF_REGS
268         bool
269         help
270           Support selective register dumps for perf events. This includes
271           bit-mapping of each registers and a unique architecture id.
272
273 config HAVE_PERF_USER_STACK_DUMP
274         bool
275         help
276           Support user stack dumps for perf event samples. This needs
277           access to the user stack pointer which is not unified across
278           architectures.
279
280 config HAVE_ARCH_JUMP_LABEL
281         bool
282
283 config HAVE_RCU_TABLE_FREE
284         bool
285
286 config ARCH_HAVE_NMI_SAFE_CMPXCHG
287         bool
288
289 config HAVE_ALIGNED_STRUCT_PAGE
290         bool
291         help
292           This makes sure that struct pages are double word aligned and that
293           e.g. the SLUB allocator can perform double word atomic operations
294           on a struct page for better performance. However selecting this
295           might increase the size of a struct page by a word.
296
297 config HAVE_CMPXCHG_LOCAL
298         bool
299
300 config HAVE_CMPXCHG_DOUBLE
301         bool
302
303 config ARCH_WANT_IPC_PARSE_VERSION
304         bool
305
306 config ARCH_WANT_COMPAT_IPC_PARSE_VERSION
307         bool
308
309 config ARCH_WANT_OLD_COMPAT_IPC
310         select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
311         bool
312
313 config HAVE_ARCH_SECCOMP_FILTER
314         bool
315         help
316           An arch should select this symbol if it provides all of these things:
317           - syscall_get_arch()
318           - syscall_get_arguments()
319           - syscall_rollback()
320           - syscall_set_return_value()
321           - SIGSYS siginfo_t support
322           - secure_computing is called from a ptrace_event()-safe context
323           - secure_computing return value is checked and a return value of -1
324             results in the system call being skipped immediately.
325           - seccomp syscall wired up
326
327           For best performance, an arch should use seccomp_phase1 and
328           seccomp_phase2 directly.  It should call seccomp_phase1 for all
329           syscalls if TIF_SECCOMP is set, but seccomp_phase1 does not
330           need to be called from a ptrace-safe context.  It must then
331           call seccomp_phase2 if seccomp_phase1 returns anything other
332           than SECCOMP_PHASE1_OK or SECCOMP_PHASE1_SKIP.
333
334           As an additional optimization, an arch may provide seccomp_data
335           directly to seccomp_phase1; this avoids multiple calls
336           to the syscall_xyz helpers for every syscall.
337
338 config SECCOMP_FILTER
339         def_bool y
340         depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET
341         help
342           Enable tasks to build secure computing environments defined
343           in terms of Berkeley Packet Filter programs which implement
344           task-defined system call filtering polices.
345
346           See Documentation/prctl/seccomp_filter.txt for details.
347
348 config HAVE_CC_STACKPROTECTOR
349         bool
350         help
351           An arch should select this symbol if:
352           - its compiler supports the -fstack-protector option
353           - it has implemented a stack canary (e.g. __stack_chk_guard)
354
355 config CC_STACKPROTECTOR
356         def_bool n
357         help
358           Set when a stack-protector mode is enabled, so that the build
359           can enable kernel-side support for the GCC feature.
360
361 choice
362         prompt "Stack Protector buffer overflow detection"
363         depends on HAVE_CC_STACKPROTECTOR
364         default CC_STACKPROTECTOR_NONE
365         help
366           This option turns on the "stack-protector" GCC feature. This
367           feature puts, at the beginning of functions, a canary value on
368           the stack just before the return address, and validates
369           the value just before actually returning.  Stack based buffer
370           overflows (that need to overwrite this return address) now also
371           overwrite the canary, which gets detected and the attack is then
372           neutralized via a kernel panic.
373
374 config CC_STACKPROTECTOR_NONE
375         bool "None"
376         help
377           Disable "stack-protector" GCC feature.
378
379 config CC_STACKPROTECTOR_REGULAR
380         bool "Regular"
381         select CC_STACKPROTECTOR
382         help
383           Functions will have the stack-protector canary logic added if they
384           have an 8-byte or larger character array on the stack.
385
386           This feature requires gcc version 4.2 or above, or a distribution
387           gcc with the feature backported ("-fstack-protector").
388
389           On an x86 "defconfig" build, this feature adds canary checks to
390           about 3% of all kernel functions, which increases kernel code size
391           by about 0.3%.
392
393 config CC_STACKPROTECTOR_STRONG
394         bool "Strong"
395         select CC_STACKPROTECTOR
396         help
397           Functions will have the stack-protector canary logic added in any
398           of the following conditions:
399
400           - local variable's address used as part of the right hand side of an
401             assignment or function argument
402           - local variable is an array (or union containing an array),
403             regardless of array type or length
404           - uses register local variables
405
406           This feature requires gcc version 4.9 or above, or a distribution
407           gcc with the feature backported ("-fstack-protector-strong").
408
409           On an x86 "defconfig" build, this feature adds canary checks to
410           about 20% of all kernel functions, which increases the kernel code
411           size by about 2%.
412
413 endchoice
414
415 config HAVE_CONTEXT_TRACKING
416         bool
417         help
418           Provide kernel/user boundaries probes necessary for subsystems
419           that need it, such as userspace RCU extended quiescent state.
420           Syscalls need to be wrapped inside user_exit()-user_enter() through
421           the slow path using TIF_NOHZ flag. Exceptions handlers must be
422           wrapped as well. Irqs are already protected inside
423           rcu_irq_enter/rcu_irq_exit() but preemption or signal handling on
424           irq exit still need to be protected.
425
426 config HAVE_VIRT_CPU_ACCOUNTING
427         bool
428
429 config HAVE_VIRT_CPU_ACCOUNTING_GEN
430         bool
431         default y if 64BIT
432         help
433           With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit.
434           Before enabling this option, arch code must be audited
435           to ensure there are no races in concurrent read/write of
436           cputime_t. For example, reading/writing 64-bit cputime_t on
437           some 32-bit arches may require multiple accesses, so proper
438           locking is needed to protect against concurrent accesses.
439
440
441 config HAVE_IRQ_TIME_ACCOUNTING
442         bool
443         help
444           Archs need to ensure they use a high enough resolution clock to
445           support irq time accounting and then call enable_sched_clock_irqtime().
446
447 config HAVE_ARCH_TRANSPARENT_HUGEPAGE
448         bool
449
450 config HAVE_ARCH_HUGE_VMAP
451         bool
452
453 config HAVE_ARCH_SOFT_DIRTY
454         bool
455
456 config HAVE_MOD_ARCH_SPECIFIC
457         bool
458         help
459           The arch uses struct mod_arch_specific to store data.  Many arches
460           just need a simple module loader without arch specific data - those
461           should not enable this.
462
463 config MODULES_USE_ELF_RELA
464         bool
465         help
466           Modules only use ELF RELA relocations.  Modules with ELF REL
467           relocations will give an error.
468
469 config MODULES_USE_ELF_REL
470         bool
471         help
472           Modules only use ELF REL relocations.  Modules with ELF RELA
473           relocations will give an error.
474
475 config HAVE_UNDERSCORE_SYMBOL_PREFIX
476         bool
477         help
478           Some architectures generate an _ in front of C symbols; things like
479           module loading and assembly files need to know about this.
480
481 config HAVE_IRQ_EXIT_ON_IRQ_STACK
482         bool
483         help
484           Architecture doesn't only execute the irq handler on the irq stack
485           but also irq_exit(). This way we can process softirqs on this irq
486           stack instead of switching to a new one when we call __do_softirq()
487           in the end of an hardirq.
488           This spares a stack switch and improves cache usage on softirq
489           processing.
490
491 config PGTABLE_LEVELS
492         int
493         default 2
494
495 config ARCH_HAS_ELF_RANDOMIZE
496         bool
497         help
498           An architecture supports choosing randomized locations for
499           stack, mmap, brk, and ET_DYN. Defined functions:
500           - arch_mmap_rnd()
501           - arch_randomize_brk()
502
503 #
504 # ABI hall of shame
505 #
506 config CLONE_BACKWARDS
507         bool
508         help
509           Architecture has tls passed as the 4th argument of clone(2),
510           not the 5th one.
511
512 config CLONE_BACKWARDS2
513         bool
514         help
515           Architecture has the first two arguments of clone(2) swapped.
516
517 config CLONE_BACKWARDS3
518         bool
519         help
520           Architecture has tls passed as the 3rd argument of clone(2),
521           not the 5th one.
522
523 config ODD_RT_SIGACTION
524         bool
525         help
526           Architecture has unusual rt_sigaction(2) arguments
527
528 config OLD_SIGSUSPEND
529         bool
530         help
531           Architecture has old sigsuspend(2) syscall, of one-argument variety
532
533 config OLD_SIGSUSPEND3
534         bool
535         help
536           Even weirder antique ABI - three-argument sigsuspend(2)
537
538 config OLD_SIGACTION
539         bool
540         help
541           Architecture has old sigaction(2) syscall.  Nope, not the same
542           as OLD_SIGSUSPEND | OLD_SIGSUSPEND3 - alpha has sigsuspend(2),
543           but fairly different variant of sigaction(2), thanks to OSF/1
544           compatibility...
545
546 config COMPAT_OLD_SIGACTION
547         bool
548
549 source "kernel/gcov/Kconfig"