Kconfig.cpu 15.8 KB
Newer Older
1 2 3 4 5
# Put here option for CPU selection and depending optimization
if !X86_ELAN

choice
	prompt "Processor family"
6 7
	default M686 if X86_32
	default GENERIC_CPU if X86_64
8 9 10

config M386
	bool "386"
11
	depends on X86_32 && !UML
12 13 14 15 16 17 18 19 20 21 22 23
	---help---
	  This is the processor type of your CPU. This information is used for
	  optimizing purposes. In order to compile a kernel that can run on
	  all x86 CPU types (albeit not optimally fast), you can specify
	  "386" here.

	  The kernel will not necessarily run on earlier architectures than
	  the one you have chosen, e.g. a Pentium optimized kernel will run on
	  a PPro, but not necessarily on a i486.

	  Here are the settings recommended for greatest speed:
	  - "386" for the AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI
Dmitri Vorobiev's avatar
Dmitri Vorobiev committed
24 25
	  486DLC/DLC2, and UMC 486SX-S.  Only "386" kernels will run on a 386
	  class machine.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
	  - "486" for the AMD/Cyrix/IBM/Intel 486DX/DX2/DX4 or
	  SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S.
	  - "586" for generic Pentium CPUs lacking the TSC
	  (time stamp counter) register.
	  - "Pentium-Classic" for the Intel Pentium.
	  - "Pentium-MMX" for the Intel Pentium MMX.
	  - "Pentium-Pro" for the Intel Pentium Pro.
	  - "Pentium-II" for the Intel Pentium II or pre-Coppermine Celeron.
	  - "Pentium-III" for the Intel Pentium III or Coppermine Celeron.
	  - "Pentium-4" for the Intel Pentium 4 or P4-based Celeron.
	  - "K6" for the AMD K6, K6-II and K6-III (aka K6-3D).
	  - "Athlon" for the AMD K7 family (Athlon/Duron/Thunderbird).
	  - "Crusoe" for the Transmeta Crusoe series.
	  - "Efficeon" for the Transmeta Efficeon series.
	  - "Winchip-C6" for original IDT Winchip.
41
	  - "Winchip-2" for IDT Winchips with 3dNow! capabilities.
42
	  - "GeodeGX1" for Geode GX1 (Cyrix MediaGX).
43
	  - "Geode GX/LX" For AMD Geode GX and LX processors.
44
	  - "CyrixIII/VIA C3" for VIA Cyrix III or VIA C3.
Egry Gabor's avatar
Egry Gabor committed
45
	  - "VIA C3-2" for VIA C3-2 "Nehemiah" (model 9 and above).
46
	  - "VIA C7" for VIA C7.
47 48 49 50 51

	  If you don't know what to do, choose "386".

config M486
	bool "486"
52
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
53
	---help---
54 55 56 57 58 59 60
	  Select this for a 486 series processor, either Intel or one of the
	  compatible processors from AMD, Cyrix, IBM, or Intel.  Includes DX,
	  DX2, and DX4 variants; also SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or
	  U5S.

config M586
	bool "586/K5/5x86/6x86/6x86MX"
61
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
62
	---help---
63 64 65 66 67 68
	  Select this for an 586 or 686 series processor such as the AMD K5,
	  the Cyrix 5x86, 6x86 and 6x86MX.  This choice does not
	  assume the RDTSC (Read Time Stamp Counter) instruction.

config M586TSC
	bool "Pentium-Classic"
69
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
70
	---help---
71 72 73 74 75
	  Select this for a Pentium Classic processor with the RDTSC (Read
	  Time Stamp Counter) instruction for benchmarking.

config M586MMX
	bool "Pentium-MMX"
76
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
77
	---help---
78 79 80 81 82
	  Select this for a Pentium with the MMX graphics/multimedia
	  extended instructions.

config M686
	bool "Pentium-Pro"
83
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
84
	---help---
85 86 87 88 89 90
	  Select this for Intel Pentium Pro chips.  This enables the use of
	  Pentium Pro extended instructions, and disables the init-time guard
	  against the f00f bug found in earlier Pentiums.

