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