1
2source "arch/powerpc/platforms/Kconfig.cputype"
3
4config PPC32
5 bool
6 default y if !PPC64
7
8config 32BIT
9 bool
10 default y if PPC32
11
12config 64BIT
13 bool
14 default y if PPC64
15
16config MMU
17 bool
18 default y
19
20config ARCH_MMAP_RND_BITS_MAX
21
22
23
24
25
26
27 default 29 if PPC_BOOK3S_64 && PPC_64K_PAGES
28 default 33 if PPC_BOOK3S_64
29
30
31
32
33 default 32 if 64BIT
34
35
36 default ARCH_MMAP_RND_COMPAT_BITS_MAX
37
38config ARCH_MMAP_RND_BITS_MIN
39
40 default 14 if 64BIT && PPC_64K_PAGES
41 default 18 if 64BIT
42
43
44 default ARCH_MMAP_RND_COMPAT_BITS_MIN
45
46config ARCH_MMAP_RND_COMPAT_BITS_MAX
47
48
49 default 11 if PPC_256K_PAGES
50 default 13 if PPC_64K_PAGES
51 default 15 if PPC_16K_PAGES
52 default 17
53
54config ARCH_MMAP_RND_COMPAT_BITS_MIN
55
56
57 default 5 if PPC_256K_PAGES
58 default 7 if PPC_64K_PAGES
59 default 9 if PPC_16K_PAGES
60 default 11
61
62config HAVE_SETUP_PER_CPU_AREA
63 def_bool PPC64
64
65config NEED_PER_CPU_EMBED_FIRST_CHUNK
66 def_bool PPC64
67
68config NR_IRQS
69 int "Number of virtual interrupt numbers"
70 range 32 32768
71 default "512"
72 help
73 This defines the number of virtual interrupt numbers the kernel
74 can manage. Virtual interrupt numbers are what you see in
75 /proc/interrupts. If you configure your system to have too few,
76 drivers will fail to load or worse - handle with care.
77
78config NMI_IPI
79 bool
80 depends on SMP && (DEBUGGER || KEXEC_CORE || HARDLOCKUP_DETECTOR)
81 default y
82
83config PPC_WATCHDOG
84 bool
85 depends on HARDLOCKUP_DETECTOR
86 depends on HAVE_HARDLOCKUP_DETECTOR_ARCH
87 default y
88 help
89 This is a placeholder when the powerpc hardlockup detector
90 watchdog is selected (arch/powerpc/kernel/watchdog.c). It is
91 seleted via the generic lockup detector menu which is why we
92 have no standalone config option for it here.
93
94config STACKTRACE_SUPPORT
95 bool
96 default y
97
98config TRACE_IRQFLAGS_SUPPORT
99 bool
100 default y
101
102config LOCKDEP_SUPPORT
103 bool
104 default y
105
106config GENERIC_LOCKBREAK
107 bool
108 default y
109 depends on SMP && PREEMPT
110
111config GENERIC_HWEIGHT
112 bool
113 default y
114
115config PPC
116 bool
117 default y
118
119
120
121 select ARCH_HAS_DEVMEM_IS_ALLOWED
122 select ARCH_HAS_DMA_MMAP_PGPROT
123 select ARCH_HAS_ELF_RANDOMIZE
124 select ARCH_HAS_FORTIFY_SOURCE
125 select ARCH_HAS_GCOV_PROFILE_ALL
126 select ARCH_HAS_MEMREMAP_COMPAT_ALIGN
127 select ARCH_HAS_HUGEPD if HUGETLB_PAGE
128 select ARCH_HAS_MMIOWB if PPC64
129 select ARCH_HAS_PHYS_TO_DMA
130 select ARCH_HAS_PMEM_API if PPC64
131 select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
132 select ARCH_HAS_PTE_SPECIAL
133 select ARCH_HAS_MEMBARRIER_CALLBACKS
134 select ARCH_HAS_SCALED_CPUTIME if VIRT_CPU_ACCOUNTING_NATIVE
135 select ARCH_HAS_SG_CHAIN
136 select ARCH_HAS_STRICT_KERNEL_RWX if ((PPC_BOOK3S_64 || PPC32) && !RELOCATABLE && !HIBERNATION)
137 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
138 select ARCH_HAS_UACCESS_FLUSHCACHE if PPC64
139 select ARCH_HAS_UACCESS_MCSAFE if PPC64
140 select ARCH_HAS_UBSAN_SANITIZE_ALL
141 select ARCH_HAS_ZONE_DEVICE if PPC_BOOK3S_64
142 select ARCH_HAVE_NMI_SAFE_CMPXCHG
143 select ARCH_MIGHT_HAVE_PC_PARPORT
144 select ARCH_MIGHT_HAVE_PC_SERIO
145 select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
146 select ARCH_SUPPORTS_ATOMIC_RMW
147 select ARCH_SUPPORTS_DEBUG_PAGEALLOC if PPC32 || PPC_BOOK3S_64
148 select ARCH_USE_BUILTIN_BSWAP
149 select ARCH_USE_CMPXCHG_LOCKREF if PPC64
150 select ARCH_USE_QUEUED_RWLOCKS if PPC_QUEUED_SPINLOCKS
151 select ARCH_USE_QUEUED_SPINLOCKS if PPC_QUEUED_SPINLOCKS
152 select ARCH_WANT_IPC_PARSE_VERSION
153 select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
154 select ARCH_WEAK_RELEASE_ACQUIRE
155 select BINFMT_ELF
156 select BUILDTIME_EXTABLE_SORT
157 select CLONE_BACKWARDS
158 select DCACHE_WORD_ACCESS if PPC64 && CPU_LITTLE_ENDIAN
159 select DMA_OPS_BYPASS if PPC64
160 select DMA_OPS if PPC64
161 select ARCH_HAS_DMA_MAP_DIRECT if PPC64 && PPC_PSERIES
162 select DYNAMIC_FTRACE if FUNCTION_TRACER
163 select EDAC_ATOMIC_SCRUB
164 select EDAC_SUPPORT
165 select GENERIC_ATOMIC64 if PPC32
166 select GENERIC_CLOCKEVENTS
167 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
168 select GENERIC_CMOS_UPDATE
169 select GENERIC_CPU_AUTOPROBE
170 select GENERIC_CPU_VULNERABILITIES if PPC_BARRIER_NOSPEC
171 select GENERIC_IRQ_SHOW
172 select GENERIC_IRQ_SHOW_LEVEL
173 select GENERIC_SMP_IDLE_THREAD
174 select GENERIC_STRNCPY_FROM_USER
175 select GENERIC_STRNLEN_USER
176 select GENERIC_TIME_VSYSCALL
177 select HAVE_ARCH_AUDITSYSCALL
178 select HAVE_ARCH_JUMP_LABEL
179 select HAVE_ARCH_KGDB
180 select HAVE_ARCH_MMAP_RND_BITS
181 select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
182 select HAVE_ARCH_SECCOMP_FILTER
183 select HAVE_ARCH_TRACEHOOK
184 select HAVE_STACKPROTECTOR if PPC64 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r13)
185 select HAVE_STACKPROTECTOR if PPC32 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r2)
186 select HAVE_CONTEXT_TRACKING if PPC64
187 select HAVE_DEBUG_KMEMLEAK
188 select HAVE_DEBUG_STACKOVERFLOW
189 select HAVE_DYNAMIC_FTRACE
190 select HAVE_DYNAMIC_FTRACE_WITH_REGS if MPROFILE_KERNEL
191 select HAVE_EBPF_JIT if PPC64
192 select HAVE_EFFICIENT_UNALIGNED_ACCESS if !(CPU_LITTLE_ENDIAN && POWER7_CPU)
193 select HAVE_FAST_GUP
194 select HAVE_FTRACE_MCOUNT_RECORD
195 select HAVE_FUNCTION_GRAPH_TRACER
196 select HAVE_FUNCTION_TRACER
197 select HAVE_GCC_PLUGINS if GCC_VERSION >= 50200
198 select HAVE_HW_BREAKPOINT if PERF_EVENTS && (PPC_BOOK3S || PPC_8xx)
199 select HAVE_IDE
200 select HAVE_IOREMAP_PROT
201 select HAVE_IRQ_EXIT_ON_IRQ_STACK
202 select HAVE_KERNEL_GZIP
203 select HAVE_KPROBES
204 select HAVE_KPROBES_ON_FTRACE
205 select HAVE_KRETPROBES
206 select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
207 select HAVE_LIVEPATCH if HAVE_DYNAMIC_FTRACE_WITH_REGS
208 select HAVE_MOD_ARCH_SPECIFIC
209 select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S)
210 select HAVE_HARDLOCKUP_DETECTOR_ARCH if (PPC64 && PPC_BOOK3S)
211 select HAVE_OPROFILE
212 select HAVE_OPTPROBES if PPC64
213 select HAVE_PERF_EVENTS
214 select HAVE_PERF_EVENTS_NMI if PPC64
215 select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !HAVE_HARDLOCKUP_DETECTOR_ARCH
216 select HAVE_PERF_REGS
217 select HAVE_PERF_USER_STACK_DUMP
218 select HAVE_RCU_TABLE_FREE
219 select HAVE_MMU_GATHER_PAGE_SIZE
220 select HAVE_REGS_AND_STACK_ACCESS_API
221 select HAVE_RELIABLE_STACKTRACE if PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN
222 select HAVE_SYSCALL_TRACEPOINTS
223 select HAVE_VIRT_CPU_ACCOUNTING
224 select HAVE_IRQ_TIME_ACCOUNTING
225 select HAVE_RSEQ
226 select IOMMU_HELPER if PPC64
227 select IRQ_DOMAIN
228 select IRQ_FORCED_THREADING
229 select MODULES_USE_ELF_RELA
230 select NEED_DMA_MAP_STATE if PPC64 || NOT_COHERENT_CACHE
231 select NEED_SG_DMA_LENGTH
232 select OF
233 select OF_EARLY_FLATTREE
234 select OF_RESERVED_MEM
235 select OLD_SIGACTION if PPC32
236 select OLD_SIGSUSPEND
237 select PPC_DAWR if PPC64
238 select RTC_LIB
239 select SPARSE_IRQ
240 select SYSCTL_EXCEPTION_TRACE
241 select VIRT_TO_BUS if !PPC64
242
243
244
245
246config PPC_BARRIER_NOSPEC
247 bool
248 default y
249 depends on PPC_BOOK3S_64 || PPC_FSL_BOOK3E
250
251config GENERIC_CSUM
252 def_bool n
253
254config EARLY_PRINTK
255 bool
256 default y
257
258config PANIC_TIMEOUT
259 int
260 default 180
261
262config COMPAT
263 bool
264 default y if PPC64
265 select COMPAT_BINFMT_ELF
266 select ARCH_WANT_OLD_COMPAT_IPC
267 select COMPAT_OLD_SIGACTION
268
269config SYSVIPC_COMPAT
270 bool
271 depends on COMPAT && SYSVIPC
272 default y
273
274
275config GENERIC_NVRAM
276 bool
277 default y if PPC32
278
279config SCHED_OMIT_FRAME_POINTER
280 bool
281 default y
282
283config ARCH_MAY_HAVE_PC_FDC
284 bool
285 default PCI
286
287config PPC_UDBG_16550
288 bool
289 default n
290
291config GENERIC_TBSYNC
292 bool
293 default y if PPC32 && SMP
294 default n
295
296config AUDIT_ARCH
297 bool
298 default y
299
300config GENERIC_BUG
301 bool
302 default y
303 depends on BUG
304
305config SYS_SUPPORTS_APM_EMULATION
306 default y if PMAC_APM_EMU
307 bool
308
309config EPAPR_BOOT
310 bool
311 help
312 Used to allow a board to specify it wants an ePAPR compliant wrapper.
313 default n
314
315config DEFAULT_UIMAGE
316 bool
317 help
318 Used to allow a board to specify it wants a uImage built by default
319 default n
320
321config ARCH_HIBERNATION_POSSIBLE
322 bool
323 default y
324
325config ARCH_SUSPEND_POSSIBLE
326 def_bool y
327 depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \
328 (PPC_85xx && !PPC_E500MC) || PPC_86xx || PPC_PSERIES \
329 || 44x || 40x
330
331config ARCH_SUSPEND_NONZERO_CPU
332 def_bool y
333 depends on PPC_POWERNV || PPC_PSERIES
334
335config PPC_DCR_NATIVE
336 bool
337 default n
338
339config PPC_DCR_MMIO
340 bool
341 default n
342
343config PPC_DCR
344 bool
345 depends on PPC_DCR_NATIVE || PPC_DCR_MMIO
346 default y
347
348config PPC_OF_PLATFORM_PCI
349 bool
350 depends on PCI
351 depends on PPC64
352 default n
353
354config ARCH_SUPPORTS_UPROBES
355 def_bool y
356
357config PPC_ADV_DEBUG_REGS
358 bool
359 depends on 40x || BOOKE
360 default y
361
362config PPC_ADV_DEBUG_IACS
363 int
364 depends on PPC_ADV_DEBUG_REGS
365 default 4 if 44x
366 default 2
367
368config PPC_ADV_DEBUG_DACS
369 int
370 depends on PPC_ADV_DEBUG_REGS
371 default 2
372
373config PPC_ADV_DEBUG_DVCS
374 int
375 depends on PPC_ADV_DEBUG_REGS
376 default 2 if 44x
377 default 0
378
379config PPC_ADV_DEBUG_DAC_RANGE
380 bool
381 depends on PPC_ADV_DEBUG_REGS && 44x
382 default y
383
384config PPC_DAWR
385 bool
386
387
388
389config ZONE_DMA
390 bool
391 default y if PPC64
392
393config ZONE_DMA32
394 bool
395 default y if PPC64
396
397config PGTABLE_LEVELS
398 int
399 default 2 if !PPC64
400 default 3 if PPC_64K_PAGES && !PPC_BOOK3S_64
401 default 4
402
403source "init/Kconfig"
404
405source "kernel/Kconfig.freezer"
406
407source "arch/powerpc/sysdev/Kconfig"
408source "arch/powerpc/platforms/Kconfig"
409
410menu "Kernel options"
411
412config HIGHMEM
413 bool "High memory support"
414 depends on PPC32
415 select KMAP_LOCAL
416
417source kernel/Kconfig.hz
418source kernel/Kconfig.preempt
419source "fs/Kconfig.binfmt"
420
421config HUGETLB_PAGE_SIZE_VARIABLE
422 bool
423 depends on HUGETLB_PAGE
424 default y
425
426config MATH_EMULATION
427 bool "Math emulation"
428 depends on 4xx || PPC_8xx || PPC_MPC832x || BOOKE
429 ---help---
430 Some PowerPC chips designed for embedded applications do not have
431 a floating-point unit and therefore do not implement the
432 floating-point instructions in the PowerPC instruction set. If you
433 say Y here, the kernel will include code to emulate a floating-point
434 unit, which will allow programs that use floating-point
435 instructions to run.
436
437 This is also useful to emulate missing (optional) instructions
438 such as fsqrt on cores that do have an FPU but do not implement
439 them (such as Freescale BookE).
440
441choice
442 prompt "Math emulation options"
443 default MATH_EMULATION_FULL
444 depends on MATH_EMULATION
445
446config MATH_EMULATION_FULL
447 bool "Emulate all the floating point instructions"
448 ---help---
449 Select this option will enable the kernel to support to emulate
450 all the floating point instructions. If your SoC doesn't have
451 a FPU, you should select this.
452
453config MATH_EMULATION_HW_UNIMPLEMENTED
454 bool "Just emulate the FPU unimplemented instructions"
455 ---help---
456 Select this if you know there does have a hardware FPU on your
457 SoC, but some floating point instructions are not implemented by that.
458
459endchoice
460
461config PPC_TRANSACTIONAL_MEM
462 bool "Transactional Memory support for POWERPC"
463 depends on PPC_BOOK3S_64
464 depends on SMP
465 select ALTIVEC
466 select VSX
467 default n
468 ---help---
469 Support user-mode Transactional Memory on POWERPC.
470
471config PPC_UV
472 bool "Ultravisor support"
473 depends on KVM_BOOK3S_HV_POSSIBLE
474 depends on ZONE_DEVICE
475 depends on DEVICE_PRIVATE
476 default n
477 help
478 This option paravirtualizes the kernel to run in POWER platforms that
479 supports the Protected Execution Facility (PEF). On such platforms,
480 the ultravisor firmware runs at a privilege level above the
481 hypervisor.
482
483 If unsure, say "N".
484
485config LD_HEAD_STUB_CATCH
486 bool "Reserve 256 bytes to cope with linker stubs in HEAD text" if EXPERT
487 depends on PPC64
488 default n
489 help
490 Very large kernels can cause linker branch stubs to be generated by
491 code in head_64.S, which moves the head text sections out of their
492 specified location. This option can work around the problem.
493
494 If unsure, say "N".
495
496config MPROFILE_KERNEL
497 depends on PPC64 && CPU_LITTLE_ENDIAN
498 def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -I$(srctree)/include -D__KERNEL__)
499
500config HOTPLUG_CPU
501 bool "Support for enabling/disabling CPUs"
502 depends on SMP && (PPC_PSERIES || \
503 PPC_PMAC || PPC_POWERNV || FSL_SOC_BOOKE)
504 ---help---
505 Say Y here to be able to disable and re-enable individual
506 CPUs at runtime on SMP machines.
507
508 Say N if you are unsure.
509
510config PPC_QUEUED_SPINLOCKS
511 bool "Queued spinlocks"
512 depends on SMP
513 help
514 Say Y here to use queued spinlocks which give better scalability and
515 fairness on large SMP and NUMA systems without harming single threaded
516 performance.
517
518 This option is currently experimental, the code is more complex and
519 less tested so it defaults to "N" for the moment.
520
521 If unsure, say "N".
522
523config ARCH_CPU_PROBE_RELEASE
524 def_bool y
525 depends on HOTPLUG_CPU
526
527config ARCH_ENABLE_MEMORY_HOTPLUG
528 def_bool y
529
530config ARCH_HAS_WALK_MEMORY
531 def_bool y
532
533config ARCH_ENABLE_MEMORY_HOTREMOVE
534 def_bool y
535
536config PPC64_SUPPORTS_MEMORY_FAILURE
537 bool "Add support for memory hwpoison"
538 depends on PPC_BOOK3S_64
539 default "y" if PPC_POWERNV
540 select ARCH_SUPPORTS_MEMORY_FAILURE
541
542config KEXEC
543 bool "kexec system call"
544 depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP)) || PPC_BOOK3E
545 select KEXEC_CORE
546 help
547 kexec is a system call that implements the ability to shutdown your
548 current kernel, and to start another kernel. It is like a reboot
549 but it is independent of the system firmware. And like a reboot
550 you can start any kernel with it, not just Linux.
551
552 The name comes from the similarity to the exec system call.
553
554 It is an ongoing process to be certain the hardware in a machine
555 is properly shutdown, so do not be surprised if this code does not
556 initially work for you. As of this writing the exact hardware
557 interface is strongly in flux, so no good recommendation can be
558 made.
559
560config KEXEC_FILE
561 bool "kexec file based system call"
562 select KEXEC_CORE
563 select HAVE_IMA_KEXEC
564 select BUILD_BIN2C
565 depends on PPC64
566 depends on CRYPTO=y
567 depends on CRYPTO_SHA256=y
568 help
569 This is a new version of the kexec system call. This call is
570 file based and takes in file descriptors as system call arguments
571 for kernel and initramfs as opposed to a list of segments as is the
572 case for the older kexec call.
573
574config ARCH_HAS_KEXEC_PURGATORY
575 def_bool KEXEC_FILE
576
577config RELOCATABLE
578 bool "Build a relocatable kernel"
579 depends on PPC64 || (FLATMEM && (44x || FSL_BOOKE))
580 select NONSTATIC_KERNEL
581 select MODULE_REL_CRCS if MODVERSIONS
582 help
583 This builds a kernel image that is capable of running at the
584 location the kernel is loaded at. For ppc32, there is no any
585 alignment restrictions, and this feature is a superset of
586 DYNAMIC_MEMSTART and hence overrides it. For ppc64, we should use
587 16k-aligned base address. The kernel is linked as a
588 position-independent executable (PIE) and contains dynamic relocations
589 which are processed early in the bootup process.
590
591 One use is for the kexec on panic case where the recovery kernel
592 must live at a different physical address than the primary
593 kernel.
594
595 Note: If CONFIG_RELOCATABLE=y, then the kernel runs from the address
596 it has been loaded at and the compile time physical addresses
597 CONFIG_PHYSICAL_START is ignored. However CONFIG_PHYSICAL_START
598 setting can still be useful to bootwrappers that need to know the
599 load address of the kernel (eg. u-boot/mkimage).
600
601config RELOCATABLE_TEST
602 bool "Test relocatable kernel"
603 depends on (PPC64 && RELOCATABLE)
604 default n
605 help
606 This runs the relocatable kernel at the address it was initially
607 loaded at, which tends to be non-zero and therefore test the
608 relocation code.
609
610config CRASH_DUMP
611 bool "Build a dump capture kernel"
612 depends on PPC64 || 6xx || FSL_BOOKE || (44x && !SMP)
613 select RELOCATABLE if PPC64 || 44x || FSL_BOOKE
614 help
615 Build a kernel suitable for use as a dump capture kernel.
616 The same kernel binary can be used as production kernel and dump
617 capture kernel.
618
619config FA_DUMP
620 bool "Firmware-assisted dump"
621 depends on PPC64 && (PPC_RTAS || PPC_POWERNV)
622 select CRASH_CORE
623 select CRASH_DUMP
624 help
625 A robust mechanism to get reliable kernel crash dump with
626 assistance from firmware. This approach does not use kexec,
627 instead firmware assists in booting the capture kernel
628 while preserving memory contents. Firmware-assisted dump
629 is meant to be a kdump replacement offering robustness and
630 speed not possible without system firmware assistance.
631
632 If unsure, say "y". Only special kernels like petitboot may
633 need to say "N" here.
634
635config PRESERVE_FA_DUMP
636 bool "Preserve Firmware-assisted dump"
637 depends on PPC64 && PPC_POWERNV && !FA_DUMP
638 help
639 On a kernel with FA_DUMP disabled, this option helps to preserve
640 crash data from a previously crash'ed kernel. Useful when the next
641 memory preserving kernel boot would process this crash data.
642 Petitboot kernel is the typical usecase for this option.
643
644config OPAL_CORE
645 bool "Export OPAL memory as /sys/firmware/opal/core"
646 depends on PPC64 && PPC_POWERNV
647 help
648 This option uses the MPIPL support in firmware to provide an
649 ELF core of OPAL memory after a crash. The ELF core is exported
650 as /sys/firmware/opal/core file which is helpful in debugging
651 OPAL crashes using GDB.
652
653config IRQ_ALL_CPUS
654 bool "Distribute interrupts on all CPUs by default"
655 depends on SMP
656 help
657 This option gives the kernel permission to distribute IRQs across
658 multiple CPUs. Saying N here will route all IRQs to the first
659 CPU. Generally saying Y is safe, although some problems have been
660 reported with SMP Power Macintoshes with this option enabled.
661
662config NUMA
663 bool "NUMA support"
664 depends on PPC64
665 default y if SMP && PPC_PSERIES
666
667config NODES_SHIFT
668 int
669 default "8" if PPC64
670 default "4"
671 depends on NEED_MULTIPLE_NODES
672
673config USE_PERCPU_NUMA_NODE_ID
674 def_bool y
675 depends on NUMA
676
677config HAVE_MEMORYLESS_NODES
678 def_bool y
679 depends on NUMA
680
681config ARCH_SELECT_MEMORY_MODEL
682 def_bool y
683 depends on PPC64
684
685config ARCH_FLATMEM_ENABLE
686 def_bool y
687 depends on (PPC64 && !NUMA) || PPC32
688
689config ARCH_SPARSEMEM_ENABLE
690 def_bool y
691 depends on PPC64
692 select SPARSEMEM_VMEMMAP_ENABLE
693
694config ARCH_SPARSEMEM_DEFAULT
695 def_bool y
696 depends on PPC_BOOK3S_64
697
698config SYS_SUPPORTS_HUGETLBFS
699 bool
700
701config ILLEGAL_POINTER_VALUE
702 hex
703
704
705 default 0x5deadbeef0000000 if PPC64
706 default 0
707
708source "mm/Kconfig"
709
710config ARCH_MEMORY_PROBE
711 def_bool y
712 depends on MEMORY_HOTPLUG
713
714config STDBINUTILS
715 bool "Using standard binutils settings"
716 depends on 44x
717 default y
718 help
719 Turning this option off allows you to select 256KB PAGE_SIZE on 44x.
720 Note, that kernel will be able to run only those applications,
721 which had been compiled using binutils later than 2.17.50.0.3 with
722 '-zmax-page-size' set to 256K (the default is 64K). Or, if using
723 the older binutils, you can patch them with a trivial patch, which
724 changes the ELF_MAXPAGESIZE definition from 0x10000 to 0x40000.
725
726choice
727 prompt "Page size"
728 default PPC_4K_PAGES
729 help
730 Select the kernel logical page size. Increasing the page size
731 will reduce software overhead at each page boundary, allow
732 hardware prefetch mechanisms to be more effective, and allow
733 larger dma transfers increasing IO efficiency and reducing
734 overhead. However the utilization of memory will increase.
735 For example, each cached file will using a multiple of the
736 page size to hold its contents and the difference between the
737 end of file and the end of page is wasted.
738
739 Some dedicated systems, such as software raid serving with
740 accelerated calculations, have shown significant increases.
741
742 If you configure a 64 bit kernel for 64k pages but the
743 processor does not support them, then the kernel will simulate
744 them with 4k pages, loading them on demand, but with the
745 reduced software overhead and larger internal fragmentation.
746 For the 32 bit kernel, a large page option will not be offered
747 unless it is supported by the configured processor.
748
749 If unsure, choose 4K_PAGES.
750
751config PPC_4K_PAGES
752 bool "4k page size"
753 select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64
754
755config PPC_16K_PAGES
756 bool "16k page size"
757 depends on 44x || PPC_8xx
758
759config PPC_64K_PAGES
760 bool "64k page size"
761 depends on !PPC_FSL_BOOK3E && (44x || PPC_BOOK3S_64 || PPC_BOOK3E_64)
762 select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64
763
764config PPC_256K_PAGES
765 bool "256k page size"
766 depends on 44x && !STDBINUTILS
767 help
768 Make the page size 256k.
769
770 As the ELF standard only requires alignment to support page
771 sizes up to 64k, you will need to compile all of your user
772 space applications with a non-standard binutils settings
773 (see the STDBINUTILS description for details).
774
775 Say N unless you know what you are doing.
776
777endchoice
778
779config THREAD_SHIFT
780 int "Thread shift" if EXPERT
781 range 13 15
782 default "15" if PPC_256K_PAGES
783 default "14" if PPC64
784 default "13"
785 help
786 Used to define the stack size. The default is almost always what you
787 want. Only change this if you know what you are doing.
788
789config FORCE_MAX_ZONEORDER
790 int "Maximum zone order"
791 range 8 9 if PPC64 && PPC_64K_PAGES
792 default "9" if PPC64 && PPC_64K_PAGES
793 range 13 13 if PPC64 && !PPC_64K_PAGES
794 default "13" if PPC64 && !PPC_64K_PAGES
795 range 9 64 if PPC32 && PPC_16K_PAGES
796 default "9" if PPC32 && PPC_16K_PAGES
797 range 7 64 if PPC32 && PPC_64K_PAGES
798 default "7" if PPC32 && PPC_64K_PAGES
799 range 5 64 if PPC32 && PPC_256K_PAGES
800 default "5" if PPC32 && PPC_256K_PAGES
801 range 11 64
802 default "11"
803 help
804 The kernel memory allocator divides physically contiguous memory
805 blocks into "zones", where each zone is a power of two number of
806 pages. This option selects the largest power of two that the kernel
807 keeps in the memory allocator. If you need to allocate very large
808 blocks of physically contiguous memory, then you may need to
809 increase this value.
810
811 This config option is actually maximum order plus one. For example,
812 a value of 11 means that the largest free memory block is 2^10 pages.
813
814 The page size is not necessarily 4KB. For example, on 64-bit
815 systems, 64KB pages can be enabled via CONFIG_PPC_64K_PAGES. Keep
816 this in mind when choosing a value for this option.
817
818config PPC_SUBPAGE_PROT
819 bool "Support setting protections for 4k subpages"
820 depends on PPC_BOOK3S_64 && PPC_64K_PAGES
821 help
822 This option adds support for a system call to allow user programs
823 to set access permissions (read/write, readonly, or no access)
824 on the 4k subpages of each 64k page.
825
826config PPC_COPRO_BASE
827 bool
828 default n
829
830config SCHED_SMT
831 bool "SMT (Hyperthreading) scheduler support"
832 depends on PPC64 && SMP
833 help
834 SMT scheduler support improves the CPU scheduler's decision making
835 when dealing with POWER5 cpus at a cost of slightly increased
836 overhead in some places. If unsure say N here.
837
838config PPC_DENORMALISATION
839 bool "PowerPC denormalisation exception handling"
840 depends on PPC_BOOK3S_64
841 default "y" if PPC_POWERNV
842 ---help---
843 Add support for handling denormalisation of single precision
844 values. Useful for bare metal only. If unsure say Y here.
845
846config CMDLINE_BOOL
847 bool "Default bootloader kernel arguments"
848
849config CMDLINE
850 string "Initial kernel command string" if CMDLINE_BOOL
851 default "console=ttyS0,9600 console=tty0 root=/dev/sda2" if CMDLINE_BOOL
852 default ""
853 help
854 On some platforms, there is currently no way for the boot loader to
855 pass arguments to the kernel. For these platforms, you can supply
856 some command-line options at build time by entering them here. In
857 most cases you will need to specify the root device here.
858
859config CMDLINE_FORCE
860 bool "Always use the default kernel command string"
861 depends on CMDLINE_BOOL
862 help
863 Always use the default kernel command string, even if the boot
864 loader passes other arguments to the kernel.
865 This is useful if you cannot or don't want to change the
866 command-line options your boot loader passes to the kernel.
867
868config EXTRA_TARGETS
869 string "Additional default image types"
870 help
871 List additional targets to be built by the bootwrapper here (separated
872 by spaces). This is useful for targets that depend of device tree
873 files in the .dts directory.
874
875 Targets in this list will be build as part of the default build
876 target, or when the user does a 'make zImage' or a
877 'make zImage.initrd'.
878
879 If unsure, leave blank
880
881config ARCH_WANTS_FREEZER_CONTROL
882 def_bool y
883 depends on ADB_PMU
884
885source kernel/power/Kconfig
886
887config SECCOMP
888 bool "Enable seccomp to safely compute untrusted bytecode"
889 depends on PROC_FS
890 default y
891 help
892 This kernel feature is useful for number crunching applications
893 that may need to compute untrusted bytecode during their
894 execution. By using pipes or other transports made available to
895 the process as file descriptors supporting the read/write
896 syscalls, it's possible to isolate those applications in
897 their own address space using seccomp. Once seccomp is
898 enabled via /proc/<pid>/seccomp, it cannot be disabled
899 and the task is only allowed to execute a few safe syscalls
900 defined by each seccomp mode.
901
902 If unsure, say Y. Only embedded should say N here.
903
904config PPC_MEM_KEYS
905 prompt "PowerPC Memory Protection Keys"
906 def_bool y
907 depends on PPC_BOOK3S_64
908 select ARCH_USES_HIGH_VMA_FLAGS
909 select ARCH_HAS_PKEYS
910 help
911 Memory Protection Keys provides a mechanism for enforcing
912 page-based protections, but without requiring modification of the
913 page tables when an application changes protection domains.
914
915 For details, see Documentation/vm/protection-keys.rst
916
917 If unsure, say y.
918
919config PPC_SECURE_BOOT
920 prompt "Enable secure boot support"
921 bool
922 depends on PPC_POWERNV
923 depends on IMA_ARCH_POLICY
924 imply IMA_SECURE_AND_OR_TRUSTED_BOOT
925 help
926 Systems with firmware secure boot enabled need to define security
927 policies to extend secure boot to the OS. This config allows a user
928 to enable OS secure boot on systems that have firmware support for
929 it. If in doubt say N.
930
931config PPC_SECVAR_SYSFS
932 bool "Enable sysfs interface for POWER secure variables"
933 default y
934 depends on PPC_SECURE_BOOT
935 depends on SYSFS
936 help
937 POWER secure variables are managed and controlled by firmware.
938 These variables are exposed to userspace via sysfs to enable
939 read/write operations on these variables. Say Y if you have
940 secure boot enabled and want to expose variables to userspace.
941
942config PPC_RTAS_FILTER
943 bool "Enable filtering of RTAS syscalls"
944 default y
945 depends on PPC_RTAS
946 help
947 The RTAS syscall API has security issues that could be used to
948 compromise system integrity. This option enforces restrictions on the
949 RTAS calls and arguments passed by userspace programs to mitigate
950 these issues.
951
952 Say Y unless you know what you are doing and the filter is causing
953 problems for you.
954
955endmenu
956
957config ISA_DMA_API
958 bool
959 default PCI
960
961menu "Bus options"
962
963config ISA
964 bool "Support for ISA-bus hardware"
965 depends on PPC_CHRP
966 select PPC_I8259
967 help
968 Find out whether you have ISA slots on your motherboard. ISA is the
969 name of a bus system, i.e. the way the CPU talks to the other stuff
970 inside your box. If you have an Apple machine, say N here; if you
971 have an IBM RS/6000 or pSeries machine, say Y. If you have an
972 embedded board, consult your board documentation.
973
974config GENERIC_ISA_DMA
975 bool
976 depends on ISA_DMA_API
977 default y
978
979config PPC_INDIRECT_PCI
980 bool
981 depends on PCI
982 default y if 40x || 44x
983 default n
984
985config EISA
986 bool
987
988config SBUS
989 bool
990
991config FSL_SOC
992 bool
993
994config FSL_PCI
995 bool
996 select ARCH_HAS_DMA_SET_MASK
997 select PPC_INDIRECT_PCI
998 select PCI_QUIRKS
999
1000config FSL_PMC
1001 bool
1002 default y
1003 depends on SUSPEND && (PPC_85xx || PPC_86xx)
1004 help
1005 Freescale MPC85xx/MPC86xx power management controller support
1006 (suspend/resume). For MPC83xx see platforms/83xx/suspend.c
1007
1008config PPC4xx_CPM
1009 bool
1010 default y
1011 depends on SUSPEND && (44x || 40x)
1012 help
1013 PPC4xx Clock Power Management (CPM) support (suspend/resume).
1014 It also enables support for two different idle states (idle-wait
1015 and idle-doze).
1016
1017config 4xx_SOC
1018 bool
1019
1020config FSL_LBC
1021 bool "Freescale Local Bus support"
1022 help
1023 Enables reporting of errors from the Freescale local bus
1024 controller. Also contains some common code used by
1025 drivers for specific local bus peripherals.
1026
1027config FSL_GTM
1028 bool
1029 depends on PPC_83xx || QUICC_ENGINE || CPM2
1030 help
1031 Freescale General-purpose Timers support
1032
1033
1034config MCA
1035 bool
1036
1037
1038
1039
1040config PPC_PCI_CHOICE
1041 bool
1042
1043config PCI
1044 bool "PCI support" if PPC_PCI_CHOICE
1045 default y if !40x && !CPM2 && !PPC_8xx && !PPC_83xx \
1046 && !PPC_85xx && !PPC_86xx && !GAMECUBE_COMMON
1047 default PCI_QSPAN if PPC_8xx
1048 select GENERIC_PCI_IOMAP
1049 help
1050 Find out whether your system includes a PCI bus. PCI is the name of
1051 a bus system, i.e. the way the CPU talks to the other stuff inside
1052 your box. If you say Y here, the kernel will include drivers and
1053 infrastructure code to support PCI bus devices.
1054
1055config PCI_DOMAINS
1056 def_bool PCI
1057
1058config PCI_SYSCALL
1059 def_bool PCI
1060
1061config PCI_QSPAN
1062 bool "QSpan PCI"
1063 depends on PPC_8xx
1064 select PPC_I8259
1065 help
1066 Say Y here if you have a system based on a Motorola 8xx-series
1067 embedded processor with a QSPAN PCI interface, otherwise say N.
1068
1069config PCI_8260
1070 bool
1071 depends on PCI && 8260
1072 select PPC_INDIRECT_PCI
1073 default y
1074
1075source "drivers/pci/Kconfig"
1076
1077source "drivers/pcmcia/Kconfig"
1078
1079config HAS_RAPIDIO
1080 bool
1081 default n
1082
1083config RAPIDIO
1084 tristate "RapidIO support"
1085 depends on HAS_RAPIDIO || PCI
1086 help
1087 If you say Y here, the kernel will include drivers and
1088 infrastructure code to support RapidIO interconnect devices.
1089
1090config FSL_RIO
1091 bool "Freescale Embedded SRIO Controller support"
1092 depends on RAPIDIO = y && HAS_RAPIDIO
1093 default "n"
1094 ---help---
1095 Include support for RapidIO controller on Freescale embedded
1096 processors (MPC8548, MPC8641, etc).
1097
1098source "drivers/rapidio/Kconfig"
1099
1100endmenu
1101
1102config NONSTATIC_KERNEL
1103 bool
1104 default n
1105
1106menu "Advanced setup"
1107 depends on PPC32
1108
1109config ADVANCED_OPTIONS
1110 bool "Prompt for advanced kernel configuration options"
1111 help
1112 This option will enable prompting for a variety of advanced kernel
1113 configuration options. These options can cause the kernel to not
1114 work if they are set incorrectly, but can be used to optimize certain
1115 aspects of kernel memory management.
1116
1117 Unless you know what you are doing, say N here.
1118
1119comment "Default settings for advanced configuration options are used"
1120 depends on !ADVANCED_OPTIONS
1121
1122config LOWMEM_SIZE_BOOL
1123 bool "Set maximum low memory"
1124 depends on ADVANCED_OPTIONS
1125 help
1126 This option allows you to set the maximum amount of memory which
1127 will be used as "low memory", that is, memory which the kernel can
1128 access directly, without having to set up a kernel virtual mapping.
1129 This can be useful in optimizing the layout of kernel virtual
1130 memory.
1131
1132 Say N here unless you know what you are doing.
1133
1134config LOWMEM_SIZE
1135 hex "Maximum low memory size (in bytes)" if LOWMEM_SIZE_BOOL
1136 default "0x30000000"
1137
1138config LOWMEM_CAM_NUM_BOOL
1139 bool "Set number of CAMs to use to map low memory"
1140 depends on ADVANCED_OPTIONS && FSL_BOOKE
1141 help
1142 This option allows you to set the maximum number of CAM slots that
1143 will be used to map low memory. There are a limited number of slots
1144 available and even more limited number that will fit in the L1 MMU.
1145 However, using more entries will allow mapping more low memory. This
1146 can be useful in optimizing the layout of kernel virtual memory.
1147
1148 Say N here unless you know what you are doing.
1149
1150config LOWMEM_CAM_NUM
1151 depends on FSL_BOOKE
1152 int "Number of CAMs to use to map low memory" if LOWMEM_CAM_NUM_BOOL
1153 default 3
1154
1155config DYNAMIC_MEMSTART
1156 bool "Enable page aligned dynamic load address for kernel"
1157 depends on ADVANCED_OPTIONS && FLATMEM && (FSL_BOOKE || 44x)
1158 select NONSTATIC_KERNEL
1159 help
1160 This option enables the kernel to be loaded at any page aligned
1161 physical address. The kernel creates a mapping from KERNELBASE to
1162 the address where the kernel is loaded. The page size here implies
1163 the TLB page size of the mapping for kernel on the particular platform.
1164 Please refer to the init code for finding the TLB page size.
1165
1166 DYNAMIC_MEMSTART is an easy way of implementing pseudo-RELOCATABLE
1167 kernel image, where the only restriction is the page aligned kernel
1168 load address. When this option is enabled, the compile time physical
1169 address CONFIG_PHYSICAL_START is ignored.
1170
1171 This option is overridden by CONFIG_RELOCATABLE
1172
1173config PAGE_OFFSET_BOOL
1174 bool "Set custom page offset address"
1175 depends on ADVANCED_OPTIONS
1176 help
1177 This option allows you to set the kernel virtual address at which
1178 the kernel will map low memory. This can be useful in optimizing
1179 the virtual memory layout of the system.
1180
1181 Say N here unless you know what you are doing.
1182
1183config PAGE_OFFSET
1184 hex "Virtual address of memory base" if PAGE_OFFSET_BOOL
1185 default "0xc0000000"
1186
1187config KERNEL_START_BOOL
1188 bool "Set custom kernel base address"
1189 depends on ADVANCED_OPTIONS
1190 help
1191 This option allows you to set the kernel virtual address at which
1192 the kernel will be loaded. Normally this should match PAGE_OFFSET
1193 however there are times (like kdump) that one might not want them
1194 to be the same.
1195
1196 Say N here unless you know what you are doing.
1197
1198config KERNEL_START
1199 hex "Virtual address of kernel base" if KERNEL_START_BOOL
1200 default PAGE_OFFSET if PAGE_OFFSET_BOOL
1201 default "0xc2000000" if CRASH_DUMP && !NONSTATIC_KERNEL
1202 default "0xc0000000"
1203
1204config PHYSICAL_START_BOOL
1205 bool "Set physical address where the kernel is loaded"
1206 depends on ADVANCED_OPTIONS && FLATMEM && FSL_BOOKE
1207 help
1208 This gives the physical address where the kernel is loaded.
1209
1210 Say N here unless you know what you are doing.
1211
1212config PHYSICAL_START
1213 hex "Physical address where the kernel is loaded" if PHYSICAL_START_BOOL
1214 default "0x02000000" if PPC_STD_MMU && CRASH_DUMP && !NONSTATIC_KERNEL
1215 default "0x00000000"
1216
1217config PHYSICAL_ALIGN
1218 hex
1219 default "0x04000000" if FSL_BOOKE
1220 help
1221 This value puts the alignment restrictions on physical address
1222 where kernel is loaded and run from. Kernel is compiled for an
1223 address which meets above alignment restriction.
1224
1225config TASK_SIZE_BOOL
1226 bool "Set custom user task size"
1227 depends on ADVANCED_OPTIONS
1228 help
1229 This option allows you to set the amount of virtual address space
1230 allocated to user tasks. This can be useful in optimizing the
1231 virtual memory layout of the system.
1232
1233 Say N here unless you know what you are doing.
1234
1235config TASK_SIZE
1236 hex "Size of user task space" if TASK_SIZE_BOOL
1237 default "0x80000000" if PPC_8xx
1238 default "0xc0000000"
1239
1240config CONSISTENT_SIZE_BOOL
1241 bool "Set custom consistent memory pool size"
1242 depends on ADVANCED_OPTIONS && NOT_COHERENT_CACHE
1243 help
1244 This option allows you to set the size of the
1245 consistent memory pool. This pool of virtual memory
1246 is used to make consistent memory allocations.
1247
1248config CONSISTENT_SIZE
1249 hex "Size of consistent memory pool" if CONSISTENT_SIZE_BOOL
1250 default "0x00200000" if NOT_COHERENT_CACHE
1251
1252config PIN_TLB
1253 bool "Pinned Kernel TLBs (860 ONLY)"
1254 depends on ADVANCED_OPTIONS && PPC_8xx && \
1255 !DEBUG_PAGEALLOC && !STRICT_KERNEL_RWX
1256
1257config PIN_TLB_DATA
1258 bool "Pinned TLB for DATA"
1259 depends on PIN_TLB
1260 default y
1261
1262config PIN_TLB_IMMR
1263 bool "Pinned TLB for IMMR"
1264 depends on PIN_TLB
1265 default y
1266
1267config PIN_TLB_TEXT
1268 bool "Pinned TLB for TEXT"
1269 depends on PIN_TLB
1270 default y
1271endmenu
1272
1273if PPC64
1274
1275config PAGE_OFFSET
1276 hex
1277 default "0xc000000000000000"
1278config KERNEL_START
1279 hex
1280 default "0xc000000000000000"
1281config PHYSICAL_START
1282 hex
1283 default "0x00000000"
1284endif
1285
1286config ARCH_RANDOM
1287 def_bool n
1288
1289source "net/Kconfig"
1290
1291source "drivers/Kconfig"
1292
1293source "fs/Kconfig"
1294
1295source "lib/Kconfig"
1296
1297source "arch/powerpc/Kconfig.debug"
1298
1299source "security/Kconfig"
1300
1301source "crypto/Kconfig"
1302
1303config PPC_LIB_RHEAP
1304 bool
1305
1306source "arch/powerpc/kvm/Kconfig"
1307
1308source "kernel/livepatch/Kconfig"
1309