config MPENTIUMII
	bool "Pentium-II/Celeron(pre-Coppermine)"
91
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
92
	---help---
93 94 95 96 97 98 99 100
	  Select this for Intel chips based on the Pentium-II and
	  pre-Coppermine Celeron core.  This option enables an unaligned
	  copy optimization, compiles the kernel with optimization flags
	  tailored for the chip, and applies any applicable Pentium Pro
	  optimizations.

config MPENTIUMIII
	bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon"
101
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
102
	---help---
103 104 105 106 107 108 109
	  Select this for Intel chips based on the Pentium-III and
	  Celeron-Coppermine core.  This option enables use of some
	  extended prefetch instructions in addition to the Pentium II
	  extensions.

config MPENTIUMM
	bool "Pentium M"
110
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
111
	---help---
112 113 114 115
	  Select this for Intel Pentium M (not Pentium-4 M)
	  notebook chips.

config MPENTIUM4
116
	bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon"
117
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
118
	---help---
119
	  Select this for Intel Pentium 4 chips.  This includes the
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
	  Pentium 4, Pentium D, P4-based Celeron and Xeon, and
	  Pentium-4 M (not Pentium M) chips.  This option enables compile
	  flags optimized for the chip, uses the correct cache line size, and
	  applies any applicable optimizations.

	  CPUIDs: F[0-6][1-A] (in /proc/cpuinfo show = cpu family : 15 )

	  Select this for:
	    Pentiums (Pentium 4, Pentium D, Celeron, Celeron D) corename:
		-Willamette
		-Northwood
		-Mobile Pentium 4
		-Mobile Pentium 4 M
		-Extreme Edition (Gallatin)
		-Prescott
		-Prescott 2M
		-Cedar Mill
		-Presler
		-Smithfiled
	    Xeons (Intel Xeon, Xeon MP, Xeon LV, Xeon MV) corename:
		-Foster
		-Prestonia
		-Gallatin
		-Nocona
		-Irwindale
		-Cranford
		-Potomac
		-Paxville
		-Dempsey

150 151 152

config MK6
	bool "K6/K6-II/K6-III"
153
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
154
	---help---
155 156 157 158 159 160
	  Select this for an AMD K6-family processor.  Enables use of
	  some extended instructions, and passes appropriate optimization
	  flags to GCC.

config MK7
	bool "Athlon/Duron/K7"
161
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
162
	---help---
163 164 165 166 167 168
	  Select this for an AMD Athlon K7-family processor.  Enables use of
	  some extended instructions, and passes appropriate optimization
	  flags to GCC.

config MK8
	bool "Opteron/Athlon64/Hammer/K8"
Ingo Molnar's avatar
Ingo Molnar committed
169
	---help---
170 171 172
	  Select this for an AMD Opteron or Athlon64 Hammer-family processor.
	  Enables use of some extended instructions, and passes appropriate
	  optimization flags to GCC.
173 174 175

config MCRUSOE
	bool "Crusoe"
176
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
177
	---help---
178 179 180 181 182 183
	  Select this for a Transmeta Crusoe processor.  Treats the processor
	  like a 586 with TSC, and sets some GCC optimization flags (like a
	  Pentium Pro with no alignment requirements).

config MEFFICEON
	bool "Efficeon"
184
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
185
	---help---
186 187 188 189
	  Select this for a Transmeta Efficeon processor.

config MWINCHIPC6
	bool "Winchip-C6"
190
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
191
	---help---
192 193 194 195 196
	  Select this for an IDT Winchip C6 chip.  Linux and GCC
	  treat this chip as a 586TSC with some extended instructions
	  and alignment requirements.

config MWINCHIP3D
197
	bool "Winchip-2/Winchip-2A/Winchip-3"
198
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
199
	---help---
200
	  Select this for an IDT Winchip-2, 2A or 3.  Linux and GCC
201
	  treat this chip as a 586TSC with some extended instructions
202
	  and alignment requirements.  Also enable out of order memory
203 204 205 206 207
	  stores for this CPU, which can increase performance of some
	  operations.

config MGEODEGX1
	bool "GeodeGX1"
