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