diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2007-11-06 15:35:08 -0500 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2007-11-12 15:02:19 -0500 |
commit | 1032c0ba9da5c5b53173ad2dcf8b2a2da78f8b17 (patch) | |
tree | 3477a72cf0a0c0a04540826b54e12afe45eb8ac6 /arch/x86/Kconfig.cpu | |
parent | e279b6c1d329e50b766bce96aacc197eae8a053b (diff) |
x86: arch/x86/Kconfig.cpu unification
Move all CPU definitions to Kconfig.cpu
Always define X86_MINIMUM_CPU_FAMILY and do the
obvious code cleanup in boot/cpucheck.c
Comments from: Adrian Bunk <bunk@kernel.org> incorporated.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Adrian Bunk <bunk@kernel.org>
Cc: Brian Gerst <bgerst@didntduck.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Diffstat (limited to 'arch/x86/Kconfig.cpu')
-rw-r--r-- | arch/x86/Kconfig.cpu | 121 |
1 files changed, 75 insertions, 46 deletions
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu index 0e2adadf5905..c30162202dc4 100644 --- a/arch/x86/Kconfig.cpu +++ b/arch/x86/Kconfig.cpu | |||
@@ -3,11 +3,12 @@ if !X86_ELAN | |||
3 | 3 | ||
4 | choice | 4 | choice |
5 | prompt "Processor family" | 5 | prompt "Processor family" |
6 | default M686 | 6 | default M686 if X86_32 |
7 | default GENERIC_CPU if X86_64 | ||
7 | 8 | ||
8 | config M386 | 9 | config M386 |
9 | bool "386" | 10 | bool "386" |
10 | depends on !UML | 11 | depends on X86_32 && !UML |
11 | ---help--- | 12 | ---help--- |
12 | This is the processor type of your CPU. This information is used for | 13 | This is the processor type of your CPU. This information is used for |
13 | optimizing purposes. In order to compile a kernel that can run on | 14 | optimizing purposes. In order to compile a kernel that can run on |
@@ -49,6 +50,7 @@ config M386 | |||
49 | 50 | ||
50 | config M486 | 51 | config M486 |
51 | bool "486" | 52 | bool "486" |
53 | depends on X86_32 | ||
52 | help | 54 | help |
53 | Select this for a 486 series processor, either Intel or one of the | 55 | Select this for a 486 series processor, either Intel or one of the |
54 | compatible processors from AMD, Cyrix, IBM, or Intel. Includes DX, | 56 | compatible processors from AMD, Cyrix, IBM, or Intel. Includes DX, |
@@ -57,6 +59,7 @@ config M486 | |||
57 | 59 | ||
58 | config M586 | 60 | config M586 |
59 | bool "586/K5/5x86/6x86/6x86MX" | 61 | bool "586/K5/5x86/6x86/6x86MX" |
62 | depends on X86_32 | ||
60 | help | 63 | help |
61 | Select this for an 586 or 686 series processor such as the AMD K5, | 64 | Select this for an 586 or 686 series processor such as the AMD K5, |
62 | the Cyrix 5x86, 6x86 and 6x86MX. This choice does not | 65 | the Cyrix 5x86, 6x86 and 6x86MX. This choice does not |
@@ -64,18 +67,21 @@ config M586 | |||
64 | 67 | ||
65 | config M586TSC | 68 | config M586TSC |
66 | bool "Pentium-Classic" | 69 | bool "Pentium-Classic" |
70 | depends on X86_32 | ||
67 | help | 71 | help |
68 | Select this for a Pentium Classic processor with the RDTSC (Read | 72 | Select this for a Pentium Classic processor with the RDTSC (Read |
69 | Time Stamp Counter) instruction for benchmarking. | 73 | Time Stamp Counter) instruction for benchmarking. |
70 | 74 | ||
71 | config M586MMX | 75 | config M586MMX |
72 | bool "Pentium-MMX" | 76 | bool "Pentium-MMX" |
77 | depends on X86_32 | ||
73 | help | 78 | help |
74 | Select this for a Pentium with the MMX graphics/multimedia | 79 | Select this for a Pentium with the MMX graphics/multimedia |
75 | extended instructions. | 80 | extended instructions. |
76 | 81 | ||
77 | config M686 | 82 | config M686 |
78 | bool "Pentium-Pro" | 83 | bool "Pentium-Pro" |
84 | depends on X86_32 | ||
79 | help | 85 | help |
80 | Select this for Intel Pentium Pro chips. This enables the use of | 86 | Select this for Intel Pentium Pro chips. This enables the use of |
81 | Pentium Pro extended instructions, and disables the init-time guard | 87 | Pentium Pro extended instructions, and disables the init-time guard |
@@ -83,6 +89,7 @@ config M686 | |||
83 | 89 | ||
84 | config MPENTIUMII | 90 | config MPENTIUMII |
85 | bool "Pentium-II/Celeron(pre-Coppermine)" | 91 | bool "Pentium-II/Celeron(pre-Coppermine)" |
92 | depends on X86_32 | ||
86 | help | 93 | help |
87 | Select this for Intel chips based on the Pentium-II and | 94 | Select this for Intel chips based on the Pentium-II and |
88 | pre-Coppermine Celeron core. This option enables an unaligned | 95 | pre-Coppermine Celeron core. This option enables an unaligned |
@@ -92,6 +99,7 @@ config MPENTIUMII | |||
92 | 99 | ||
93 | config MPENTIUMIII | 100 | config MPENTIUMIII |
94 | bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon" | 101 | bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon" |
102 | depends on X86_32 | ||
95 | help | 103 | help |
96 | Select this for Intel chips based on the Pentium-III and | 104 | Select this for Intel chips based on the Pentium-III and |
97 | Celeron-Coppermine core. This option enables use of some | 105 | Celeron-Coppermine core. This option enables use of some |
@@ -100,19 +108,14 @@ config MPENTIUMIII | |||
100 | 108 | ||
101 | config MPENTIUMM | 109 | config MPENTIUMM |
102 | bool "Pentium M" | 110 | bool "Pentium M" |
111 | depends on X86_32 | ||
103 | help | 112 | help |
104 | Select this for Intel Pentium M (not Pentium-4 M) | 113 | Select this for Intel Pentium M (not Pentium-4 M) |
105 | notebook chips. | 114 | notebook chips. |
106 | 115 | ||
107 | config MCORE2 | ||
108 | bool "Core 2/newer Xeon" | ||
109 | help | ||
110 | Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and 53xx) | ||
111 | CPUs. You can distinguish newer from older Xeons by the CPU family | ||
112 | in /proc/cpuinfo. Newer ones have 6 and older ones 15 (not a typo) | ||
113 | |||
114 | config MPENTIUM4 | 116 | config MPENTIUM4 |
115 | bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon" | 117 | bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon" |
118 | depends on X86_32 | ||
116 | help | 119 | help |
117 | Select this for Intel Pentium 4 chips. This includes the | 120 | Select this for Intel Pentium 4 chips. This includes the |
118 | Pentium 4, Pentium D, P4-based Celeron and Xeon, and | 121 | Pentium 4, Pentium D, P4-based Celeron and Xeon, and |
@@ -148,6 +151,7 @@ config MPENTIUM4 | |||
148 | 151 | ||
149 | config MK6 | 152 | config MK6 |
150 | bool "K6/K6-II/K6-III" | 153 | bool "K6/K6-II/K6-III" |
154 | depends on X86_32 | ||
151 | help | 155 | help |
152 | Select this for an AMD K6-family processor. Enables use of | 156 | Select this for an AMD K6-family processor. Enables use of |
153 | some extended instructions, and passes appropriate optimization | 157 | some extended instructions, and passes appropriate optimization |
@@ -155,6 +159,7 @@ config MK6 | |||
155 | 159 | ||
156 | config MK7 | 160 | config MK7 |
157 | bool "Athlon/Duron/K7" | 161 | bool "Athlon/Duron/K7" |
162 | depends on X86_32 | ||
158 | help | 163 | help |
159 | Select this for an AMD Athlon K7-family processor. Enables use of | 164 | Select this for an AMD Athlon K7-family processor. Enables use of |
160 | some extended instructions, and passes appropriate optimization | 165 | some extended instructions, and passes appropriate optimization |
@@ -169,6 +174,7 @@ config MK8 | |||
169 | 174 | ||
170 | config MCRUSOE | 175 | config MCRUSOE |
171 | bool "Crusoe" | 176 | bool "Crusoe" |
177 | depends on X86_32 | ||
172 | help | 178 | help |
173 | Select this for a Transmeta Crusoe processor. Treats the processor | 179 | Select this for a Transmeta Crusoe processor. Treats the processor |
174 | like a 586 with TSC, and sets some GCC optimization flags (like a | 180 | like a 586 with TSC, and sets some GCC optimization flags (like a |
@@ -176,11 +182,13 @@ config MCRUSOE | |||
176 | 182 | ||
177 | config MEFFICEON | 183 | config MEFFICEON |
178 | bool "Efficeon" | 184 | bool "Efficeon" |
185 | depends on X86_32 | ||
179 | help | 186 | help |
180 | Select this for a Transmeta Efficeon processor. | 187 | Select this for a Transmeta Efficeon processor. |
181 | 188 | ||
182 | config MWINCHIPC6 | 189 | config MWINCHIPC6 |
183 | bool "Winchip-C6" | 190 | bool "Winchip-C6" |
191 | depends on X86_32 | ||
184 | help | 192 | help |
185 | Select this for an IDT Winchip C6 chip. Linux and GCC | 193 | Select this for an IDT Winchip C6 chip. Linux and GCC |
186 | treat this chip as a 586TSC with some extended instructions | 194 | treat this chip as a 586TSC with some extended instructions |
@@ -188,6 +196,7 @@ config MWINCHIPC6 | |||
188 | 196 | ||
189 | config MWINCHIP2 | 197 | config MWINCHIP2 |
190 | bool "Winchip-2" | 198 | bool "Winchip-2" |
199 | depends on X86_32 | ||
191 | help | 200 | help |
192 | Select this for an IDT Winchip-2. Linux and GCC | 201 | Select this for an IDT Winchip-2. Linux and GCC |
193 | treat this chip as a 586TSC with some extended instructions | 202 | treat this chip as a 586TSC with some extended instructions |
@@ -195,6 +204,7 @@ config MWINCHIP2 | |||
195 | 204 | ||
196 | config MWINCHIP3D | 205 | config MWINCHIP3D |
197 | bool "Winchip-2A/Winchip-3" | 206 | bool "Winchip-2A/Winchip-3" |
207 | depends on X86_32 | ||
198 | help | 208 | help |
199 | Select this for an IDT Winchip-2A or 3. Linux and GCC | 209 | Select this for an IDT Winchip-2A or 3. Linux and GCC |
200 | treat this chip as a 586TSC with some extended instructions | 210 | treat this chip as a 586TSC with some extended instructions |
@@ -204,16 +214,19 @@ config MWINCHIP3D | |||
204 | 214 | ||
205 | config MGEODEGX1 | 215 | config MGEODEGX1 |
206 | bool "GeodeGX1" | 216 | bool "GeodeGX1" |
217 | depends on X86_32 | ||
207 | help | 218 | help |
208 | Select this for a Geode GX1 (Cyrix MediaGX) chip. | 219 | Select this for a Geode GX1 (Cyrix MediaGX) chip. |
209 | 220 | ||
210 | config MGEODE_LX | 221 | config MGEODE_LX |
211 | bool "Geode GX/LX" | 222 | bool "Geode GX/LX" |
223 | depends on X86_32 | ||
212 | help | 224 | help |
213 | Select this for AMD Geode GX and LX processors. | 225 | Select this for AMD Geode GX and LX processors. |
214 | 226 | ||
215 | config MCYRIXIII | 227 | config MCYRIXIII |
216 | bool "CyrixIII/VIA-C3" | 228 | bool "CyrixIII/VIA-C3" |
229 | depends on X86_32 | ||
217 | help | 230 | help |
218 | Select this for a Cyrix III or C3 chip. Presently Linux and GCC | 231 | Select this for a Cyrix III or C3 chip. Presently Linux and GCC |
219 | treat this chip as a generic 586. Whilst the CPU is 686 class, | 232 | treat this chip as a generic 586. Whilst the CPU is 686 class, |
@@ -225,6 +238,7 @@ config MCYRIXIII | |||
225 | 238 | ||
226 | config MVIAC3_2 | 239 | config MVIAC3_2 |
227 | bool "VIA C3-2 (Nehemiah)" | 240 | bool "VIA C3-2 (Nehemiah)" |
241 | depends on X86_32 | ||
228 | help | 242 | help |
229 | Select this for a VIA C3 "Nehemiah". Selecting this enables usage | 243 | Select this for a VIA C3 "Nehemiah". Selecting this enables usage |
230 | of SSE and tells gcc to treat the CPU as a 686. | 244 | of SSE and tells gcc to treat the CPU as a 686. |
@@ -232,15 +246,42 @@ config MVIAC3_2 | |||
232 | 246 | ||
233 | config MVIAC7 | 247 | config MVIAC7 |
234 | bool "VIA C7" | 248 | bool "VIA C7" |
249 | depends on X86_32 | ||
235 | help | 250 | help |
236 | Select this for a VIA C7. Selecting this uses the correct cache | 251 | Select this for a VIA C7. Selecting this uses the correct cache |
237 | shift and tells gcc to treat the CPU as a 686. | 252 | shift and tells gcc to treat the CPU as a 686. |
238 | 253 | ||
254 | config MPSC | ||
255 | bool "Intel P4 / older Netburst based Xeon" | ||
256 | depends on X86_64 | ||
257 | help | ||
258 | Optimize for Intel Pentium 4, Pentium D and older Nocona/Dempsey | ||
259 | Xeon CPUs with Intel 64bit which is compatible with x86-64. | ||
260 | Note that the latest Xeons (Xeon 51xx and 53xx) are not based on the | ||
261 | Netburst core and shouldn't use this option. You can distinguish them | ||
262 | using the cpu family field | ||
263 | in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one. | ||
264 | |||
265 | config MCORE2 | ||
266 | bool "Core 2/newer Xeon" | ||
267 | help | ||
268 | Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and 53xx) | ||
269 | CPUs. You can distinguish newer from older Xeons by the CPU family | ||
270 | in /proc/cpuinfo. Newer ones have 6 and older ones 15 (not a typo) | ||
271 | |||
272 | config GENERIC_CPU | ||
273 | bool "Generic-x86-64" | ||
274 | depends on X86_64 | ||
275 | help | ||
276 | Generic x86-64 CPU. | ||
277 | Run equally well on all x86-64 CPUs. | ||
278 | |||
239 | endchoice | 279 | endchoice |
240 | 280 | ||
241 | config X86_GENERIC | 281 | config X86_GENERIC |
242 | bool "Generic x86 support" | 282 | bool "Generic x86 support" |
243 | help | 283 | depends on X86_32 |
284 | help | ||
244 | Instead of just including optimizations for the selected | 285 | Instead of just including optimizations for the selected |
245 | x86 variant (e.g. PII, Crusoe or Athlon), include some more | 286 | x86 variant (e.g. PII, Crusoe or Athlon), include some more |
246 | generic optimizations as well. This will make the kernel | 287 | generic optimizations as well. This will make the kernel |
@@ -253,44 +294,31 @@ endif | |||
253 | 294 | ||
254 | # | 295 | # |
255 | # Define implied options from the CPU selection here | 296 | # Define implied options from the CPU selection here |
256 | # | 297 | config X86_L1_CACHE_BYTES |
298 | int | ||
299 | default "128" if GENERIC_CPU || MPSC | ||
300 | default "64" if MK8 || MCORE2 | ||
301 | depends on X86_64 | ||
302 | |||
303 | config X86_INTERNODE_CACHE_BYTES | ||
304 | int | ||
305 | default "4096" if X86_VSMP | ||
306 | default X86_L1_CACHE_BYTES if !X86_VSMP | ||
307 | depends on X86_64 | ||
308 | |||
257 | config X86_CMPXCHG | 309 | config X86_CMPXCHG |
258 | bool | 310 | def_bool X86_64 || (X86_32 && !M386) |
259 | depends on !M386 | ||
260 | default y | ||
261 | 311 | ||
262 | config X86_L1_CACHE_SHIFT | 312 | config X86_L1_CACHE_SHIFT |
263 | int | 313 | int |
264 | default "7" if MPENTIUM4 || X86_GENERIC | 314 | default "7" if MPENTIUM4 || X86_GENERIC || GENERIC_CPU || MPSC |
265 | default "4" if X86_ELAN || M486 || M386 || MGEODEGX1 | 315 | default "4" if X86_ELAN || M486 || M386 || MGEODEGX1 |
266 | default "5" if MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX | 316 | default "5" if MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX |
267 | default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MVIAC7 | 317 | default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MVIAC7 |
268 | 318 | ||
269 | config X86_XADD | 319 | config X86_XADD |
270 | bool | 320 | bool |
271 | depends on !M386 | 321 | depends on X86_32 && !M386 |
272 | default y | ||
273 | |||
274 | config RWSEM_GENERIC_SPINLOCK | ||
275 | bool | ||
276 | depends on !X86_XADD | ||
277 | default y | ||
278 | |||
279 | config RWSEM_XCHGADD_ALGORITHM | ||
280 | bool | ||
281 | depends on X86_XADD | ||
282 | default y | ||
283 | |||
284 | config ARCH_HAS_ILOG2_U32 | ||
285 | bool | ||
286 | default n | ||
287 | |||
288 | config ARCH_HAS_ILOG2_U64 | ||
289 | bool | ||
290 | default n | ||
291 | |||
292 | config GENERIC_CALIBRATE_DELAY | ||
293 | bool | ||
294 | default y | 322 | default y |
295 | 323 | ||
296 | config X86_PPRO_FENCE | 324 | config X86_PPRO_FENCE |
@@ -305,22 +333,22 @@ config X86_F00F_BUG | |||
305 | 333 | ||
306 | config X86_WP_WORKS_OK | 334 | config X86_WP_WORKS_OK |
307 | bool | 335 | bool |
308 | depends on !M386 | 336 | depends on X86_32 && !M386 |
309 | default y | 337 | default y |
310 | 338 | ||
311 | config X86_INVLPG | 339 | config X86_INVLPG |
312 | bool | 340 | bool |
313 | depends on !M386 | 341 | depends on X86_32 && !M386 |
314 | default y | 342 | default y |
315 | 343 | ||
316 | config X86_BSWAP | 344 | config X86_BSWAP |
317 | bool | 345 | bool |
318 | depends on !M386 | 346 | depends on X86_32 && !M386 |
319 | default y | 347 | default y |
320 | 348 | ||
321 | config X86_POPAD_OK | 349 | config X86_POPAD_OK |
322 | bool | 350 | bool |
323 | depends on !M386 | 351 | depends on X86_32 && !M386 |
324 | default y | 352 | default y |
325 | 353 | ||
326 | config X86_ALIGNMENT_16 | 354 | config X86_ALIGNMENT_16 |
@@ -330,7 +358,7 @@ config X86_ALIGNMENT_16 | |||
330 | 358 | ||
331 | config X86_GOOD_APIC | 359 | config X86_GOOD_APIC |
332 | bool | 360 | bool |
333 | depends on MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || MK8 || MEFFICEON || MCORE2 || MVIAC7 | 361 | depends on MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || MK8 || MEFFICEON || MCORE2 || MVIAC7 || X86_64 |
334 | default y | 362 | default y |
335 | 363 | ||
336 | config X86_INTEL_USERCOPY | 364 | config X86_INTEL_USERCOPY |
@@ -355,7 +383,7 @@ config X86_OOSTORE | |||
355 | 383 | ||
356 | config X86_TSC | 384 | config X86_TSC |
357 | bool | 385 | bool |
358 | 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 | 386 | 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 |
359 | default y | 387 | default y |
360 | 388 | ||
361 | # this should be set for all -march=.. options where the compiler | 389 | # this should be set for all -march=.. options where the compiler |
@@ -367,6 +395,7 @@ config X86_CMOV | |||
367 | 395 | ||
368 | config X86_MINIMUM_CPU_FAMILY | 396 | config X86_MINIMUM_CPU_FAMILY |
369 | int | 397 | int |
370 | default "4" if X86_XADD || X86_CMPXCHG || X86_BSWAP || X86_WP_WORKS_OK | 398 | default "64" if X86_64 |
399 | default "4" if X86_32 && (X86_XADD || X86_CMPXCHG || X86_BSWAP || X86_WP_WORKS_OK) | ||
371 | default "3" | 400 | default "3" |
372 | 401 | ||