208
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
209
	---help---
210 211
	  Select this for a Geode GX1 (Cyrix MediaGX) chip.

212
config MGEODE_LX
213
	bool "Geode GX/LX"
214
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
215
	---help---
216
	  Select this for AMD Geode GX and LX processors.
217

218 219
config MCYRIXIII
	bool "CyrixIII/VIA-C3"
220
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
221
	---help---
222 223 224 225 226 227 228 229 230 231
	  Select this for a Cyrix III or C3 chip.  Presently Linux and GCC
	  treat this chip as a generic 586. Whilst the CPU is 686 class,
	  it lacks the cmov extension which gcc assumes is present when
	  generating 686 code.
	  Note that Nehemiah (Model 9) and above will not boot with this
	  kernel due to them lacking the 3DNow! instructions used in earlier
	  incarnations of the CPU.

config MVIAC3_2
	bool "VIA C3-2 (Nehemiah)"
232
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
233
	---help---
234 235 236 237
	  Select this for a VIA C3 "Nehemiah". Selecting this enables usage
	  of SSE and tells gcc to treat the CPU as a 686.
	  Note, this kernel will not boot on older (pre model 9) C3s.

238 239
config MVIAC7
	bool "VIA C7"
240
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
241
	---help---
242 243 244
	  Select this for a VIA C7.  Selecting this uses the correct cache
	  shift and tells gcc to treat the CPU as a 686.

245 246 247
config MPSC
	bool "Intel P4 / older Netburst based Xeon"
	depends on X86_64
Ingo Molnar's avatar
Ingo Molnar committed
248
	---help---
249 250 251
	  Optimize for Intel Pentium 4, Pentium D and older Nocona/Dempsey
	  Xeon CPUs with Intel 64bit which is compatible with x86-64.
	  Note that the latest Xeons (Xeon 51xx and 53xx) are not based on the
252
	  Netburst core and shouldn't use this option. You can distinguish them
253 254 255 256 257
	  using the cpu family field
	  in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one.

config MCORE2
	bool "Core 2/newer Xeon"
Ingo Molnar's avatar
Ingo Molnar committed
258
	---help---
259 260 261 262 263

	  Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and
	  53xx) CPUs. You can distinguish newer from older Xeons by the CPU
	  family in /proc/cpuinfo. Newer ones have 6 and older ones 15
	  (not a typo)
264

265 266 267 268 269 270 271 272 273
config MATOM
	bool "Intel Atom"
	---help---

	  Select this for the Intel Atom platform. Intel Atom CPUs have an
	  in-order pipelining architecture and thus can benefit from
	  accordingly optimized code. Use a recent GCC with specific Atom
	  support in order to fully benefit from selecting this option.

274 275 276
config GENERIC_CPU
	bool "Generic-x86-64"
	depends on X86_64
Ingo Molnar's avatar
Ingo Molnar committed
277
	---help---
278 279 280
	  Generic x86-64 CPU.
	  Run equally well on all x86-64 CPUs.

281 282 283
endchoice

config X86_GENERIC
284 285
	bool "Generic x86 support"
	depends on X86_32
Ingo Molnar's avatar
Ingo Molnar committed
286
	---help---
287 288 289 290 291 292 293 294 295 296
	  Instead of just including optimizations for the selected
	  x86 variant (e.g. PII, Crusoe or Athlon), include some more
	  generic optimizations as well. This will make the kernel
	  perform better on x86 CPUs other than that selected.

	  This is really intended for distributors who need more
	  generic optimizations.

endif

Ingo Molnar's avatar
Ingo Molnar committed
297 298 299 300 301
config X86_CPU
	def_bool y
	select GENERIC_FIND_FIRST_BIT
	select GENERIC_FIND_NEXT_BIT

302 303
#
# Define implied options from the CPU selection here
304
config X86_INTERNODE_CACHE_SHIFT
305
	int
306 307 308
	default "12" if X86_VSMP
	default "7" if NUMA
	default X86_L1_CACHE_SHIFT
309

310
config X86_CMPXCHG
311
	def_bool X86_64 || (X86_32 && !M386)
