1 # SPDX-License-Identifier: GPL-2.0
10 This option selects whether a 32-bit or a 64-bit kernel
13 menu "Processor support"
15 prompt "Processor Type"
18 There are five families of 32 bit PowerPC chips supported.
19 The most common ones are the desktop and server CPUs (603,
20 604, 740, 750, 74xx) CPUs from Freescale and IBM, with their
21 embedded 512x/52xx/82xx/83xx/86xx counterparts.
22 The other embedded parts, namely 4xx, 8xx and e500
23 (85xx) each form a family of their own that is not compatible
26 If unsure, select 52xx/6xx/7xx/74xx/82xx/83xx/86xx.
29 bool "512x/52xx/6xx/7xx/74xx/82xx/83xx/86xx"
31 select PPC_HAVE_PMU_SUPPORT
32 select HAVE_ARCH_VMAP_STACK
40 select ARCH_SUPPORTS_HUGETLBFS
43 select HAVE_ARCH_VMAP_STACK
52 select PPC_KUEP if PPC_KUAP
55 bool "AMCC 44x, 46x or 47x"
66 bool "Support for 603 SW loaded TLB"
67 depends on PPC_BOOK3S_32
70 Provide support for processors based on the 603 cores. Those
71 processors don't have a HASH MMU and provide SW TLB loading.
74 bool "Support for 604+ HASH MMU" if PPC_BOOK3S_603
75 depends on PPC_BOOK3S_32
78 Provide support for processors not based on the 603 cores.
79 Those processors have a HASH MMU.
82 prompt "Processor Type"
85 There are two families of 64 bit PowerPC chips supported.
86 The most common ones are the desktop and server CPUs
87 (POWER5, 970, POWER5+, POWER6, POWER7, POWER8, POWER9 ...)
89 The other are the "embedded" processors compliant with the
90 "Book 3E" variant of the architecture
93 bool "Server processors"
95 select PPC_HAVE_PMU_SUPPORT
96 select HAVE_ARCH_TRANSPARENT_HUGEPAGE
97 select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION
98 select ARCH_ENABLE_SPLIT_PMD_PTLOCK
99 select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
100 select ARCH_SUPPORTS_HUGETLBFS
101 select ARCH_SUPPORTS_NUMA_BALANCING
105 select PPC_64S_HASH_MMU if !PPC_RADIX_MMU
106 select KASAN_VMALLOC if KASAN
109 bool "Embedded processors"
112 select PPC_FPU # Make it a choice ?
113 select PPC_SMP_MUXED_IPI
120 prompt "CPU selection"
122 This will create a kernel which is optimised for a particular CPU.
123 The resulting kernel may not run on other CPUs, so use this with care.
125 If unsure, select Generic.
128 bool "Generic (POWER5 and PowerPC 970 and above)"
129 depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
130 select PPC_64S_HASH_MMU
133 bool "Generic (POWER8 and above)"
134 depends on PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN
135 select ARCH_HAS_FAST_MULTIPLIER
136 select PPC_64S_HASH_MMU
137 select PPC_HAS_LBARX_LHARX
140 bool "Generic 32 bits powerpc"
141 depends on PPC_BOOK3S_32
144 bool "Cell Broadband Engine"
145 depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
146 depends on !CC_IS_CLANG
147 select PPC_64S_HASH_MMU
150 bool "PowerPC 970 (including PowerPC G5)"
151 depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
152 select PPC_64S_HASH_MMU
156 depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
157 select PPC_64S_HASH_MMU
161 depends on PPC_BOOK3S_64
162 select ARCH_HAS_FAST_MULTIPLIER
163 select PPC_64S_HASH_MMU
164 select PPC_HAS_LBARX_LHARX
168 depends on PPC_BOOK3S_64
169 select ARCH_HAS_FAST_MULTIPLIER
170 select PPC_64S_HASH_MMU
171 select PPC_HAS_LBARX_LHARX
175 depends on PPC_BOOK3S_64
176 select ARCH_HAS_FAST_MULTIPLIER
177 select PPC_HAS_LBARX_LHARX
181 depends on PPC_BOOK3S_64
182 select ARCH_HAS_FAST_MULTIPLIER
183 select PPC_HAVE_PREFIXED_SUPPORT
184 select PPC_HAVE_PCREL_SUPPORT
187 bool "Freescale e5500"
188 depends on PPC64 && PPC_E500
191 bool "Freescale e6500"
192 depends on PPC64 && PPC_E500
193 depends on !CC_IS_CLANG
194 select PPC_HAS_LBARX_LHARX
199 depends on !CC_IS_CLANG
202 bool "440 (44x family)"
206 bool "464 (44x family)"
208 depends on !CC_IS_CLANG
211 bool "476 (47x family)"
213 depends on !CC_IS_CLANG
218 depends on !CC_IS_CLANG
222 depends on PPC_BOOK3S_32
223 depends on !CC_IS_CLANG
227 depends on PPC_BOOK3S_32
228 depends on !CC_IS_CLANG
232 depends on PPC_BOOK3S_32
237 depends on PPC_85xx && !PPC_E500MC
241 depends on PPC_85xx && PPC_E500MC
243 config TOOLCHAIN_DEFAULT_CPU
244 bool "Rely on the toolchain's implicit default CPU"
248 config TARGET_CPU_BOOL
250 default !TOOLCHAIN_DEFAULT_CPU
254 depends on TARGET_CPU_BOOL
255 default "cell" if CELL_CPU
256 default "970" if PPC_970_CPU
257 default "power6" if POWER6_CPU
258 default "power7" if POWER7_CPU
259 default "power8" if POWER8_CPU
260 default "power9" if POWER9_CPU
261 default "power10" if POWER10_CPU
262 default "e5500" if E5500_CPU
263 default "e6500" if E6500_CPU
264 default "power4" if POWERPC64_CPU && !CPU_LITTLE_ENDIAN
265 default "power8" if POWERPC64_CPU && CPU_LITTLE_ENDIAN
266 default "405" if 405_CPU
267 default "440" if 440_CPU
268 default "464" if 464_CPU
269 default "476" if 476_CPU
270 default "860" if 860_CPU
271 default "e300c2" if E300C2_CPU
272 default "e300c3" if E300C3_CPU
273 default "G4" if G4_CPU
274 default "8540" if E500_CPU
275 default "e500mc" if E500MC_CPU
276 default "powerpc" if POWERPC_CPU
280 depends on PPC_BOOK3S_32 || PPC_BOOK3S_64
283 select FSL_EMB_PERFMON
285 select ARCH_SUPPORTS_HUGETLBFS if PHYS_64BIT || PPC64
286 select PPC_SMP_MUXED_IPI
291 bool "e500mc Support"
296 This must be enabled for running on e500mc (and derivatives
297 such as e5500/e6500), and must be disabled for running on
304 bool "Support for Floating Point Unit (FPU)" if PPC_MPC832x
308 This must be enabled to support the Floating Point Unit
309 Most 6xx have an FPU but e300c2 core (mpc832x) don't have
310 an FPU, so when building an embedded kernel for that target
311 you can disable FPU support.
315 config FSL_EMB_PERFMON
316 bool "Freescale Embedded Perfmon"
317 depends on PPC_E500 || PPC_83xx
319 This is the Performance Monitor support found on the e500 core
320 and some e300 cores (c3 and c4). Select this only if your
321 core supports the Embedded Performance Monitor APU
323 config FSL_EMB_PERF_EVENT
325 depends on FSL_EMB_PERFMON && PERF_EVENTS && !PPC_PERF_CTRS
328 config FSL_EMB_PERF_EVENT_E500
330 depends on FSL_EMB_PERF_EVENT && PPC_E500
335 depends on 40x || 44x
340 depends on PPC_E500 || 44x
345 depends on BOOKE || 40x
350 depends on 44x || PPC_E500 || PPC_86xx
351 default y if PHYS_64BIT
354 bool 'Large physical address support' if PPC_E500 || PPC_86xx
355 depends on (44x || PPC_E500 || PPC_86xx) && !PPC_83xx && !PPC_82xx
356 select PHYS_ADDR_T_64BIT
358 This option enables kernel support for larger than 32-bit physical
359 addresses. This feature may not be available on all cores.
361 If you have more than 3.5GB of RAM or so, you also need to enable
362 SWIOTLB under Kernel Options for this to work. The actual number
363 is platform-dependent.
365 If in doubt, say N here.
368 bool "AltiVec Support"
369 depends on PPC_BOOK3S || (PPC_E500MC && PPC64 && !E5500_CPU)
372 This option enables kernel support for the Altivec extensions to the
373 PowerPC processor. The kernel currently supports saving and restoring
374 altivec registers, and turning on the 'altivec enable' bit so user
375 processes can execute altivec instructions.
377 This option is only usefully if you have a processor that supports
378 altivec (G4, otherwise known as 74xx series), but does not have
379 any affect on a non-altivec cpu (it does, however add code to the
382 If in doubt, say Y here.
386 depends on PPC_BOOK3S_64 && ALTIVEC && PPC_FPU
389 This option enables kernel support for the Vector Scaler extensions
390 to the PowerPC processor. The kernel currently supports saving and
391 restoring VSX registers, and turning on the 'VSX enable' bit so user
392 processes can execute VSX instructions.
394 This option is only useful if you have a processor that supports
395 VSX (P7 and above), but does not have any affect on a non-VSX
396 CPUs (it does, however add code to the kernel).
398 If in doubt, say Y here.
402 depends on PPC_E500 && !PPC_E500MC
406 depends on SPE_POSSIBLE
409 This option enables kernel support for the Signal Processing
410 Extensions (SPE) to the PowerPC processor. The kernel currently
411 supports saving and restoring SPE registers, and turning on the
412 'spe enable' bit so user processes can execute SPE instructions.
414 This option is only useful if you have a processor that supports
415 SPE (e500, otherwise known as 85xx series), but does not have any
416 effect on a non-spe cpu (it does, however add code to the kernel).
418 If in doubt, say Y here.
420 config PPC_64S_HASH_MMU
421 bool "Hash MMU Support"
422 depends on PPC_BOOK3S_64
425 Enable support for the Power ISA Hash style MMU. This is implemented
426 by all IBM Power and other 64-bit Book3S CPUs before ISA v3.0. The
427 OpenPOWER ISA does not mandate the hash MMU and some CPUs do not
428 implement it (e.g., Microwatt).
430 Note that POWER9 PowerVM platforms only support the hash
431 MMU. From POWER10 radix is also supported by PowerVM.
433 If you're unsure, say Y.
436 bool "Radix MMU Support"
437 depends on PPC_BOOK3S_64
438 select ARCH_HAS_GIGANTIC_PAGE
441 Enable support for the Power ISA 3.0 Radix style MMU. Currently this
442 is only implemented by IBM Power9 CPUs, if you don't have one of them
443 you can probably disable this.
445 config PPC_RADIX_MMU_DEFAULT
446 bool "Default to using the Radix MMU when possible" if PPC_64S_HASH_MMU
447 depends on PPC_BOOK3S_64
448 depends on PPC_RADIX_MMU
451 When the hardware supports the Radix MMU, default to using it unless
452 "disable_radix[=yes]" is specified on the kernel command line.
454 If this option is disabled, the Hash MMU will be used by default,
455 unless "disable_radix=no" is specified on the kernel command line.
457 If you're unsure, say Y.
459 config PPC_KERNEL_PREFIXED
460 depends on PPC_HAVE_PREFIXED_SUPPORT
461 depends on CC_HAS_PREFIXED
463 bool "Build Kernel with Prefixed Instructions"
465 POWER10 and later CPUs support prefixed instructions, 8 byte
466 instructions that include large immediate, pc relative addressing,
467 and various floating point, vector, MMA.
469 This option builds the kernel with prefixed instructions, and
470 allows a pc relative addressing option to be selected.
472 Kernel support for prefixed instructions in applications and guests
473 is not affected by this option.
475 config PPC_KERNEL_PCREL
476 depends on PPC_HAVE_PCREL_SUPPORT
477 depends on PPC_HAVE_PREFIXED_SUPPORT
478 depends on CC_HAS_PCREL
480 select PPC_KERNEL_PREFIXED
481 bool "Build Kernel with PC-Relative addressing model"
483 POWER10 and later CPUs support pc relative addressing. Recent
484 compilers have support for an ELF ABI extension for a pc relative
487 This option builds the kernel with the pc relative ABI model.
490 bool "Kernel Userspace Execution Prevention" if !40x
493 Enable support for Kernel Userspace Execution Prevention (KUEP)
495 If you're unsure, say Y.
498 bool "Kernel Userspace Access Protection"
501 Enable support for Kernel Userspace Access Protection (KUAP)
503 If you're unsure, say Y.
505 config PPC_KUAP_DEBUG
506 bool "Extra debugging for Kernel Userspace Access Protection"
509 Add extra debugging for Kernel Userspace Access Protection (KUAP)
510 If you're unsure, say N.
514 depends on PPC_BOOK3S_64
515 depends on PPC_MEM_KEYS || PPC_KUAP || PPC_KUEP
518 config PPC_MMU_NOHASH
520 depends on !PPC_BOOK3S
522 config PPC_HAVE_PMU_SUPPORT
525 config PPC_HAVE_PREFIXED_SUPPORT
528 config PPC_HAVE_PCREL_SUPPORT
532 bool "Create PMU SPRs sysfs file"
535 This option enables sysfs file creation for PMU SPRs like MMCR* and PMC*.
539 depends on PERF_EVENTS && PPC_HAVE_PMU_SUPPORT
541 This enables the powerpc-specific perf_event back-end.
544 # Allow platforms to force SMP=y by selecting this
549 depends on PPC_BOOK3S || PPC_E500 || PPC_47x
550 select GENERIC_IRQ_MIGRATION
551 bool "Symmetric multi-processing support" if !FORCE_SMP
553 This enables support for systems with more than one CPU. If you have
554 a system with only one CPU, say N. If you have a system with more
555 than one CPU, say Y. Note that the kernel does not currently
556 support SMP machines with 603/603e/603ev or PPC750 ("G3") processors
557 since they have inadequate hardware support for multiprocessor
560 If you say N here, the kernel will run on single and multiprocessor
561 machines, but will use only one CPU of a multiprocessor machine. If
562 you say Y here, the kernel will run on single-processor machines.
563 On a single-processor machine, the kernel will run faster if you say
566 If you don't know what to do here, say N.
569 int "Maximum number of CPUs (2-8192)" if SMP
572 default "32" if PPC64
575 config NOT_COHERENT_CACHE
577 depends on 4xx || PPC_8xx || PPC_MPC512x || \
578 GAMECUBE_COMMON || AMIGAONE
579 select ARCH_HAS_DMA_PREP_COHERENT
580 select ARCH_HAS_SYNC_DMA_FOR_DEVICE
581 select ARCH_HAS_SYNC_DMA_FOR_CPU
582 select DMA_DIRECT_REMAP
586 config CHECK_CACHE_COHERENCY
596 depends on PPC32 || COMPAT
598 This symbol controls whether we build the 32-bit VDSO. We obviously
599 want to do that if we're building a 32-bit kernel. If we're building
600 a 64-bit kernel then we only want a 32-bit VDSO if we're also enabling
604 prompt "Endianness selection"
605 default CPU_BIG_ENDIAN
607 This option selects whether a big endian or little endian kernel will
610 config CPU_BIG_ENDIAN
611 bool "Build big endian kernel"
613 Build a big endian kernel.
615 If unsure, select this option.
617 config CPU_LITTLE_ENDIAN
618 bool "Build little endian kernel"
619 depends on PPC_BOOK3S_64
620 select PPC64_BOOT_WRAPPER
622 Build a little endian kernel.
624 Note that if cross compiling a little endian kernel,
625 CROSS_COMPILE must point to a toolchain capable of targeting
626 little endian powerpc.
630 config PPC64_ELF_ABI_V1
631 def_bool PPC64 && (CPU_BIG_ENDIAN && !PPC64_BIG_ENDIAN_ELF_ABI_V2)
633 config PPC64_ELF_ABI_V2
634 def_bool PPC64 && !PPC64_ELF_ABI_V1
636 config PPC64_BOOT_WRAPPER
638 depends on CPU_LITTLE_ENDIAN