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