1# SPDX-License-Identifier: GPL-2.0
2# Put here option for CPU selection and depending optimization
3choice
4	prompt "x86-32 Processor family"
5	depends on X86_32
6	default M686
7	help
8	  This is the processor type of your CPU. This information is
9	  used for optimizing purposes. In order to compile a kernel
10	  that can run on all supported x86 CPU types (albeit not
11	  optimally fast), you can specify "486" here.
12
13	  Note that the 386 is no longer supported, this includes
14	  AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI 486DLC/DLC2,
15	  UMC 486SX-S and the NexGen Nx586.
16
17	  The kernel will not necessarily run on earlier architectures than
18	  the one you have chosen, e.g. a Pentium optimized kernel will run on
19	  a PPro, but not necessarily on a i486.
20
21	  Here are the settings recommended for greatest speed:
22	  - "486" for the AMD/Cyrix/IBM/Intel 486DX/DX2/DX4 or
23	    SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S.
24	  - "586" for generic Pentium CPUs lacking the TSC
25	    (time stamp counter) register.
26	  - "Pentium-Classic" for the Intel Pentium.
27	  - "Pentium-MMX" for the Intel Pentium MMX.
28	  - "Pentium-Pro" for the Intel Pentium Pro.
29	  - "Pentium-II" for the Intel Pentium II or pre-Coppermine Celeron.
30	  - "Pentium-III" for the Intel Pentium III or Coppermine Celeron.
31	  - "Pentium-4" for the Intel Pentium 4 or P4-based Celeron.
32	  - "K6" for the AMD K6, K6-II and K6-III (aka K6-3D).
33	  - "Athlon" for the AMD K7 family (Athlon/Duron/Thunderbird).
34	  - "Crusoe" for the Transmeta Crusoe series.
35	  - "Efficeon" for the Transmeta Efficeon series.
36	  - "Winchip-C6" for original IDT Winchip.
37	  - "Winchip-2" for IDT Winchips with 3dNow! capabilities.
38	  - "AMD Elan" for the 32-bit AMD Elan embedded CPU.
39	  - "GeodeGX1" for Geode GX1 (Cyrix MediaGX).
40	  - "Geode GX/LX" For AMD Geode GX and LX processors.
41	  - "CyrixIII/VIA C3" for VIA Cyrix III or VIA C3.
42	  - "VIA C3-2" for VIA C3-2 "Nehemiah" (model 9 and above).
43	  - "VIA C7" for VIA C7.
44	  - "Intel Atom" for the Atom-microarchitecture CPUs.
45
46	  See each option's help text for additional details. If you don't know
47	  what to do, choose "Pentium-Pro".
48
49config M486SX
50	bool "486SX"
51	depends on X86_32
52	help
53	  Select this for an 486-class CPU without an FPU such as
54	  AMD/Cyrix/IBM/Intel SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5S.
55
56config M486
57	bool "486DX"
58	depends on X86_32
59	help
60	  Select this for an 486-class CPU such as AMD/Cyrix/IBM/Intel
61	  486DX/DX2/DX4 and UMC U5D.
62
63config M586
64	bool "586/K5/5x86/6x86/6x86MX"
65	depends on X86_32
66	help
67	  Select this for an 586 or 686 series processor such as the AMD K5,
68	  the Cyrix 5x86, 6x86 and 6x86MX.  This choice does not
69	  assume the RDTSC (Read Time Stamp Counter) instruction.
70
71config M586TSC
72	bool "Pentium-Classic"
73	depends on X86_32
74	help
75	  Select this for a Pentium Classic processor with the RDTSC (Read
76	  Time Stamp Counter) instruction for benchmarking.
77
78config M586MMX
79	bool "Pentium-MMX"
80	depends on X86_32
81	help
82	  Select this for a Pentium with the MMX graphics/multimedia
83	  extended instructions.
84
85config M686
86	bool "Pentium-Pro"
87	depends on X86_32
88	help
89	  Select this for Intel Pentium Pro chips.  This enables the use of
90	  Pentium Pro extended instructions, and disables the init-time guard
91	  against the f00f bug found in earlier Pentiums.
92
93config MPENTIUMII
94	bool "Pentium-II/Celeron(pre-Coppermine)"
95	depends on X86_32
96	help
97	  Select this for Intel chips based on the Pentium-II and
98	  pre-Coppermine Celeron core.  This option enables an unaligned
99	  copy optimization, compiles the kernel with optimization flags
100	  tailored for the chip, and applies any applicable Pentium Pro
101	  optimizations.
102
103config MPENTIUMIII
104	bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon"
105	depends on X86_32
106	help
107	  Select this for Intel chips based on the Pentium-III and
108	  Celeron-Coppermine core.  This option enables use of some
109	  extended prefetch instructions in addition to the Pentium II
110	  extensions.
111
112config MPENTIUMM
113	bool "Pentium M/Pentium Dual Core/Core Solo/Core Duo"
114	depends on X86_32
115	help
116	  Select this for Intel Pentium M (not Pentium-4 M)
117	  "Merom" Core Solo/Duo notebook chips
118
119config MPENTIUM4
120	bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon"
121	depends on X86_32
122	help
123	  Select this for Intel Pentium 4 chips.  This includes the
124	  Pentium 4, Pentium D, P4-based Celeron and Xeon, and
125	  Pentium-4 M (not Pentium M) chips.  This option enables compile
126	  flags optimized for the chip, uses the correct cache line size, and
127	  applies any applicable optimizations.
128
129	  CPUIDs: F[0-6][1-A] (in /proc/cpuinfo show = cpu family : 15 )
130
131	  Select this for:
132	    Pentiums (Pentium 4, Pentium D, Celeron, Celeron D) corename:
133		-Willamette
134		-Northwood
135		-Mobile Pentium 4
136		-Mobile Pentium 4 M
137		-Extreme Edition (Gallatin)
138	    Xeons (Intel Xeon, Xeon MP, Xeon LV, Xeon MV) corename:
139		-Foster
140		-Prestonia
141		-Gallatin
142
143config MK6
144	bool "K6/K6-II/K6-III"
145	depends on X86_32
146	help
147	  Select this for an AMD K6-family processor.  Enables use of
148	  some extended instructions, and passes appropriate optimization
149	  flags to GCC.
150
151config MK7
152	bool "Athlon/Duron/K7"
153	depends on X86_32
154	help
155	  Select this for an AMD Athlon K7-family processor.  Enables use of
156	  some extended instructions, and passes appropriate optimization
157	  flags to GCC.
158
159config MCRUSOE
160	bool "Crusoe"
161	depends on X86_32
162	help
163	  Select this for a Transmeta Crusoe processor.  Treats the processor
164	  like a 586 with TSC, and sets some GCC optimization flags (like a
165	  Pentium Pro with no alignment requirements).
166
167config MEFFICEON
168	bool "Efficeon"
169	depends on X86_32
170	help
171	  Select this for a Transmeta Efficeon processor.
172
173config MWINCHIPC6
174	bool "Winchip-C6"
175	depends on X86_32
176	help
177	  Select this for an IDT Winchip C6 chip.  Linux and GCC
178	  treat this chip as a 586TSC with some extended instructions
179	  and alignment requirements.
180
181config MWINCHIP3D
182	bool "Winchip-2/Winchip-2A/Winchip-3"
183	depends on X86_32
184	help
185	  Select this for an IDT Winchip-2, 2A or 3.  Linux and GCC
186	  treat this chip as a 586TSC with some extended instructions
187	  and alignment requirements.  Also enable out of order memory
188	  stores for this CPU, which can increase performance of some
189	  operations.
190
191config MELAN
192	bool "AMD Elan"
193	depends on X86_32
194	help
195	  Select this for an AMD Elan processor.
196
197	  Do not use this option for K6/Athlon/Opteron processors!
198
199config MGEODEGX1
200	bool "GeodeGX1"
201	depends on X86_32
202	help
203	  Select this for a Geode GX1 (Cyrix MediaGX) chip.
204
205config MGEODE_LX
206	bool "Geode GX/LX"
207	depends on X86_32
208	help
209	  Select this for AMD Geode GX and LX processors.
210
211config MCYRIXIII
212	bool "CyrixIII/VIA-C3"
213	depends on X86_32
214	help
215	  Select this for a Cyrix III or C3 chip.  Presently Linux and GCC
216	  treat this chip as a generic 586. Whilst the CPU is 686 class,
217	  it lacks the cmov extension which gcc assumes is present when
218	  generating 686 code.
219	  Note that Nehemiah (Model 9) and above will not boot with this
220	  kernel due to them lacking the 3DNow! instructions used in earlier
221	  incarnations of the CPU.
222
223config MVIAC3_2
224	bool "VIA C3-2 (Nehemiah)"
225	depends on X86_32
226	help
227	  Select this for a VIA C3 "Nehemiah". Selecting this enables usage
228	  of SSE and tells gcc to treat the CPU as a 686.
229	  Note, this kernel will not boot on older (pre model 9) C3s.
230
231config MVIAC7
232	bool "VIA C7"
233	depends on X86_32
234	help
235	  Select this for a VIA C7.  Selecting this uses the correct cache
236	  shift and tells gcc to treat the CPU as a 686.
237
238config MATOM
239	bool "Intel Atom"
240	help
241	  Select this for the Intel Atom platform. Intel Atom CPUs have an
242	  in-order pipelining architecture and thus can benefit from
243	  accordingly optimized code. Use a recent GCC with specific Atom
244	  support in order to fully benefit from selecting this option.
245
246endchoice
247
248config X86_GENERIC
249	bool "Generic x86 support"
250	depends on X86_32
251	help
252	  Instead of just including optimizations for the selected
253	  x86 variant (e.g. PII, Crusoe or Athlon), include some more
254	  generic optimizations as well. This will make the kernel
255	  perform better on x86 CPUs other than that selected.
256
257	  This is really intended for distributors who need more
258	  generic optimizations.
259
260#
261# Define implied options from the CPU selection here
262config X86_INTERNODE_CACHE_SHIFT
263	int
264	default "12" if X86_VSMP
265	default X86_L1_CACHE_SHIFT
266
267config X86_L1_CACHE_SHIFT
268	int
269	default "7" if MPENTIUM4
270	default "6" if MK7 || MPENTIUMM || MATOM || MVIAC7 || X86_GENERIC || X86_64
271	default "4" if MELAN || M486SX || M486 || MGEODEGX1
272	default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX
273
274config X86_F00F_BUG
275	def_bool y
276	depends on M586MMX || M586TSC || M586 || M486SX || M486
277
278config X86_INVD_BUG
279	def_bool y
280	depends on M486SX || M486
281
282config X86_ALIGNMENT_16
283	def_bool y
284	depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MELAN || MK6 || M586MMX || M586TSC || M586 || M486SX || M486 || MVIAC3_2 || MGEODEGX1
285
286config X86_INTEL_USERCOPY
287	def_bool y
288	depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK7 || MEFFICEON
289
290config X86_USE_PPRO_CHECKSUM
291	def_bool y
292	depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MATOM
293
294config X86_TSC
295	def_bool y
296	depends on (MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MATOM) || X86_64
297
298config X86_HAVE_PAE
299	def_bool y
300	depends on MCRUSOE || MEFFICEON || MCYRIXIII || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC7 || MATOM || X86_64
301
302config X86_CX8
303	def_bool y
304	depends on X86_HAVE_PAE || M586TSC || M586MMX || MK6 || MK7 || MGEODEGX1 || MGEODE_LX
305
306# this should be set for all -march=.. options where the compiler
307# generates cmov.
308config X86_CMOV
309	def_bool y
310	depends on (MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || MATOM || MGEODE_LX || X86_64)
311
312config X86_MINIMUM_CPU_FAMILY
313	int
314	default "64" if X86_64
315	default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MK7)
316	default "5" if X86_32 && X86_CX8
317	default "4"
318
319config X86_DEBUGCTLMSR
320	def_bool y
321	depends on !(MK6 || MWINCHIPC6 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486SX || M486) && !UML
322
323config IA32_FEAT_CTL
324	def_bool y
325	depends on CPU_SUP_INTEL || CPU_SUP_CENTAUR || CPU_SUP_ZHAOXIN
326
327config X86_VMX_FEATURE_NAMES
328	def_bool y
329	depends on IA32_FEAT_CTL
330
331menuconfig PROCESSOR_SELECT
332	bool "Supported processor vendors" if EXPERT
333	help
334	  This lets you choose what x86 vendor support code your kernel
335	  will include.
336
337config BROADCAST_TLB_FLUSH
338	def_bool y
339	depends on CPU_SUP_AMD && 64BIT
340
341config CPU_SUP_INTEL
342	default y
343	bool "Support Intel processors" if PROCESSOR_SELECT
344	help
345	  This enables detection, tunings and quirks for Intel processors
346
347	  You need this enabled if you want your kernel to run on an
348	  Intel CPU. Disabling this option on other types of CPUs
349	  makes the kernel a tiny bit smaller. Disabling it on an Intel
350	  CPU might render the kernel unbootable.
351
352	  If unsure, say N.
353
354config CPU_SUP_CYRIX_32
355	default y
356	bool "Support Cyrix processors" if PROCESSOR_SELECT
357	depends on M486SX || M486 || M586 || M586TSC || M586MMX || (EXPERT && !64BIT)
358	help
359	  This enables detection, tunings and quirks for Cyrix processors
360
361	  You need this enabled if you want your kernel to run on a
362	  Cyrix CPU. Disabling this option on other types of CPUs
363	  makes the kernel a tiny bit smaller. Disabling it on a Cyrix
364	  CPU might render the kernel unbootable.
365
366	  If unsure, say N.
367
368config CPU_SUP_AMD
369	default y
370	bool "Support AMD processors" if PROCESSOR_SELECT
371	help
372	  This enables detection, tunings and quirks for AMD processors
373
374	  You need this enabled if you want your kernel to run on an
375	  AMD CPU. Disabling this option on other types of CPUs
376	  makes the kernel a tiny bit smaller. Disabling it on an AMD
377	  CPU might render the kernel unbootable.
378
379	  If unsure, say N.
380
381config CPU_SUP_HYGON
382	default y
383	bool "Support Hygon processors" if PROCESSOR_SELECT
384	select CPU_SUP_AMD
385	help
386	  This enables detection, tunings and quirks for Hygon processors
387
388	  You need this enabled if you want your kernel to run on an
389	  Hygon CPU. Disabling this option on other types of CPUs
390	  makes the kernel a tiny bit smaller. Disabling it on an Hygon
391	  CPU might render the kernel unbootable.
392
393	  If unsure, say N.
394
395config CPU_SUP_CENTAUR
396	default y
397	bool "Support Centaur processors" if PROCESSOR_SELECT
398	help
399	  This enables detection, tunings and quirks for Centaur processors
400
401	  You need this enabled if you want your kernel to run on a
402	  Centaur CPU. Disabling this option on other types of CPUs
403	  makes the kernel a tiny bit smaller. Disabling it on a Centaur
404	  CPU might render the kernel unbootable.
405
406	  If unsure, say N.
407
408config CPU_SUP_TRANSMETA_32
409	default y
410	bool "Support Transmeta processors" if PROCESSOR_SELECT
411	depends on !64BIT
412	help
413	  This enables detection, tunings and quirks for Transmeta processors
414
415	  You need this enabled if you want your kernel to run on a
416	  Transmeta CPU. Disabling this option on other types of CPUs
417	  makes the kernel a tiny bit smaller. Disabling it on a Transmeta
418	  CPU might render the kernel unbootable.
419
420	  If unsure, say N.
421
422config CPU_SUP_UMC_32
423	default y
424	bool "Support UMC processors" if PROCESSOR_SELECT
425	depends on M486SX || M486 || (EXPERT && !64BIT)
426	help
427	  This enables detection, tunings and quirks for UMC processors
428
429	  You need this enabled if you want your kernel to run on a
430	  UMC CPU. Disabling this option on other types of CPUs
431	  makes the kernel a tiny bit smaller. Disabling it on a UMC
432	  CPU might render the kernel unbootable.
433
434	  If unsure, say N.
435
436config CPU_SUP_ZHAOXIN
437	default y
438	bool "Support Zhaoxin processors" if PROCESSOR_SELECT
439	help
440	  This enables detection, tunings and quirks for Zhaoxin processors
441
442	  You need this enabled if you want your kernel to run on a
443	  Zhaoxin CPU. Disabling this option on other types of CPUs
444	  makes the kernel a tiny bit smaller. Disabling it on a Zhaoxin
445	  CPU might render the kernel unbootable.
446
447	  If unsure, say N.
448
449config CPU_SUP_VORTEX_32
450	default y
451	bool "Support Vortex processors" if PROCESSOR_SELECT
452	depends on X86_32
453	help
454	  This enables detection, tunings and quirks for Vortex processors
455
456	  You need this enabled if you want your kernel to run on a
457	  Vortex CPU. Disabling this option on other types of CPUs
458	  makes the kernel a tiny bit smaller.
459
460	  If unsure, say N.
461