312

313 314 315
config CMPXCHG_LOCAL
	def_bool X86_64 || (X86_32 && !M386)

316 317
config X86_L1_CACHE_SHIFT
	int
318
	default "7" if MPENTIUM4 || MPSC
319
	default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU
320
	default "4" if X86_ELAN || M486 || M386 || MGEODEGX1
321
	default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX
322

323
config X86_XADD
324
	def_bool y
325
	depends on X86_64 || !M386
326 327

config X86_PPRO_FENCE
328
	bool "PentiumPro memory ordering errata workaround"
329
	depends on M686 || M586MMX || M586TSC || M586 || M486 || M386 || MGEODEGX1
Ingo Molnar's avatar
Ingo Molnar committed
330
	---help---
331 332 333 334 335 336 337 338
	  Old PentiumPro multiprocessor systems had errata that could cause
	  memory operations to violate the x86 ordering standard in rare cases.
	  Enabling this option will attempt to work around some (but not all)
	  occurances of this problem, at the cost of much heavier spinlock and
	  memory barrier operations.

	  If unsure, say n here. Even distro kernels should think twice before
	  enabling this: there are few systems, and an unlikely bug.
339 340

config X86_F00F_BUG
341
	def_bool y
342 343
	depends on M586MMX || M586TSC || M586 || M486 || M386

344 345 346 347
config X86_INVD_BUG
	def_bool y
	depends on M486 || M386

348
config X86_WP_WORKS_OK
349
	def_bool y
350
	depends on !M386
351 352

config X86_INVLPG
353
	def_bool y
354
	depends on X86_32 && !M386
355 356

config X86_BSWAP
357
	def_bool y
358
	depends on X86_32 && !M386
359 360

config X86_POPAD_OK
361
	def_bool y
362
	depends on X86_32 && !M386
363 364

config X86_ALIGNMENT_16
365
	def_bool y
366
	depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1
367 368

config X86_INTEL_USERCOPY
369
	def_bool y
370
	depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2
371 372

config X86_USE_PPRO_CHECKSUM
373
	def_bool y
374
	depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MEFFICEON || MGEODE_LX || MCORE2 || MATOM
375 376

config X86_USE_3DNOW
377
	def_bool y
378
	depends on (MCYRIXIII || MK7 || MGEODE_LX) && !UML
379 380

config X86_OOSTORE
381
	def_bool y
382
	depends on (MWINCHIP3D || MWINCHIPC6) && MTRR
383

384 385 386 387
#
# P6_NOPs are a relatively minor optimization that require a family >=
# 6 processor, except that it is broken on certain VIA chips.
# Furthermore, AMD chips prefer a totally different sequence of NOPs
388 389 390 391 392 393
# (which work on all CPUs).  In addition, it looks like Virtual PC
# does not understand them.
#
# As a result, disallow these if we're not compiling for X86_64 (these
# NOPs do work on all x86-64 capable chips); the list of processors in
# the right-hand clause are the cores that benefit from this optimization.
394
#
395 396
config X86_P6_NOP
	def_bool y
397 398
	depends on X86_64
	depends on (MCORE2 || MPENTIUM4 || MPSC)
399

400
config X86_TSC
401
	def_bool y
402
	depends on ((MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2 || MATOM) && !X86_NUMAQ) || X86_64
403

404 405
config X86_CMPXCHG64
	def_bool y
406
	depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MATOM
407

408 409 410
# this should be set for all -march=.. options where the compiler
# generates cmov.
config X86_CMOV
411
	def_bool y
Matteo Croce's avatar
Matteo Croce committed
412
	depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX)
413

414
config X86_MINIMUM_CPU_FAMILY
415
	int
416
	default "64" if X86_64
417
	default "6" if X86_32 && X86_P6_NOP
418
	default "5" if X86_32 && X86_CMPXCHG64
419
	default "4" if X86_32 && (X86_XADD || X86_CMPXCHG || X86_BSWAP || X86_WP_WORKS_OK)
420
	default "3"
421

Roland McGrath's avatar
Roland McGrath committed
422
config X86_DEBUGCTLMSR
423
	def_bool y
