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