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