0001 # SPDX-License-Identifier: GPL-2.0
0002 config PPC32
0003 bool
0004 default y if !PPC64
0005
0006 config PPC64
0007 bool "64-bit kernel"
0008 select ZLIB_DEFLATE
0009 help
0010 This option selects whether a 32-bit or a 64-bit kernel
0011 will be built.
0012
0013 menu "Processor support"
0014 choice
0015 prompt "Processor Type"
0016 depends on PPC32
0017 help
0018 There are five families of 32 bit PowerPC chips supported.
0019 The most common ones are the desktop and server CPUs (603,
0020 604, 740, 750, 74xx) CPUs from Freescale and IBM, with their
0021 embedded 512x/52xx/82xx/83xx/86xx counterparts.
0022 The other embedded parts, namely 4xx, 8xx and e500
0023 (85xx) each form a family of their own that is not compatible
0024 with the others.
0025
0026 If unsure, select 52xx/6xx/7xx/74xx/82xx/83xx/86xx.
0027
0028 config PPC_BOOK3S_32
0029 bool "512x/52xx/6xx/7xx/74xx/82xx/83xx/86xx"
0030 imply PPC_FPU
0031 select PPC_HAVE_PMU_SUPPORT
0032 select HAVE_ARCH_VMAP_STACK
0033
0034 config PPC_85xx
0035 bool "Freescale 85xx"
0036 select E500
0037
0038 config PPC_8xx
0039 bool "Freescale 8xx"
0040 select ARCH_SUPPORTS_HUGETLBFS
0041 select FSL_SOC
0042 select PPC_KUEP
0043 select HAVE_ARCH_VMAP_STACK
0044 select HUGETLBFS
0045
0046 config 40x
0047 bool "AMCC 40x"
0048 select PPC_DCR_NATIVE
0049 select PPC_UDBG_16550
0050 select 4xx_SOC
0051 select HAVE_PCI
0052 select PPC_KUEP if PPC_KUAP
0053
0054 config 44x
0055 bool "AMCC 44x, 46x or 47x"
0056 select PPC_DCR_NATIVE
0057 select PPC_UDBG_16550
0058 select 4xx_SOC
0059 select HAVE_PCI
0060 select PHYS_64BIT
0061 select PPC_KUEP
0062
0063 endchoice
0064
0065 config PPC_BOOK3S_603
0066 bool "Support for 603 SW loaded TLB"
0067 depends on PPC_BOOK3S_32
0068 default y
0069 help
0070 Provide support for processors based on the 603 cores. Those
0071 processors don't have a HASH MMU and provide SW TLB loading.
0072
0073 config PPC_BOOK3S_604
0074 bool "Support for 604+ HASH MMU" if PPC_BOOK3S_603
0075 depends on PPC_BOOK3S_32
0076 default y
0077 help
0078 Provide support for processors not based on the 603 cores.
0079 Those processors have a HASH MMU.
0080
0081 choice
0082 prompt "Processor Type"
0083 depends on PPC64
0084 help
0085 There are two families of 64 bit PowerPC chips supported.
0086 The most common ones are the desktop and server CPUs
0087 (POWER5, 970, POWER5+, POWER6, POWER7, POWER8, POWER9 ...)
0088
0089 The other are the "embedded" processors compliant with the
0090 "Book 3E" variant of the architecture
0091
0092 config PPC_BOOK3S_64
0093 bool "Server processors"
0094 select PPC_FPU
0095 select PPC_HAVE_PMU_SUPPORT
0096 select HAVE_ARCH_TRANSPARENT_HUGEPAGE
0097 select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION
0098 select ARCH_ENABLE_SPLIT_PMD_PTLOCK
0099 select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
0100 select ARCH_SUPPORTS_HUGETLBFS
0101 select ARCH_SUPPORTS_NUMA_BALANCING
0102 select HAVE_MOVE_PMD
0103 select HAVE_MOVE_PUD
0104 select IRQ_WORK
0105 select PPC_64S_HASH_MMU if !PPC_RADIX_MMU
0106 select KASAN_VMALLOC if KASAN
0107
0108 config PPC_BOOK3E_64
0109 bool "Embedded processors"
0110 select PPC_FSL_BOOK3E
0111 select PPC_FPU # Make it a choice ?
0112 select PPC_SMP_MUXED_IPI
0113 select PPC_DOORBELL
0114 select ZONE_DMA
0115
0116 endchoice
0117
0118 choice
0119 prompt "CPU selection"
0120 default GENERIC_CPU
0121 help
0122 This will create a kernel which is optimised for a particular CPU.
0123 The resulting kernel may not run on other CPUs, so use this with care.
0124
0125 If unsure, select Generic.
0126
0127 config GENERIC_CPU
0128 bool "Generic (POWER4 and above)"
0129 depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
0130 select PPC_64S_HASH_MMU
0131
0132 config GENERIC_CPU
0133 bool "Generic (POWER8 and above)"
0134 depends on PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN
0135 select ARCH_HAS_FAST_MULTIPLIER
0136 select PPC_64S_HASH_MMU
0137
0138 config POWERPC_CPU
0139 bool "Generic 32 bits powerpc"
0140 depends on PPC_BOOK3S_32
0141
0142 config CELL_CPU
0143 bool "Cell Broadband Engine"
0144 depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
0145 select PPC_64S_HASH_MMU
0146
0147 config POWER5_CPU
0148 bool "POWER5"
0149 depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
0150 select PPC_64S_HASH_MMU
0151
0152 config POWER6_CPU
0153 bool "POWER6"
0154 depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
0155 select PPC_64S_HASH_MMU
0156
0157 config POWER7_CPU
0158 bool "POWER7"
0159 depends on PPC_BOOK3S_64
0160 select ARCH_HAS_FAST_MULTIPLIER
0161 select PPC_64S_HASH_MMU
0162
0163 config POWER8_CPU
0164 bool "POWER8"
0165 depends on PPC_BOOK3S_64
0166 select ARCH_HAS_FAST_MULTIPLIER
0167 select PPC_64S_HASH_MMU
0168
0169 config POWER9_CPU
0170 bool "POWER9"
0171 depends on PPC_BOOK3S_64
0172 select ARCH_HAS_FAST_MULTIPLIER
0173
0174 config E5500_CPU
0175 bool "Freescale e5500"
0176 depends on PPC64 && E500
0177
0178 config E6500_CPU
0179 bool "Freescale e6500"
0180 depends on PPC64 && E500
0181
0182 config 405_CPU
0183 bool "40x family"
0184 depends on 40x
0185
0186 config 440_CPU
0187 bool "440 (44x family)"
0188 depends on 44x
0189
0190 config 464_CPU
0191 bool "464 (44x family)"
0192 depends on 44x
0193
0194 config 476_CPU
0195 bool "476 (47x family)"
0196 depends on PPC_47x
0197
0198 config 860_CPU
0199 bool "8xx family"
0200 depends on PPC_8xx
0201
0202 config E300C2_CPU
0203 bool "e300c2 (832x)"
0204 depends on PPC_BOOK3S_32
0205
0206 config E300C3_CPU
0207 bool "e300c3 (831x)"
0208 depends on PPC_BOOK3S_32
0209
0210 config G4_CPU
0211 bool "G4 (74xx)"
0212 depends on PPC_BOOK3S_32
0213 select ALTIVEC
0214
0215 config E500_CPU
0216 bool "e500 (8540)"
0217 depends on PPC_85xx && !PPC_E500MC
0218
0219 config E500MC_CPU
0220 bool "e500mc"
0221 depends on PPC_85xx && PPC_E500MC
0222
0223 config TOOLCHAIN_DEFAULT_CPU
0224 bool "Rely on the toolchain's implicit default CPU"
0225 depends on PPC32
0226
0227 endchoice
0228
0229 config TARGET_CPU_BOOL
0230 bool
0231 default !GENERIC_CPU && !TOOLCHAIN_DEFAULT_CPU
0232
0233 config TARGET_CPU
0234 string
0235 depends on TARGET_CPU_BOOL
0236 default "cell" if CELL_CPU
0237 default "power5" if POWER5_CPU
0238 default "power6" if POWER6_CPU
0239 default "power7" if POWER7_CPU
0240 default "power8" if POWER8_CPU
0241 default "power9" if POWER9_CPU
0242 default "405" if 405_CPU
0243 default "440" if 440_CPU
0244 default "464" if 464_CPU
0245 default "476" if 476_CPU
0246 default "860" if 860_CPU
0247 default "e300c2" if E300C2_CPU
0248 default "e300c3" if E300C3_CPU
0249 default "G4" if G4_CPU
0250 default "8540" if E500_CPU
0251 default "e500mc" if E500MC_CPU
0252 default "powerpc" if POWERPC_CPU
0253
0254 config PPC_BOOK3S
0255 def_bool y
0256 depends on PPC_BOOK3S_32 || PPC_BOOK3S_64
0257
0258 config PPC_BOOK3E
0259 def_bool y
0260 depends on PPC_BOOK3E_64
0261
0262 config E500
0263 select FSL_EMB_PERFMON
0264 select PPC_FSL_BOOK3E
0265 bool
0266
0267 config PPC_E500MC
0268 bool "e500mc Support"
0269 select PPC_FPU
0270 select COMMON_CLK
0271 depends on E500
0272 help
0273 This must be enabled for running on e500mc (and derivatives
0274 such as e5500/e6500), and must be disabled for running on
0275 e500v1 or e500v2.
0276
0277 config PPC_FPU_REGS
0278 bool
0279
0280 config PPC_FPU
0281 bool "Support for Floating Point Unit (FPU)" if PPC_MPC832x
0282 default y if PPC64
0283 select PPC_FPU_REGS
0284 help
0285 This must be enabled to support the Floating Point Unit
0286 Most 6xx have an FPU but e300c2 core (mpc832x) don't have
0287 an FPU, so when building an embedded kernel for that target
0288 you can disable FPU support.
0289
0290 If unsure say Y.
0291
0292 config FSL_EMB_PERFMON
0293 bool "Freescale Embedded Perfmon"
0294 depends on E500 || PPC_83xx
0295 help
0296 This is the Performance Monitor support found on the e500 core
0297 and some e300 cores (c3 and c4). Select this only if your
0298 core supports the Embedded Performance Monitor APU
0299
0300 config FSL_EMB_PERF_EVENT
0301 bool
0302 depends on FSL_EMB_PERFMON && PERF_EVENTS && !PPC_PERF_CTRS
0303 default y
0304
0305 config FSL_EMB_PERF_EVENT_E500
0306 bool
0307 depends on FSL_EMB_PERF_EVENT && E500
0308 default y
0309
0310 config 4xx
0311 bool
0312 depends on 40x || 44x
0313 default y
0314
0315 config BOOKE
0316 bool
0317 depends on E500 || 44x || PPC_BOOK3E
0318 default y
0319
0320 config BOOKE_OR_40x
0321 bool
0322 depends on BOOKE || 40x
0323 default y
0324
0325 config FSL_BOOKE
0326 bool
0327 depends on E500 && PPC32
0328 default y
0329
0330 # this is for common code between PPC32 & PPC64 FSL BOOKE
0331 config PPC_FSL_BOOK3E
0332 bool
0333 select ARCH_SUPPORTS_HUGETLBFS if PHYS_64BIT || PPC64
0334 imply FSL_EMB_PERFMON
0335 select PPC_SMP_MUXED_IPI
0336 select PPC_DOORBELL
0337 select PPC_KUEP
0338 default y if FSL_BOOKE
0339
0340 config PTE_64BIT
0341 bool
0342 depends on 44x || E500 || PPC_86xx
0343 default y if PHYS_64BIT
0344
0345 config PHYS_64BIT
0346 bool 'Large physical address support' if E500 || PPC_86xx
0347 depends on (44x || E500 || PPC_86xx) && !PPC_83xx && !PPC_82xx
0348 select PHYS_ADDR_T_64BIT
0349 help
0350 This option enables kernel support for larger than 32-bit physical
0351 addresses. This feature may not be available on all cores.
0352
0353 If you have more than 3.5GB of RAM or so, you also need to enable
0354 SWIOTLB under Kernel Options for this to work. The actual number
0355 is platform-dependent.
0356
0357 If in doubt, say N here.
0358
0359 config ALTIVEC
0360 bool "AltiVec Support"
0361 depends on PPC_BOOK3S || (PPC_E500MC && PPC64 && !E5500_CPU)
0362 select PPC_FPU
0363 help
0364 This option enables kernel support for the Altivec extensions to the
0365 PowerPC processor. The kernel currently supports saving and restoring
0366 altivec registers, and turning on the 'altivec enable' bit so user
0367 processes can execute altivec instructions.
0368
0369 This option is only usefully if you have a processor that supports
0370 altivec (G4, otherwise known as 74xx series), but does not have
0371 any affect on a non-altivec cpu (it does, however add code to the
0372 kernel).
0373
0374 If in doubt, say Y here.
0375
0376 config VSX
0377 bool "VSX Support"
0378 depends on PPC_BOOK3S_64 && ALTIVEC && PPC_FPU
0379 help
0380
0381 This option enables kernel support for the Vector Scaler extensions
0382 to the PowerPC processor. The kernel currently supports saving and
0383 restoring VSX registers, and turning on the 'VSX enable' bit so user
0384 processes can execute VSX instructions.
0385
0386 This option is only useful if you have a processor that supports
0387 VSX (P7 and above), but does not have any affect on a non-VSX
0388 CPUs (it does, however add code to the kernel).
0389
0390 If in doubt, say Y here.
0391
0392 config SPE_POSSIBLE
0393 def_bool y
0394 depends on E500 && !PPC_E500MC
0395
0396 config SPE
0397 bool "SPE Support"
0398 depends on SPE_POSSIBLE
0399 default y
0400 help
0401 This option enables kernel support for the Signal Processing
0402 Extensions (SPE) to the PowerPC processor. The kernel currently
0403 supports saving and restoring SPE registers, and turning on the
0404 'spe enable' bit so user processes can execute SPE instructions.
0405
0406 This option is only useful if you have a processor that supports
0407 SPE (e500, otherwise known as 85xx series), but does not have any
0408 effect on a non-spe cpu (it does, however add code to the kernel).
0409
0410 If in doubt, say Y here.
0411
0412 config PPC_64S_HASH_MMU
0413 bool "Hash MMU Support"
0414 depends on PPC_BOOK3S_64
0415 default y
0416 help
0417 Enable support for the Power ISA Hash style MMU. This is implemented
0418 by all IBM Power and other 64-bit Book3S CPUs before ISA v3.0. The
0419 OpenPOWER ISA does not mandate the hash MMU and some CPUs do not
0420 implement it (e.g., Microwatt).
0421
0422 Note that POWER9 PowerVM platforms only support the hash
0423 MMU. From POWER10 radix is also supported by PowerVM.
0424
0425 If you're unsure, say Y.
0426
0427 config PPC_RADIX_MMU
0428 bool "Radix MMU Support"
0429 depends on PPC_BOOK3S_64
0430 select ARCH_HAS_GIGANTIC_PAGE
0431 default y
0432 help
0433 Enable support for the Power ISA 3.0 Radix style MMU. Currently this
0434 is only implemented by IBM Power9 CPUs, if you don't have one of them
0435 you can probably disable this.
0436
0437 config PPC_RADIX_MMU_DEFAULT
0438 bool "Default to using the Radix MMU when possible" if PPC_64S_HASH_MMU
0439 depends on PPC_BOOK3S_64
0440 depends on PPC_RADIX_MMU
0441 default y
0442 help
0443 When the hardware supports the Radix MMU, default to using it unless
0444 "disable_radix[=yes]" is specified on the kernel command line.
0445
0446 If this option is disabled, the Hash MMU will be used by default,
0447 unless "disable_radix=no" is specified on the kernel command line.
0448
0449 If you're unsure, say Y.
0450
0451 config PPC_KUEP
0452 bool "Kernel Userspace Execution Prevention" if !40x
0453 default y if !40x
0454 help
0455 Enable support for Kernel Userspace Execution Prevention (KUEP)
0456
0457 If you're unsure, say Y.
0458
0459 config PPC_KUAP
0460 bool "Kernel Userspace Access Protection"
0461 default y
0462 help
0463 Enable support for Kernel Userspace Access Protection (KUAP)
0464
0465 If you're unsure, say Y.
0466
0467 config PPC_KUAP_DEBUG
0468 bool "Extra debugging for Kernel Userspace Access Protection"
0469 depends on PPC_KUAP
0470 help
0471 Add extra debugging for Kernel Userspace Access Protection (KUAP)
0472 If you're unsure, say N.
0473
0474 config PPC_PKEY
0475 def_bool y
0476 depends on PPC_BOOK3S_64
0477 depends on PPC_MEM_KEYS || PPC_KUAP || PPC_KUEP
0478
0479
0480 config PPC_MMU_NOHASH
0481 def_bool y
0482 depends on !PPC_BOOK3S
0483
0484 config PPC_BOOK3E_MMU
0485 def_bool y
0486 depends on FSL_BOOKE || PPC_BOOK3E
0487
0488 config PPC_HAVE_PMU_SUPPORT
0489 bool
0490
0491 config PMU_SYSFS
0492 bool "Create PMU SPRs sysfs file"
0493 default n
0494 help
0495 This option enables sysfs file creation for PMU SPRs like MMCR* and PMC*.
0496
0497 config PPC_PERF_CTRS
0498 def_bool y
0499 depends on PERF_EVENTS && PPC_HAVE_PMU_SUPPORT
0500 help
0501 This enables the powerpc-specific perf_event back-end.
0502
0503 config FORCE_SMP
0504 # Allow platforms to force SMP=y by selecting this
0505 bool
0506 select SMP
0507
0508 config SMP
0509 depends on PPC_BOOK3S || PPC_BOOK3E || FSL_BOOKE || PPC_47x
0510 select GENERIC_IRQ_MIGRATION
0511 bool "Symmetric multi-processing support" if !FORCE_SMP
0512 help
0513 This enables support for systems with more than one CPU. If you have
0514 a system with only one CPU, say N. If you have a system with more
0515 than one CPU, say Y. Note that the kernel does not currently
0516 support SMP machines with 603/603e/603ev or PPC750 ("G3") processors
0517 since they have inadequate hardware support for multiprocessor
0518 operation.
0519
0520 If you say N here, the kernel will run on single and multiprocessor
0521 machines, but will use only one CPU of a multiprocessor machine. If
0522 you say Y here, the kernel will run on single-processor machines.
0523 On a single-processor machine, the kernel will run faster if you say
0524 N here.
0525
0526 If you don't know what to do here, say N.
0527
0528 config NR_CPUS
0529 int "Maximum number of CPUs (2-8192)" if SMP
0530 range 2 8192 if SMP
0531 default "1" if !SMP
0532 default "32" if PPC64
0533 default "4"
0534
0535 config NOT_COHERENT_CACHE
0536 bool
0537 depends on 4xx || PPC_8xx || PPC_MPC512x || \
0538 GAMECUBE_COMMON || AMIGAONE
0539 select ARCH_HAS_DMA_PREP_COHERENT
0540 select ARCH_HAS_SYNC_DMA_FOR_DEVICE
0541 select ARCH_HAS_SYNC_DMA_FOR_CPU
0542 select DMA_DIRECT_REMAP
0543 default n if PPC_47x
0544 default y
0545
0546 config CHECK_CACHE_COHERENCY
0547 bool
0548
0549 config PPC_DOORBELL
0550 bool
0551
0552 endmenu
0553
0554 config VDSO32
0555 def_bool y
0556 depends on PPC32 || COMPAT
0557 help
0558 This symbol controls whether we build the 32-bit VDSO. We obviously
0559 want to do that if we're building a 32-bit kernel. If we're building
0560 a 64-bit kernel then we only want a 32-bit VDSO if we're also enabling
0561 COMPAT.
0562
0563 choice
0564 prompt "Endianness selection"
0565 default CPU_BIG_ENDIAN
0566 help
0567 This option selects whether a big endian or little endian kernel will
0568 be built.
0569
0570 config CPU_BIG_ENDIAN
0571 bool "Build big endian kernel"
0572 help
0573 Build a big endian kernel.
0574
0575 If unsure, select this option.
0576
0577 config CPU_LITTLE_ENDIAN
0578 bool "Build little endian kernel"
0579 depends on PPC_BOOK3S_64
0580 select PPC64_BOOT_WRAPPER
0581 help
0582 Build a little endian kernel.
0583
0584 Note that if cross compiling a little endian kernel,
0585 CROSS_COMPILE must point to a toolchain capable of targeting
0586 little endian powerpc.
0587
0588 endchoice
0589
0590 config PPC64_ELF_ABI_V1
0591 def_bool PPC64 && CPU_BIG_ENDIAN
0592
0593 config PPC64_ELF_ABI_V2
0594 def_bool PPC64 && CPU_LITTLE_ENDIAN
0595
0596 config PPC64_BOOT_WRAPPER
0597 def_bool n
0598 depends on CPU_LITTLE_ENDIAN