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