Kconfig.cpu 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  1. # Put here option for CPU selection and depending optimization
  2. if !X86_ELAN
  3. choice
  4. prompt "Processor family"
  5. default M686 if X86_32
  6. default GENERIC_CPU if X86_64
  7. config M386
  8. bool "386"
  9. depends on X86_32 && !UML
  10. ---help---
  11. This is the processor type of your CPU. This information is used for
  12. optimizing purposes. In order to compile a kernel that can run on
  13. all x86 CPU types (albeit not optimally fast), you can specify
  14. "386" here.
  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. - "386" for the AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI
  20. 486DLC/DLC2, and UMC 486SX-S. Only "386" kernels will run on a 386
  21. class machine.
  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 Winchip 2.
  38. - "Winchip-2A" for IDT Winchips with 3dNow! capabilities.
  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. If you don't know what to do, choose "386".
  45. config M486
  46. bool "486"
  47. depends on X86_32
  48. help
  49. Select this for a 486 series processor, either Intel or one of the
  50. compatible processors from AMD, Cyrix, IBM, or Intel. Includes DX,
  51. DX2, and DX4 variants; also SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or
  52. U5S.
  53. config M586
  54. bool "586/K5/5x86/6x86/6x86MX"
  55. depends on X86_32
  56. help
  57. Select this for an 586 or 686 series processor such as the AMD K5,
  58. the Cyrix 5x86, 6x86 and 6x86MX. This choice does not
  59. assume the RDTSC (Read Time Stamp Counter) instruction.
  60. config M586TSC
  61. bool "Pentium-Classic"
  62. depends on X86_32
  63. help
  64. Select this for a Pentium Classic processor with the RDTSC (Read
  65. Time Stamp Counter) instruction for benchmarking.
  66. config M586MMX
  67. bool "Pentium-MMX"
  68. depends on X86_32
  69. help
  70. Select this for a Pentium with the MMX graphics/multimedia
  71. extended instructions.
  72. config M686
  73. bool "Pentium-Pro"
  74. depends on X86_32
  75. help
  76. Select this for Intel Pentium Pro chips. This enables the use of
  77. Pentium Pro extended instructions, and disables the init-time guard
  78. against the f00f bug found in earlier Pentiums.
  79. config MPENTIUMII
  80. bool "Pentium-II/Celeron(pre-Coppermine)"
  81. depends on X86_32
  82. help
  83. Select this for Intel chips based on the Pentium-II and
  84. pre-Coppermine Celeron core. This option enables an unaligned
  85. copy optimization, compiles the kernel with optimization flags
  86. tailored for the chip, and applies any applicable Pentium Pro
  87. optimizations.
  88. config MPENTIUMIII
  89. bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon"
  90. depends on X86_32
  91. help
  92. Select this for Intel chips based on the Pentium-III and
  93. Celeron-Coppermine core. This option enables use of some
  94. extended prefetch instructions in addition to the Pentium II
  95. extensions.
  96. config MPENTIUMM
  97. bool "Pentium M"
  98. depends on X86_32
  99. help
  100. Select this for Intel Pentium M (not Pentium-4 M)
  101. notebook chips.
  102. config MPENTIUM4
  103. bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon"
  104. depends on X86_32
  105. help
  106. Select this for Intel Pentium 4 chips. This includes the
  107. Pentium 4, Pentium D, P4-based Celeron and Xeon, and
  108. Pentium-4 M (not Pentium M) chips. This option enables compile
  109. flags optimized for the chip, uses the correct cache line size, and
  110. applies any applicable optimizations.
  111. CPUIDs: F[0-6][1-A] (in /proc/cpuinfo show = cpu family : 15 )
  112. Select this for:
  113. Pentiums (Pentium 4, Pentium D, Celeron, Celeron D) corename:
  114. -Willamette
  115. -Northwood
  116. -Mobile Pentium 4
  117. -Mobile Pentium 4 M
  118. -Extreme Edition (Gallatin)
  119. -Prescott
  120. -Prescott 2M
  121. -Cedar Mill
  122. -Presler
  123. -Smithfiled
  124. Xeons (Intel Xeon, Xeon MP, Xeon LV, Xeon MV) corename:
  125. -Foster
  126. -Prestonia
  127. -Gallatin
  128. -Nocona
  129. -Irwindale
  130. -Cranford
  131. -Potomac
  132. -Paxville
  133. -Dempsey
  134. config MK6
  135. bool "K6/K6-II/K6-III"
  136. depends on X86_32
  137. help
  138. Select this for an AMD K6-family processor. Enables use of
  139. some extended instructions, and passes appropriate optimization
  140. flags to GCC.
  141. config MK7
  142. bool "Athlon/Duron/K7"
  143. depends on X86_32
  144. help
  145. Select this for an AMD Athlon K7-family processor. Enables use of
  146. some extended instructions, and passes appropriate optimization
  147. flags to GCC.
  148. config MK8
  149. bool "Opteron/Athlon64/Hammer/K8"
  150. help
  151. Select this for an AMD Opteron or Athlon64 Hammer-family processor. Enables
  152. use of some extended instructions, and passes appropriate optimization
  153. flags to GCC.
  154. config MCRUSOE
  155. bool "Crusoe"
  156. depends on X86_32
  157. help
  158. Select this for a Transmeta Crusoe processor. Treats the processor
  159. like a 586 with TSC, and sets some GCC optimization flags (like a
  160. Pentium Pro with no alignment requirements).
  161. config MEFFICEON
  162. bool "Efficeon"
  163. depends on X86_32
  164. help
  165. Select this for a Transmeta Efficeon processor.
  166. config MWINCHIPC6
  167. bool "Winchip-C6"
  168. depends on X86_32
  169. help
  170. Select this for an IDT Winchip C6 chip. Linux and GCC
  171. treat this chip as a 586TSC with some extended instructions
  172. and alignment requirements.
  173. config MWINCHIP2
  174. bool "Winchip-2"
  175. depends on X86_32
  176. help
  177. Select this for an IDT Winchip-2. Linux and GCC
  178. treat this chip as a 586TSC with some extended instructions
  179. and alignment requirements.
  180. config MWINCHIP3D
  181. bool "Winchip-2A/Winchip-3"
  182. depends on X86_32
  183. help
  184. Select this for an IDT Winchip-2A or 3. Linux and GCC
  185. treat this chip as a 586TSC with some extended instructions
  186. and alignment requirements. Also enable out of order memory
  187. stores for this CPU, which can increase performance of some
  188. operations.
  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 53xx)
  237. CPUs. You can distinguish newer from older Xeons by the CPU family
  238. in /proc/cpuinfo. Newer ones have 6 and older ones 15 (not a typo)
  239. config GENERIC_CPU
  240. bool "Generic-x86-64"
  241. depends on X86_64
  242. help
  243. Generic x86-64 CPU.
  244. Run equally well on all x86-64 CPUs.
  245. endchoice
  246. config X86_GENERIC
  247. bool "Generic x86 support"
  248. depends on X86_32
  249. help
  250. Instead of just including optimizations for the selected
  251. x86 variant (e.g. PII, Crusoe or Athlon), include some more
  252. generic optimizations as well. This will make the kernel
  253. perform better on x86 CPUs other than that selected.
  254. This is really intended for distributors who need more
  255. generic optimizations.
  256. endif
  257. config X86_CPU
  258. def_bool y
  259. select GENERIC_FIND_FIRST_BIT
  260. select GENERIC_FIND_NEXT_BIT
  261. #
  262. # Define implied options from the CPU selection here
  263. config X86_L1_CACHE_BYTES
  264. int
  265. default "128" if GENERIC_CPU || MPSC
  266. default "64" if MK8 || MCORE2
  267. depends on X86_64
  268. config X86_INTERNODE_CACHE_BYTES
  269. int
  270. default "4096" if X86_VSMP
  271. default X86_L1_CACHE_BYTES if !X86_VSMP
  272. depends on X86_64
  273. config X86_CMPXCHG
  274. def_bool X86_64 || (X86_32 && !M386)
  275. config X86_L1_CACHE_SHIFT
  276. int
  277. default "7" if MPENTIUM4 || X86_GENERIC || GENERIC_CPU || MPSC
  278. default "4" if X86_ELAN || M486 || M386 || MGEODEGX1
  279. default "5" if MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX
  280. default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MVIAC7
  281. config X86_XADD
  282. def_bool y
  283. depends on X86_32 && !M386
  284. config X86_PPRO_FENCE
  285. bool "PentiumPro memory ordering errata workaround"
  286. depends on M686 || M586MMX || M586TSC || M586 || M486 || M386 || MGEODEGX1
  287. help
  288. Old PentiumPro multiprocessor systems had errata that could cause memory
  289. operations to violate the x86 ordering standard in rare cases. Enabling this
  290. option will attempt to work around some (but not all) occurances of
  291. this problem, at the cost of much heavier spinlock and memory barrier
  292. operations.
  293. If unsure, say n here. Even distro kernels should think twice before enabling
  294. this: there are few systems, and an unlikely bug.
  295. config X86_F00F_BUG
  296. def_bool y
  297. depends on M586MMX || M586TSC || M586 || M486 || M386
  298. config X86_WP_WORKS_OK
  299. def_bool y
  300. depends on !M386
  301. config X86_INVLPG
  302. def_bool y
  303. depends on X86_32 && !M386
  304. config X86_BSWAP
  305. def_bool y
  306. depends on X86_32 && !M386
  307. config X86_POPAD_OK
  308. def_bool y
  309. depends on X86_32 && !M386
  310. config X86_ALIGNMENT_16
  311. def_bool y
  312. depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1
  313. config X86_INTEL_USERCOPY
  314. def_bool y
  315. depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2
  316. config X86_USE_PPRO_CHECKSUM
  317. def_bool y
  318. depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MEFFICEON || MGEODE_LX || MCORE2
  319. config X86_USE_3DNOW
  320. def_bool y
  321. depends on (MCYRIXIII || MK7 || MGEODE_LX) && !UML
  322. config X86_OOSTORE
  323. def_bool y
  324. depends on (MWINCHIP3D || MWINCHIP2 || MWINCHIPC6) && MTRR
  325. #
  326. # P6_NOPs are a relatively minor optimization that require a family >=
  327. # 6 processor, except that it is broken on certain VIA chips.
  328. # Furthermore, AMD chips prefer a totally different sequence of NOPs
  329. # (which work on all CPUs). In addition, it looks like Virtual PC
  330. # does not understand them.
  331. #
  332. # As a result, disallow these if we're not compiling for X86_64 (these
  333. # NOPs do work on all x86-64 capable chips); the list of processors in
  334. # the right-hand clause are the cores that benefit from this optimization.
  335. #
  336. config X86_P6_NOP
  337. def_bool y
  338. depends on X86_64
  339. depends on (MCORE2 || MPENTIUM4 || MPSC)
  340. config X86_TSC
  341. def_bool y
  342. depends on ((MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2) && !X86_NUMAQ) || X86_64
  343. config X86_CMPXCHG64
  344. def_bool y
  345. depends on X86_PAE || X86_64
  346. # this should be set for all -march=.. options where the compiler
  347. # generates cmov.
  348. config X86_CMOV
  349. def_bool y
  350. depends on (MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || X86_64)
  351. config X86_MINIMUM_CPU_FAMILY
  352. int
  353. default "64" if X86_64
  354. default "6" if X86_32 && X86_P6_NOP
  355. default "4" if X86_32 && (X86_XADD || X86_CMPXCHG || X86_BSWAP || X86_WP_WORKS_OK)
  356. default "3"
  357. config X86_DEBUGCTLMSR
  358. def_bool y
  359. depends on !(MK6 || MWINCHIPC6 || MWINCHIP2 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486 || M386)
  360. config X86_DS
  361. bool "Debug Store support"
  362. default y
  363. help
  364. Add support for Debug Store.
  365. This allows the kernel to provide a memory buffer to the hardware
  366. to store various profiling and tracing events.
  367. config X86_PTRACE_BTS
  368. bool "ptrace interface to Branch Trace Store"
  369. default y
  370. depends on (X86_DS && X86_DEBUGCTLMSR)
  371. help
  372. Add a ptrace interface to allow collecting an execution trace
  373. of the traced task.
  374. This collects control flow changes in a (cyclic) buffer and allows
  375. debuggers to fill in the gaps and show an execution trace of the debuggee.