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