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 HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
98 select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION
99 select ARCH_ENABLE_SPLIT_PMD_PTLOCK
100 select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
101 select ARCH_SUPPORTS_HUGETLBFS
102 select ARCH_SUPPORTS_NUMA_BALANCING
106 select PPC_64S_HASH_MMU if !PPC_RADIX_MMU
107 select KASAN_VMALLOC if KASAN
110 bool "Embedded processors"
113 select PPC_FPU # Make it a choice ?
114 select PPC_SMP_MUXED_IPI
121 prompt "CPU selection"
123 This will create a kernel which is optimised for a particular CPU.
124 The resulting kernel may not run on other CPUs, so use this with care.
126 If unsure, select Generic.
129 bool "Generic (POWER5 and PowerPC 970 and above)"
130 depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
131 select PPC_64S_HASH_MMU
134 bool "Generic (POWER8 and above)"
135 depends on PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN
136 select ARCH_HAS_FAST_MULTIPLIER
137 select PPC_64S_HASH_MMU
138 select PPC_HAS_LBARX_LHARX
141 bool "Generic 32 bits powerpc"
142 depends on PPC_BOOK3S_32
145 bool "Cell Broadband Engine"
146 depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
147 depends on !CC_IS_CLANG
148 select PPC_64S_HASH_MMU
151 bool "PowerPC 970 (including PowerPC G5)"
152 depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
153 select PPC_64S_HASH_MMU
157 depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
158 select PPC_64S_HASH_MMU
162 depends on PPC_BOOK3S_64
163 select ARCH_HAS_FAST_MULTIPLIER
164 select PPC_64S_HASH_MMU
165 select PPC_HAS_LBARX_LHARX
169 depends on PPC_BOOK3S_64
170 select ARCH_HAS_FAST_MULTIPLIER
171 select PPC_64S_HASH_MMU
172 select PPC_HAS_LBARX_LHARX
176 depends on PPC_BOOK3S_64
177 select ARCH_HAS_FAST_MULTIPLIER
178 select PPC_HAS_LBARX_LHARX
182 depends on PPC_BOOK3S_64
183 select ARCH_HAS_FAST_MULTIPLIER
184 select PPC_HAVE_PREFIXED_SUPPORT
185 select PPC_HAVE_PCREL_SUPPORT
188 bool "Freescale e5500"
189 depends on PPC64 && PPC_E500
192 bool "Freescale e6500"
193 depends on PPC64 && PPC_E500
194 depends on !CC_IS_CLANG
195 select PPC_HAS_LBARX_LHARX
200 depends on !CC_IS_CLANG
203 bool "440 (44x family)"
207 bool "464 (44x family)"
209 depends on !CC_IS_CLANG
212 bool "476 (47x family)"
214 depends on !CC_IS_CLANG
219 depends on !CC_IS_CLANG
223 depends on PPC_BOOK3S_32
224 depends on !CC_IS_CLANG
228 depends on PPC_BOOK3S_32
229 depends on !CC_IS_CLANG
233 depends on PPC_BOOK3S_32
238 depends on PPC_85xx && !PPC_E500MC
242 depends on PPC_85xx && PPC_E500MC
244 config TOOLCHAIN_DEFAULT_CPU
245 bool "Rely on the toolchain's implicit default CPU"
249 config TARGET_CPU_BOOL
251 default !TOOLCHAIN_DEFAULT_CPU
255 depends on TARGET_CPU_BOOL
256 default "cell" if CELL_CPU
257 default "970" if PPC_970_CPU
258 default "power6" if POWER6_CPU
259 default "power7" if POWER7_CPU
260 default "power8" if POWER8_CPU
261 default "power9" if POWER9_CPU
262 default "power10" if POWER10_CPU
263 default "e5500" if E5500_CPU
264 default "e6500" if E6500_CPU
265 default "power4" if POWERPC64_CPU && !CPU_LITTLE_ENDIAN
266 default "power8" if POWERPC64_CPU && CPU_LITTLE_ENDIAN
267 default "405" if 405_CPU
268 default "440" if 440_CPU
269 default "464" if 464_CPU
270 default "476" if 476_CPU
271 default "860" if 860_CPU
272 default "e300c2" if E300C2_CPU
273 default "e300c3" if E300C3_CPU
274 default "G4" if G4_CPU
275 default "8540" if E500_CPU
276 default "e500mc" if E500MC_CPU
277 default "powerpc" if POWERPC_CPU
281 depends on PPC_BOOK3S_32 || PPC_BOOK3S_64
284 select FSL_EMB_PERFMON
286 select ARCH_SUPPORTS_HUGETLBFS if PHYS_64BIT || PPC64
287 select PPC_SMP_MUXED_IPI
292 bool "e500mc Support"
297 This must be enabled for running on e500mc (and derivatives
298 such as e5500/e6500), and must be disabled for running on
305 bool "Support for Floating Point Unit (FPU)" if PPC_MPC832x
309 This must be enabled to support the Floating Point Unit
310 Most 6xx have an FPU but e300c2 core (mpc832x) don't have
311 an FPU, so when building an embedded kernel for that target
312 you can disable FPU support.
316 config FSL_EMB_PERFMON
317 bool "Freescale Embedded Perfmon"
318 depends on PPC_E500 || PPC_83xx
320 This is the Performance Monitor support found on the e500 core
321 and some e300 cores (c3 and c4). Select this only if your
322 core supports the Embedded Performance Monitor APU
324 config FSL_EMB_PERF_EVENT
326 depends on FSL_EMB_PERFMON && PERF_EVENTS && !PPC_PERF_CTRS
329 config FSL_EMB_PERF_EVENT_E500
331 depends on FSL_EMB_PERF_EVENT && PPC_E500
336 depends on 40x || 44x
341 depends on PPC_E500 || 44x
346 depends on BOOKE || 40x
351 depends on 44x || PPC_E500 || PPC_86xx
352 default y if PHYS_64BIT
355 bool 'Large physical address support' if PPC_E500 || PPC_86xx
356 depends on (44x || PPC_E500 || PPC_86xx) && !PPC_83xx && !PPC_82xx
357 select PHYS_ADDR_T_64BIT
359 This option enables kernel support for larger than 32-bit physical
360 addresses. This feature may not be available on all cores.
362 If you have more than 3.5GB of RAM or so, you also need to enable
363 SWIOTLB under Kernel Options for this to work. The actual number
364 is platform-dependent.
366 If in doubt, say N here.
369 bool "AltiVec Support"
370 depends on PPC_BOOK3S || (PPC_E500MC && PPC64 && !E5500_CPU)
373 This option enables kernel support for the Altivec extensions to the
374 PowerPC processor. The kernel currently supports saving and restoring
375 altivec registers, and turning on the 'altivec enable' bit so user
376 processes can execute altivec instructions.
378 This option is only usefully if you have a processor that supports
379 altivec (G4, otherwise known as 74xx series), but does not have
380 any affect on a non-altivec cpu (it does, however add code to the
383 If in doubt, say Y here.
387 depends on PPC_BOOK3S_64 && ALTIVEC && PPC_FPU
390 This option enables kernel support for the Vector Scaler extensions
391 to the PowerPC processor. The kernel currently supports saving and
392 restoring VSX registers, and turning on the 'VSX enable' bit so user
393 processes can execute VSX instructions.
395 This option is only useful if you have a processor that supports
396 VSX (P7 and above), but does not have any affect on a non-VSX
397 CPUs (it does, however add code to the kernel).
399 If in doubt, say Y here.
403 depends on PPC_E500 && !PPC_E500MC
407 depends on SPE_POSSIBLE
410 This option enables kernel support for the Signal Processing
411 Extensions (SPE) to the PowerPC processor. The kernel currently
412 supports saving and restoring SPE registers, and turning on the
413 'spe enable' bit so user processes can execute SPE instructions.
415 This option is only useful if you have a processor that supports
416 SPE (e500, otherwise known as 85xx series), but does not have any
417 effect on a non-spe cpu (it does, however add code to the kernel).
419 If in doubt, say Y here.
421 config PPC_64S_HASH_MMU
422 bool "Hash MMU Support"
423 depends on PPC_BOOK3S_64
426 Enable support for the Power ISA Hash style MMU. This is implemented
427 by all IBM Power and other 64-bit Book3S CPUs before ISA v3.0. The
428 OpenPOWER ISA does not mandate the hash MMU and some CPUs do not
429 implement it (e.g., Microwatt).
431 Note that POWER9 PowerVM platforms only support the hash
432 MMU. From POWER10 radix is also supported by PowerVM.
434 If you're unsure, say Y.
437 bool "Radix MMU Support"
438 depends on PPC_BOOK3S_64
439 select ARCH_HAS_GIGANTIC_PAGE
442 Enable support for the Power ISA 3.0 Radix style MMU. Currently this
443 is only implemented by IBM Power9 CPUs, if you don't have one of them
444 you can probably disable this.
446 config PPC_RADIX_MMU_DEFAULT
447 bool "Default to using the Radix MMU when possible" if PPC_64S_HASH_MMU
448 depends on PPC_BOOK3S_64
449 depends on PPC_RADIX_MMU
452 When the hardware supports the Radix MMU, default to using it unless
453 "disable_radix[=yes]" is specified on the kernel command line.
455 If this option is disabled, the Hash MMU will be used by default,
456 unless "disable_radix=no" is specified on the kernel command line.
458 If you're unsure, say Y.
460 config PPC_KERNEL_PREFIXED
461 depends on PPC_HAVE_PREFIXED_SUPPORT
462 depends on CC_HAS_PREFIXED
464 bool "Build Kernel with Prefixed Instructions"
466 POWER10 and later CPUs support prefixed instructions, 8 byte
467 instructions that include large immediate, pc relative addressing,
468 and various floating point, vector, MMA.
470 This option builds the kernel with prefixed instructions, and
471 allows a pc relative addressing option to be selected.
473 Kernel support for prefixed instructions in applications and guests
474 is not affected by this option.
476 config PPC_KERNEL_PCREL
477 depends on PPC_HAVE_PCREL_SUPPORT
478 depends on PPC_HAVE_PREFIXED_SUPPORT
479 depends on CC_HAS_PCREL
481 select PPC_KERNEL_PREFIXED
482 bool "Build Kernel with PC-Relative addressing model"
484 POWER10 and later CPUs support pc relative addressing. Recent
485 compilers have support for an ELF ABI extension for a pc relative
488 This option builds the kernel with the pc relative ABI model.
491 bool "Kernel Userspace Execution Prevention" if !40x
494 Enable support for Kernel Userspace Execution Prevention (KUEP)
496 If you're unsure, say Y.
499 bool "Kernel Userspace Access Protection"
502 Enable support for Kernel Userspace Access Protection (KUAP)
504 If you're unsure, say Y.
506 config PPC_KUAP_DEBUG
507 bool "Extra debugging for Kernel Userspace Access Protection"
510 Add extra debugging for Kernel Userspace Access Protection (KUAP)
511 If you're unsure, say N.
515 depends on PPC_BOOK3S_64
516 depends on PPC_MEM_KEYS || PPC_KUAP || PPC_KUEP
519 config PPC_MMU_NOHASH
521 depends on !PPC_BOOK3S
523 config PPC_HAVE_PMU_SUPPORT
526 config PPC_HAVE_PREFIXED_SUPPORT
529 config PPC_HAVE_PCREL_SUPPORT
533 bool "Create PMU SPRs sysfs file"
536 This option enables sysfs file creation for PMU SPRs like MMCR* and PMC*.
540 depends on PERF_EVENTS && PPC_HAVE_PMU_SUPPORT
542 This enables the powerpc-specific perf_event back-end.
545 # Allow platforms to force SMP=y by selecting this
550 depends on PPC_BOOK3S || PPC_E500 || PPC_47x
551 select GENERIC_IRQ_MIGRATION
552 bool "Symmetric multi-processing support" if !FORCE_SMP
554 This enables support for systems with more than one CPU. If you have
555 a system with only one CPU, say N. If you have a system with more
556 than one CPU, say Y. Note that the kernel does not currently
557 support SMP machines with 603/603e/603ev or PPC750 ("G3") processors
558 since they have inadequate hardware support for multiprocessor
561 If you say N here, the kernel will run on single and multiprocessor
562 machines, but will use only one CPU of a multiprocessor machine. If
563 you say Y here, the kernel will run on single-processor machines.
564 On a single-processor machine, the kernel will run faster if you say
567 If you don't know what to do here, say N.
570 int "Maximum number of CPUs (2-8192)" if SMP
573 default "32" if PPC64
576 config NOT_COHERENT_CACHE
578 depends on 4xx || PPC_8xx || PPC_MPC512x || \
579 GAMECUBE_COMMON || AMIGAONE
580 select ARCH_HAS_DMA_PREP_COHERENT
581 select ARCH_HAS_SYNC_DMA_FOR_DEVICE
582 select ARCH_HAS_SYNC_DMA_FOR_CPU
583 select DMA_DIRECT_REMAP
587 config CHECK_CACHE_COHERENCY
597 depends on PPC32 || COMPAT
599 This symbol controls whether we build the 32-bit VDSO. We obviously
600 want to do that if we're building a 32-bit kernel. If we're building
601 a 64-bit kernel then we only want a 32-bit VDSO if we're also enabling
605 prompt "Endianness selection"
606 default CPU_BIG_ENDIAN
608 This option selects whether a big endian or little endian kernel will
611 config CPU_BIG_ENDIAN
612 bool "Build big endian kernel"
614 Build a big endian kernel.
616 If unsure, select this option.
618 config CPU_LITTLE_ENDIAN
619 bool "Build little endian kernel"
620 depends on PPC_BOOK3S_64
621 select PPC64_BOOT_WRAPPER
623 Build a little endian kernel.
625 Note that if cross compiling a little endian kernel,
626 CROSS_COMPILE must point to a toolchain capable of targeting
627 little endian powerpc.
631 config PPC64_ELF_ABI_V1
632 def_bool PPC64 && (CPU_BIG_ENDIAN && !PPC64_BIG_ENDIAN_ELF_ABI_V2)
634 config PPC64_ELF_ABI_V2
635 def_bool PPC64 && !PPC64_ELF_ABI_V1
637 config PPC64_BOOT_WRAPPER
639 depends on CPU_LITTLE_ENDIAN