Kconfig.cputype (14094B)
1# SPDX-License-Identifier: GPL-2.0 2config PPC32 3 bool 4 default y if !PPC64 5 select KASAN_VMALLOC if KASAN && MODULES 6 7config PPC64 8 bool "64-bit kernel" 9 select ZLIB_DEFLATE 10 help 11 This option selects whether a 32-bit or a 64-bit kernel 12 will be built. 13 14menu "Processor support" 15choice 16 prompt "Processor Type" 17 depends on PPC32 18 help 19 There are five families of 32 bit PowerPC chips supported. 20 The most common ones are the desktop and server CPUs (603, 21 604, 740, 750, 74xx) CPUs from Freescale and IBM, with their 22 embedded 512x/52xx/82xx/83xx/86xx counterparts. 23 The other embedded parts, namely 4xx, 8xx and e500 24 (85xx) each form a family of their own that is not compatible 25 with the others. 26 27 If unsure, select 52xx/6xx/7xx/74xx/82xx/83xx/86xx. 28 29config PPC_BOOK3S_32 30 bool "512x/52xx/6xx/7xx/74xx/82xx/83xx/86xx" 31 imply PPC_FPU 32 select PPC_HAVE_PMU_SUPPORT 33 select HAVE_ARCH_VMAP_STACK 34 35config PPC_85xx 36 bool "Freescale 85xx" 37 select E500 38 39config PPC_8xx 40 bool "Freescale 8xx" 41 select ARCH_SUPPORTS_HUGETLBFS 42 select FSL_SOC 43 select PPC_KUEP 44 select HAVE_ARCH_VMAP_STACK 45 select HUGETLBFS 46 47config 40x 48 bool "AMCC 40x" 49 select PPC_DCR_NATIVE 50 select PPC_UDBG_16550 51 select 4xx_SOC 52 select HAVE_PCI 53 select PPC_KUEP if PPC_KUAP 54 55config 44x 56 bool "AMCC 44x, 46x or 47x" 57 select PPC_DCR_NATIVE 58 select PPC_UDBG_16550 59 select 4xx_SOC 60 select HAVE_PCI 61 select PHYS_64BIT 62 select PPC_KUEP 63 64endchoice 65 66config PPC_BOOK3S_603 67 bool "Support for 603 SW loaded TLB" 68 depends on PPC_BOOK3S_32 69 default y 70 help 71 Provide support for processors based on the 603 cores. Those 72 processors don't have a HASH MMU and provide SW TLB loading. 73 74config PPC_BOOK3S_604 75 bool "Support for 604+ HASH MMU" if PPC_BOOK3S_603 76 depends on PPC_BOOK3S_32 77 default y 78 help 79 Provide support for processors not based on the 603 cores. 80 Those processors have a HASH MMU. 81 82choice 83 prompt "Processor Type" 84 depends on PPC64 85 help 86 There are two families of 64 bit PowerPC chips supported. 87 The most common ones are the desktop and server CPUs 88 (POWER5, 970, POWER5+, POWER6, POWER7, POWER8, POWER9 ...) 89 90 The other are the "embedded" processors compliant with the 91 "Book 3E" variant of the architecture 92 93config PPC_BOOK3S_64 94 bool "Server processors" 95 select PPC_FPU 96 select PPC_HAVE_PMU_SUPPORT 97 select HAVE_ARCH_TRANSPARENT_HUGEPAGE 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 103 select HAVE_MOVE_PMD 104 select HAVE_MOVE_PUD 105 select IRQ_WORK 106 select PPC_64S_HASH_MMU if !PPC_RADIX_MMU 107 select KASAN_VMALLOC if KASAN 108 109config PPC_BOOK3E_64 110 bool "Embedded processors" 111 select PPC_FSL_BOOK3E 112 select PPC_FPU # Make it a choice ? 113 select PPC_SMP_MUXED_IPI 114 select PPC_DOORBELL 115 select ZONE_DMA 116 117endchoice 118 119choice 120 prompt "CPU selection" 121 default GENERIC_CPU 122 help 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. 125 126 If unsure, select Generic. 127 128config GENERIC_CPU 129 bool "Generic (POWER4 and above)" 130 depends on PPC64 && !CPU_LITTLE_ENDIAN 131 select PPC_64S_HASH_MMU if PPC_BOOK3S_64 132 133config GENERIC_CPU 134 bool "Generic (POWER8 and above)" 135 depends on PPC64 && CPU_LITTLE_ENDIAN 136 select ARCH_HAS_FAST_MULTIPLIER 137 select PPC_64S_HASH_MMU 138 139config GENERIC_CPU 140 bool "Generic 32 bits powerpc" 141 depends on PPC32 && !PPC_8xx 142 143config CELL_CPU 144 bool "Cell Broadband Engine" 145 depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN 146 select PPC_64S_HASH_MMU 147 148config POWER5_CPU 149 bool "POWER5" 150 depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN 151 select PPC_64S_HASH_MMU 152 153config POWER6_CPU 154 bool "POWER6" 155 depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN 156 select PPC_64S_HASH_MMU 157 158config POWER7_CPU 159 bool "POWER7" 160 depends on PPC_BOOK3S_64 161 select ARCH_HAS_FAST_MULTIPLIER 162 select PPC_64S_HASH_MMU 163 164config POWER8_CPU 165 bool "POWER8" 166 depends on PPC_BOOK3S_64 167 select ARCH_HAS_FAST_MULTIPLIER 168 select PPC_64S_HASH_MMU 169 170config POWER9_CPU 171 bool "POWER9" 172 depends on PPC_BOOK3S_64 173 select ARCH_HAS_FAST_MULTIPLIER 174 175config E5500_CPU 176 bool "Freescale e5500" 177 depends on E500 178 179config E6500_CPU 180 bool "Freescale e6500" 181 depends on E500 182 183config 860_CPU 184 bool "8xx family" 185 depends on PPC_8xx 186 187config E300C2_CPU 188 bool "e300c2 (832x)" 189 depends on PPC_BOOK3S_32 190 191config E300C3_CPU 192 bool "e300c3 (831x)" 193 depends on PPC_BOOK3S_32 194 195config G4_CPU 196 bool "G4 (74xx)" 197 depends on PPC_BOOK3S_32 198 select ALTIVEC 199 200endchoice 201 202config TARGET_CPU_BOOL 203 bool 204 default !GENERIC_CPU 205 206config TARGET_CPU 207 string 208 depends on TARGET_CPU_BOOL 209 default "cell" if CELL_CPU 210 default "power5" if POWER5_CPU 211 default "power6" if POWER6_CPU 212 default "power7" if POWER7_CPU 213 default "power8" if POWER8_CPU 214 default "power9" if POWER9_CPU 215 default "860" if 860_CPU 216 default "e300c2" if E300C2_CPU 217 default "e300c3" if E300C3_CPU 218 default "G4" if G4_CPU 219 220config PPC_BOOK3S 221 def_bool y 222 depends on PPC_BOOK3S_32 || PPC_BOOK3S_64 223 224config PPC_BOOK3E 225 def_bool y 226 depends on PPC_BOOK3E_64 227 228config E500 229 select FSL_EMB_PERFMON 230 select PPC_FSL_BOOK3E 231 bool 232 233config PPC_E500MC 234 bool "e500mc Support" 235 select PPC_FPU 236 select COMMON_CLK 237 depends on E500 238 help 239 This must be enabled for running on e500mc (and derivatives 240 such as e5500/e6500), and must be disabled for running on 241 e500v1 or e500v2. 242 243config PPC_FPU_REGS 244 bool 245 246config PPC_FPU 247 bool "Support for Floating Point Unit (FPU)" if PPC_MPC832x 248 default y if PPC64 249 select PPC_FPU_REGS 250 help 251 This must be enabled to support the Floating Point Unit 252 Most 6xx have an FPU but e300c2 core (mpc832x) don't have 253 an FPU, so when building an embedded kernel for that target 254 you can disable FPU support. 255 256 If unsure say Y. 257 258config FSL_EMB_PERFMON 259 bool "Freescale Embedded Perfmon" 260 depends on E500 || PPC_83xx 261 help 262 This is the Performance Monitor support found on the e500 core 263 and some e300 cores (c3 and c4). Select this only if your 264 core supports the Embedded Performance Monitor APU 265 266config FSL_EMB_PERF_EVENT 267 bool 268 depends on FSL_EMB_PERFMON && PERF_EVENTS && !PPC_PERF_CTRS 269 default y 270 271config FSL_EMB_PERF_EVENT_E500 272 bool 273 depends on FSL_EMB_PERF_EVENT && E500 274 default y 275 276config 4xx 277 bool 278 depends on 40x || 44x 279 default y 280 281config BOOKE 282 bool 283 depends on E500 || 44x || PPC_BOOK3E 284 default y 285 286config BOOKE_OR_40x 287 bool 288 depends on BOOKE || 40x 289 default y 290 291config FSL_BOOKE 292 bool 293 depends on E500 && PPC32 294 default y 295 296# this is for common code between PPC32 & PPC64 FSL BOOKE 297config PPC_FSL_BOOK3E 298 bool 299 select ARCH_SUPPORTS_HUGETLBFS if PHYS_64BIT || PPC64 300 imply FSL_EMB_PERFMON 301 select PPC_SMP_MUXED_IPI 302 select PPC_DOORBELL 303 select PPC_KUEP 304 default y if FSL_BOOKE 305 306config PTE_64BIT 307 bool 308 depends on 44x || E500 || PPC_86xx 309 default y if PHYS_64BIT 310 311config PHYS_64BIT 312 bool 'Large physical address support' if E500 || PPC_86xx 313 depends on (44x || E500 || PPC_86xx) && !PPC_83xx && !PPC_82xx 314 select PHYS_ADDR_T_64BIT 315 help 316 This option enables kernel support for larger than 32-bit physical 317 addresses. This feature may not be available on all cores. 318 319 If you have more than 3.5GB of RAM or so, you also need to enable 320 SWIOTLB under Kernel Options for this to work. The actual number 321 is platform-dependent. 322 323 If in doubt, say N here. 324 325config ALTIVEC 326 bool "AltiVec Support" 327 depends on PPC_BOOK3S_32 || PPC_BOOK3S_64 || (PPC_E500MC && PPC64) 328 select PPC_FPU 329 help 330 This option enables kernel support for the Altivec extensions to the 331 PowerPC processor. The kernel currently supports saving and restoring 332 altivec registers, and turning on the 'altivec enable' bit so user 333 processes can execute altivec instructions. 334 335 This option is only usefully if you have a processor that supports 336 altivec (G4, otherwise known as 74xx series), but does not have 337 any affect on a non-altivec cpu (it does, however add code to the 338 kernel). 339 340 If in doubt, say Y here. 341 342config VSX 343 bool "VSX Support" 344 depends on PPC_BOOK3S_64 && ALTIVEC && PPC_FPU 345 help 346 347 This option enables kernel support for the Vector Scaler extensions 348 to the PowerPC processor. The kernel currently supports saving and 349 restoring VSX registers, and turning on the 'VSX enable' bit so user 350 processes can execute VSX instructions. 351 352 This option is only useful if you have a processor that supports 353 VSX (P7 and above), but does not have any affect on a non-VSX 354 CPUs (it does, however add code to the kernel). 355 356 If in doubt, say Y here. 357 358config SPE_POSSIBLE 359 def_bool y 360 depends on E500 && !PPC_E500MC 361 362config SPE 363 bool "SPE Support" 364 depends on SPE_POSSIBLE 365 default y 366 help 367 This option enables kernel support for the Signal Processing 368 Extensions (SPE) to the PowerPC processor. The kernel currently 369 supports saving and restoring SPE registers, and turning on the 370 'spe enable' bit so user processes can execute SPE instructions. 371 372 This option is only useful if you have a processor that supports 373 SPE (e500, otherwise known as 85xx series), but does not have any 374 effect on a non-spe cpu (it does, however add code to the kernel). 375 376 If in doubt, say Y here. 377 378config PPC_64S_HASH_MMU 379 bool "Hash MMU Support" 380 depends on PPC_BOOK3S_64 381 default y 382 help 383 Enable support for the Power ISA Hash style MMU. This is implemented 384 by all IBM Power and other 64-bit Book3S CPUs before ISA v3.0. The 385 OpenPOWER ISA does not mandate the hash MMU and some CPUs do not 386 implement it (e.g., Microwatt). 387 388 Note that POWER9 PowerVM platforms only support the hash 389 MMU. From POWER10 radix is also supported by PowerVM. 390 391 If you're unsure, say Y. 392 393config PPC_RADIX_MMU 394 bool "Radix MMU Support" 395 depends on PPC_BOOK3S_64 396 select ARCH_HAS_GIGANTIC_PAGE 397 default y 398 help 399 Enable support for the Power ISA 3.0 Radix style MMU. Currently this 400 is only implemented by IBM Power9 CPUs, if you don't have one of them 401 you can probably disable this. 402 403config PPC_RADIX_MMU_DEFAULT 404 bool "Default to using the Radix MMU when possible" if PPC_64S_HASH_MMU 405 depends on PPC_BOOK3S_64 406 depends on PPC_RADIX_MMU 407 default y 408 help 409 When the hardware supports the Radix MMU, default to using it unless 410 "disable_radix[=yes]" is specified on the kernel command line. 411 412 If this option is disabled, the Hash MMU will be used by default, 413 unless "disable_radix=no" is specified on the kernel command line. 414 415 If you're unsure, say Y. 416 417config PPC_KUEP 418 bool "Kernel Userspace Execution Prevention" if !40x 419 default y if !40x 420 help 421 Enable support for Kernel Userspace Execution Prevention (KUEP) 422 423 If you're unsure, say Y. 424 425config PPC_KUAP 426 bool "Kernel Userspace Access Protection" 427 default y 428 help 429 Enable support for Kernel Userspace Access Protection (KUAP) 430 431 If you're unsure, say Y. 432 433config PPC_KUAP_DEBUG 434 bool "Extra debugging for Kernel Userspace Access Protection" 435 depends on PPC_KUAP 436 help 437 Add extra debugging for Kernel Userspace Access Protection (KUAP) 438 If you're unsure, say N. 439 440config PPC_PKEY 441 def_bool y 442 depends on PPC_BOOK3S_64 443 depends on PPC_MEM_KEYS || PPC_KUAP || PPC_KUEP 444 445 446config PPC_MMU_NOHASH 447 def_bool y 448 depends on !PPC_BOOK3S 449 450config PPC_BOOK3E_MMU 451 def_bool y 452 depends on FSL_BOOKE || PPC_BOOK3E 453 454config PPC_HAVE_PMU_SUPPORT 455 bool 456 457config PMU_SYSFS 458 bool "Create PMU SPRs sysfs file" 459 default n 460 help 461 This option enables sysfs file creation for PMU SPRs like MMCR* and PMC*. 462 463config PPC_PERF_CTRS 464 def_bool y 465 depends on PERF_EVENTS && PPC_HAVE_PMU_SUPPORT 466 help 467 This enables the powerpc-specific perf_event back-end. 468 469config FORCE_SMP 470 # Allow platforms to force SMP=y by selecting this 471 bool 472 select SMP 473 474config SMP 475 depends on PPC_BOOK3S || PPC_BOOK3E || FSL_BOOKE || PPC_47x 476 select GENERIC_IRQ_MIGRATION 477 bool "Symmetric multi-processing support" if !FORCE_SMP 478 help 479 This enables support for systems with more than one CPU. If you have 480 a system with only one CPU, say N. If you have a system with more 481 than one CPU, say Y. Note that the kernel does not currently 482 support SMP machines with 603/603e/603ev or PPC750 ("G3") processors 483 since they have inadequate hardware support for multiprocessor 484 operation. 485 486 If you say N here, the kernel will run on single and multiprocessor 487 machines, but will use only one CPU of a multiprocessor machine. If 488 you say Y here, the kernel will run on single-processor machines. 489 On a single-processor machine, the kernel will run faster if you say 490 N here. 491 492 If you don't know what to do here, say N. 493 494config NR_CPUS 495 int "Maximum number of CPUs (2-8192)" if SMP 496 range 2 8192 if SMP 497 default "1" if !SMP 498 default "32" if PPC64 499 default "4" 500 501config NOT_COHERENT_CACHE 502 bool 503 depends on 4xx || PPC_8xx || PPC_MPC512x || \ 504 GAMECUBE_COMMON || AMIGAONE 505 select ARCH_HAS_DMA_PREP_COHERENT 506 select ARCH_HAS_SYNC_DMA_FOR_DEVICE 507 select ARCH_HAS_SYNC_DMA_FOR_CPU 508 select DMA_DIRECT_REMAP 509 default n if PPC_47x 510 default y 511 512config CHECK_CACHE_COHERENCY 513 bool 514 515config PPC_DOORBELL 516 bool 517 518endmenu 519 520config VDSO32 521 def_bool y 522 depends on PPC32 || COMPAT 523 help 524 This symbol controls whether we build the 32-bit VDSO. We obviously 525 want to do that if we're building a 32-bit kernel. If we're building 526 a 64-bit kernel then we only want a 32-bit VDSO if we're also enabling 527 COMPAT. 528 529choice 530 prompt "Endianness selection" 531 default CPU_BIG_ENDIAN 532 help 533 This option selects whether a big endian or little endian kernel will 534 be built. 535 536config CPU_BIG_ENDIAN 537 bool "Build big endian kernel" 538 help 539 Build a big endian kernel. 540 541 If unsure, select this option. 542 543config CPU_LITTLE_ENDIAN 544 bool "Build little endian kernel" 545 depends on PPC_BOOK3S_64 546 select PPC64_BOOT_WRAPPER 547 help 548 Build a little endian kernel. 549 550 Note that if cross compiling a little endian kernel, 551 CROSS_COMPILE must point to a toolchain capable of targeting 552 little endian powerpc. 553 554endchoice 555 556config PPC64_ELF_ABI_V1 557 def_bool PPC64 && CPU_BIG_ENDIAN 558 559config PPC64_ELF_ABI_V2 560 def_bool PPC64 && CPU_LITTLE_ENDIAN 561 562config PPC64_BOOT_WRAPPER 563 def_bool n 564 depends on CPU_LITTLE_ENDIAN