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