Kconfig.cpu 15 KB

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