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