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