Al Viro's avatar
Al Viro committed
424
	depends on !(MK6 || MWINCHIPC6 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486 || M386) && !UML
425 426

menuconfig PROCESSOR_SELECT
427
	bool "Supported processor vendors" if EXPERT
Ingo Molnar's avatar
Ingo Molnar committed
428
	---help---
429 430 431
	  This lets you choose what x86 vendor support code your kernel
	  will include.

Yinghai Lu's avatar
Yinghai Lu committed
432
config CPU_SUP_INTEL
433 434
	default y
	bool "Support Intel processors" if PROCESSOR_SELECT
Ingo Molnar's avatar
Ingo Molnar committed
435
	---help---
436 437 438 439 440 441 442 443
	  This enables detection, tunings and quirks for Intel processors

	  You need this enabled if you want your kernel to run on an
	  Intel CPU. Disabling this option on other types of CPUs
	  makes the kernel a tiny bit smaller. Disabling it on an Intel
	  CPU might render the kernel unbootable.

	  If unsure, say N.
444 445 446 447 448

config CPU_SUP_CYRIX_32
	default y
	bool "Support Cyrix processors" if PROCESSOR_SELECT
	depends on !64BIT
Ingo Molnar's avatar
Ingo Molnar committed
449
	---help---
450 451 452 453 454 455 456 457
	  This enables detection, tunings and quirks for Cyrix processors

	  You need this enabled if you want your kernel to run on a
	  Cyrix CPU. Disabling this option on other types of CPUs
	  makes the kernel a tiny bit smaller. Disabling it on a Cyrix
	  CPU might render the kernel unbootable.

	  If unsure, say N.
458

Yinghai Lu's avatar
Yinghai Lu committed
459
config CPU_SUP_AMD
460 461
	default y
	bool "Support AMD processors" if PROCESSOR_SELECT
Ingo Molnar's avatar
Ingo Molnar committed
462
	---help---
463 464 465 466 467 468 469 470
	  This enables detection, tunings and quirks for AMD processors

	  You need this enabled if you want your kernel to run on an
	  AMD CPU. Disabling this option on other types of CPUs
	  makes the kernel a tiny bit smaller. Disabling it on an AMD
	  CPU might render the kernel unbootable.

	  If unsure, say N.
471

472
config CPU_SUP_CENTAUR
473 474
	default y
	bool "Support Centaur processors" if PROCESSOR_SELECT
Ingo Molnar's avatar
Ingo Molnar committed
475
	---help---
476 477 478 479 480 481 482 483
	  This enables detection, tunings and quirks for Centaur processors

	  You need this enabled if you want your kernel to run on a
	  Centaur CPU. Disabling this option on other types of CPUs
	  makes the kernel a tiny bit smaller. Disabling it on a Centaur
	  CPU might render the kernel unbootable.

	  If unsure, say N.
484 485 486 487 488

config CPU_SUP_TRANSMETA_32
	default y
	bool "Support Transmeta processors" if PROCESSOR_SELECT
	depends on !64BIT
Ingo Molnar's avatar
Ingo Molnar committed
489
	---help---
490 491 492 493 494 495 496 497
	  This enables detection, tunings and quirks for Transmeta processors

	  You need this enabled if you want your kernel to run on a
	  Transmeta CPU. Disabling this option on other types of CPUs
	  makes the kernel a tiny bit smaller. Disabling it on a Transmeta
	  CPU might render the kernel unbootable.

	  If unsure, say N.
498 499 500 501 502

config CPU_SUP_UMC_32
	default y
	bool "Support UMC processors" if PROCESSOR_SELECT
	depends on !64BIT
Ingo Molnar's avatar
Ingo Molnar committed
503
	---help---
504 505 506 507 508 509 510 511
	  This enables detection, tunings and quirks for UMC processors

	  You need this enabled if you want your kernel to run on a
	  UMC CPU. Disabling this option on other types of CPUs
	  makes the kernel a tiny bit smaller. Disabling it on a UMC
	  CPU might render the kernel unbootable.

	  If unsure, say N.