aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2005-10-30 18:00:07 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-30 20:37:16 -0500
commit96d55b882b85b26711a06d8fb2c901df9d52a48b (patch)
tree309b8993ad321c050411a8dd74729180488a5dcc /arch/i386
parentf3ac9fbf7a0b9493377ee88d9b5b2933ff3f7ade (diff)
[PATCH] uml: reuse i386 cpu-specific tuning
Make UML share the underlying cpu-specific tuning done on i386. Actually, for now many config options aren't used a lot - but that can be done later. Also, UML relies on GCC optimization for things like memcpy and such more than i386, so specifying the correct -march and -mtune should be enough. Later, we may want to correct some other stuff. For instance, since FPU context switching, for us, is done (at least partially, i.e. between our kernelspace and userspace) by the host, we may allow usage of FPU operations by GCC. This doesn't hold for kernelspace vs. kernelspace, but we don't support preemption. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/Kconfig309
-rw-r--r--arch/i386/Kconfig.cpu309
-rw-r--r--arch/i386/Makefile31
-rw-r--r--arch/i386/Makefile.cpu33
4 files changed, 345 insertions, 337 deletions
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index 35d3cff30057..5383e5e2d9b7 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -155,309 +155,7 @@ config ES7000_CLUSTERED_APIC
155 default y 155 default y
156 depends on SMP && X86_ES7000 && MPENTIUMIII 156 depends on SMP && X86_ES7000 && MPENTIUMIII
157 157
158if !X86_ELAN 158source "arch/i386/Kconfig.cpu"
159
160choice
161 prompt "Processor family"
162 default M686
163
164config M386
165 bool "386"
166 ---help---
167 This is the processor type of your CPU. This information is used for
168 optimizing purposes. In order to compile a kernel that can run on
169 all x86 CPU types (albeit not optimally fast), you can specify
170 "386" here.
171
172 The kernel will not necessarily run on earlier architectures than
173 the one you have chosen, e.g. a Pentium optimized kernel will run on
174 a PPro, but not necessarily on a i486.
175
176 Here are the settings recommended for greatest speed:
177 - "386" for the AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI
178 486DLC/DLC2, UMC 486SX-S and NexGen Nx586. Only "386" kernels
179 will run on a 386 class machine.
180 - "486" for the AMD/Cyrix/IBM/Intel 486DX/DX2/DX4 or
181 SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S.
182 - "586" for generic Pentium CPUs lacking the TSC
183 (time stamp counter) register.
184 - "Pentium-Classic" for the Intel Pentium.
185 - "Pentium-MMX" for the Intel Pentium MMX.
186 - "Pentium-Pro" for the Intel Pentium Pro.
187 - "Pentium-II" for the Intel Pentium II or pre-Coppermine Celeron.
188 - "Pentium-III" for the Intel Pentium III or Coppermine Celeron.
189 - "Pentium-4" for the Intel Pentium 4 or P4-based Celeron.
190 - "K6" for the AMD K6, K6-II and K6-III (aka K6-3D).
191 - "Athlon" for the AMD K7 family (Athlon/Duron/Thunderbird).
192 - "Crusoe" for the Transmeta Crusoe series.
193 - "Efficeon" for the Transmeta Efficeon series.
194 - "Winchip-C6" for original IDT Winchip.
195 - "Winchip-2" for IDT Winchip 2.
196 - "Winchip-2A" for IDT Winchips with 3dNow! capabilities.
197 - "GeodeGX1" for Geode GX1 (Cyrix MediaGX).
198 - "CyrixIII/VIA C3" for VIA Cyrix III or VIA C3.
199 - "VIA C3-2 for VIA C3-2 "Nehemiah" (model 9 and above).
200
201 If you don't know what to do, choose "386".
202
203config M486
204 bool "486"
205 help
206 Select this for a 486 series processor, either Intel or one of the
207 compatible processors from AMD, Cyrix, IBM, or Intel. Includes DX,
208 DX2, and DX4 variants; also SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or
209 U5S.
210
211config M586
212 bool "586/K5/5x86/6x86/6x86MX"
213 help
214 Select this for an 586 or 686 series processor such as the AMD K5,
215 the Cyrix 5x86, 6x86 and 6x86MX. This choice does not
216 assume the RDTSC (Read Time Stamp Counter) instruction.
217
218config M586TSC
219 bool "Pentium-Classic"
220 help
221 Select this for a Pentium Classic processor with the RDTSC (Read
222 Time Stamp Counter) instruction for benchmarking.
223
224config M586MMX
225 bool "Pentium-MMX"
226 help
227 Select this for a Pentium with the MMX graphics/multimedia
228 extended instructions.
229
230config M686
231 bool "Pentium-Pro"
232 help
233 Select this for Intel Pentium Pro chips. This enables the use of
234 Pentium Pro extended instructions, and disables the init-time guard
235 against the f00f bug found in earlier Pentiums.
236
237config MPENTIUMII
238 bool "Pentium-II/Celeron(pre-Coppermine)"
239 help
240 Select this for Intel chips based on the Pentium-II and
241 pre-Coppermine Celeron core. This option enables an unaligned
242 copy optimization, compiles the kernel with optimization flags
243 tailored for the chip, and applies any applicable Pentium Pro
244 optimizations.
245
246config MPENTIUMIII
247 bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon"
248 help
249 Select this for Intel chips based on the Pentium-III and
250 Celeron-Coppermine core. This option enables use of some
251 extended prefetch instructions in addition to the Pentium II
252 extensions.
253
254config MPENTIUMM
255 bool "Pentium M"
256 help
257 Select this for Intel Pentium M (not Pentium-4 M)
258 notebook chips.
259
260config MPENTIUM4
261 bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/Xeon"
262 help
263 Select this for Intel Pentium 4 chips. This includes the
264 Pentium 4, P4-based Celeron and Xeon, and Pentium-4 M
265 (not Pentium M) chips. This option enables compile flags
266 optimized for the chip, uses the correct cache shift, and
267 applies any applicable Pentium III optimizations.
268
269config MK6
270 bool "K6/K6-II/K6-III"
271 help
272 Select this for an AMD K6-family processor. Enables use of
273 some extended instructions, and passes appropriate optimization
274 flags to GCC.
275
276config MK7
277 bool "Athlon/Duron/K7"
278 help
279 Select this for an AMD Athlon K7-family processor. Enables use of
280 some extended instructions, and passes appropriate optimization
281 flags to GCC.
282
283config MK8
284 bool "Opteron/Athlon64/Hammer/K8"
285 help
286 Select this for an AMD Opteron or Athlon64 Hammer-family processor. Enables
287 use of some extended instructions, and passes appropriate optimization
288 flags to GCC.
289
290config MCRUSOE
291 bool "Crusoe"
292 help
293 Select this for a Transmeta Crusoe processor. Treats the processor
294 like a 586 with TSC, and sets some GCC optimization flags (like a
295 Pentium Pro with no alignment requirements).
296
297config MEFFICEON
298 bool "Efficeon"
299 help
300 Select this for a Transmeta Efficeon processor.
301
302config MWINCHIPC6
303 bool "Winchip-C6"
304 help
305 Select this for an IDT Winchip C6 chip. Linux and GCC
306 treat this chip as a 586TSC with some extended instructions
307 and alignment requirements.
308
309config MWINCHIP2
310 bool "Winchip-2"
311 help
312 Select this for an IDT Winchip-2. Linux and GCC
313 treat this chip as a 586TSC with some extended instructions
314 and alignment requirements.
315
316config MWINCHIP3D
317 bool "Winchip-2A/Winchip-3"
318 help
319 Select this for an IDT Winchip-2A or 3. Linux and GCC
320 treat this chip as a 586TSC with some extended instructions
321 and alignment reqirements. Also enable out of order memory
322 stores for this CPU, which can increase performance of some
323 operations.
324
325config MGEODEGX1
326 bool "GeodeGX1"
327 help
328 Select this for a Geode GX1 (Cyrix MediaGX) chip.
329
330config MCYRIXIII
331 bool "CyrixIII/VIA-C3"
332 help
333 Select this for a Cyrix III or C3 chip. Presently Linux and GCC
334 treat this chip as a generic 586. Whilst the CPU is 686 class,
335 it lacks the cmov extension which gcc assumes is present when
336 generating 686 code.
337 Note that Nehemiah (Model 9) and above will not boot with this
338 kernel due to them lacking the 3DNow! instructions used in earlier
339 incarnations of the CPU.
340
341config MVIAC3_2
342 bool "VIA C3-2 (Nehemiah)"
343 help
344 Select this for a VIA C3 "Nehemiah". Selecting this enables usage
345 of SSE and tells gcc to treat the CPU as a 686.
346 Note, this kernel will not boot on older (pre model 9) C3s.
347
348endchoice
349
350config X86_GENERIC
351 bool "Generic x86 support"
352 help
353 Instead of just including optimizations for the selected
354 x86 variant (e.g. PII, Crusoe or Athlon), include some more
355 generic optimizations as well. This will make the kernel
356 perform better on x86 CPUs other than that selected.
357
358 This is really intended for distributors who need more
359 generic optimizations.
360
361endif
362
363#
364# Define implied options from the CPU selection here
365#
366config X86_CMPXCHG
367 bool
368 depends on !M386
369 default y
370
371config X86_XADD
372 bool
373 depends on !M386
374 default y
375
376config X86_L1_CACHE_SHIFT
377 int
378 default "7" if MPENTIUM4 || X86_GENERIC
379 default "4" if X86_ELAN || M486 || M386
380 default "5" if MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODEGX1
381 default "6" if MK7 || MK8 || MPENTIUMM
382
383config RWSEM_GENERIC_SPINLOCK
384 bool
385 depends on M386
386 default y
387
388config RWSEM_XCHGADD_ALGORITHM
389 bool
390 depends on !M386
391 default y
392
393config GENERIC_CALIBRATE_DELAY
394 bool
395 default y
396
397config X86_PPRO_FENCE
398 bool
399 depends on M686 || M586MMX || M586TSC || M586 || M486 || M386 || MGEODEGX1
400 default y
401
402config X86_F00F_BUG
403 bool
404 depends on M586MMX || M586TSC || M586 || M486 || M386
405 default y
406
407config X86_WP_WORKS_OK
408 bool
409 depends on !M386
410 default y
411
412config X86_INVLPG
413 bool
414 depends on !M386
415 default y
416
417config X86_BSWAP
418 bool
419 depends on !M386
420 default y
421
422config X86_POPAD_OK
423 bool
424 depends on !M386
425 default y
426
427config X86_CMPXCHG64
428 bool
429 depends on !M386 && !M486
430 default y
431
432config X86_ALIGNMENT_16
433 bool
434 depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1
435 default y
436
437config X86_GOOD_APIC
438 bool
439 depends on MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || MK8 || MEFFICEON
440 default y
441
442config X86_INTEL_USERCOPY
443 bool
444 depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON
445 default y
446
447config X86_USE_PPRO_CHECKSUM
448 bool
449 depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MEFFICEON
450 default y
451
452config X86_USE_3DNOW
453 bool
454 depends on MCYRIXIII || MK7
455 default y
456
457config X86_OOSTORE
458 bool
459 depends on (MWINCHIP3D || MWINCHIP2 || MWINCHIPC6) && MTRR
460 default y
461 159
462config HPET_TIMER 160config HPET_TIMER
463 bool "HPET Timer Support" 161 bool "HPET Timer Support"
@@ -570,11 +268,6 @@ config X86_VISWS_APIC
570 depends on X86_VISWS 268 depends on X86_VISWS
571 default y 269 default y
572 270
573config X86_TSC
574 bool
575 depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MGEODEGX1) && !X86_NUMAQ
576 default y
577
578config X86_MCE 271config X86_MCE
579 bool "Machine Check Exception" 272 bool "Machine Check Exception"
580 depends on !X86_VOYAGER 273 depends on !X86_VOYAGER
diff --git a/arch/i386/Kconfig.cpu b/arch/i386/Kconfig.cpu
new file mode 100644
index 000000000000..53bbb3c008ee
--- /dev/null
+++ b/arch/i386/Kconfig.cpu
@@ -0,0 +1,309 @@
1# Put here option for CPU selection and depending optimization
2if !X86_ELAN
3
4choice
5 prompt "Processor family"
6 default M686
7
8config M386
9 bool "386"
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
16 The kernel will not necessarily run on earlier architectures than
17 the one you have chosen, e.g. a Pentium optimized kernel will run on
18 a PPro, but not necessarily on a i486.
19
20 Here are the settings recommended for greatest speed:
21 - "386" for the AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI
22 486DLC/DLC2, UMC 486SX-S and NexGen Nx586. Only "386" kernels
23 will run on a 386 class machine.
24 - "486" for the AMD/Cyrix/IBM/Intel 486DX/DX2/DX4 or
25 SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S.
26 - "586" for generic Pentium CPUs lacking the TSC
27 (time stamp counter) register.
28 - "Pentium-Classic" for the Intel Pentium.
29 - "Pentium-MMX" for the Intel Pentium MMX.
30 - "Pentium-Pro" for the Intel Pentium Pro.
31 - "Pentium-II" for the Intel Pentium II or pre-Coppermine Celeron.
32 - "Pentium-III" for the Intel Pentium III or Coppermine Celeron.
33 - "Pentium-4" for the Intel Pentium 4 or P4-based Celeron.
34 - "K6" for the AMD K6, K6-II and K6-III (aka K6-3D).
35 - "Athlon" for the AMD K7 family (Athlon/Duron/Thunderbird).
36 - "Crusoe" for the Transmeta Crusoe series.
37 - "Efficeon" for the Transmeta Efficeon series.
38 - "Winchip-C6" for original IDT Winchip.
39 - "Winchip-2" for IDT Winchip 2.
40 - "Winchip-2A" for IDT Winchips with 3dNow! capabilities.
41 - "GeodeGX1" for Geode GX1 (Cyrix MediaGX).
42 - "CyrixIII/VIA C3" for VIA Cyrix III or VIA C3.
43 - "VIA C3-2 for VIA C3-2 "Nehemiah" (model 9 and above).
44
45 If you don't know what to do, choose "386".
46
47config M486
48 bool "486"
49 help
50 Select this for a 486 series processor, either Intel or one of the
51 compatible processors from AMD, Cyrix, IBM, or Intel. Includes DX,
52 DX2, and DX4 variants; also SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or
53 U5S.
54
55config M586
56 bool "586/K5/5x86/6x86/6x86MX"
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
62config M586TSC
63 bool "Pentium-Classic"
64 help
65 Select this for a Pentium Classic processor with the RDTSC (Read
66 Time Stamp Counter) instruction for benchmarking.
67
68config M586MMX
69 bool "Pentium-MMX"
70 help
71 Select this for a Pentium with the MMX graphics/multimedia
72 extended instructions.
73
74config M686
75 bool "Pentium-Pro"
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
81config MPENTIUMII
82 bool "Pentium-II/Celeron(pre-Coppermine)"
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
90config MPENTIUMIII
91 bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon"
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
98config MPENTIUMM
99 bool "Pentium M"
100 help
101 Select this for Intel Pentium M (not Pentium-4 M)
102 notebook chips.
103
104config MPENTIUM4
105 bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/Xeon"
106 help
107 Select this for Intel Pentium 4 chips. This includes the
108 Pentium 4, P4-based Celeron and Xeon, and Pentium-4 M
109 (not Pentium M) chips. This option enables compile flags
110 optimized for the chip, uses the correct cache shift, and
111 applies any applicable Pentium III optimizations.
112
113config MK6
114 bool "K6/K6-II/K6-III"
115 help
116 Select this for an AMD K6-family processor. Enables use of
117 some extended instructions, and passes appropriate optimization
118 flags to GCC.
119
120config MK7
121 bool "Athlon/Duron/K7"
122 help
123 Select this for an AMD Athlon K7-family processor. Enables use of
124 some extended instructions, and passes appropriate optimization
125 flags to GCC.
126
127config MK8
128 bool "Opteron/Athlon64/Hammer/K8"
129 help
130 Select this for an AMD Opteron or Athlon64 Hammer-family processor. Enables
131 use of some extended instructions, and passes appropriate optimization
132 flags to GCC.
133
134config MCRUSOE
135 bool "Crusoe"
136 help
137 Select this for a Transmeta Crusoe processor. Treats the processor
138 like a 586 with TSC, and sets some GCC optimization flags (like a
139 Pentium Pro with no alignment requirements).
140
141config MEFFICEON
142 bool "Efficeon"
143 help
144 Select this for a Transmeta Efficeon processor.
145
146config MWINCHIPC6
147 bool "Winchip-C6"
148 help
149 Select this for an IDT Winchip C6 chip. Linux and GCC
150 treat this chip as a 586TSC with some extended instructions
151 and alignment requirements.
152
153config MWINCHIP2
154 bool "Winchip-2"
155 help
156 Select this for an IDT Winchip-2. Linux and GCC
157 treat this chip as a 586TSC with some extended instructions
158 and alignment requirements.
159
160config MWINCHIP3D
161 bool "Winchip-2A/Winchip-3"
162 help
163 Select this for an IDT Winchip-2A or 3. Linux and GCC
164 treat this chip as a 586TSC with some extended instructions
165 and alignment reqirements. Also enable out of order memory
166 stores for this CPU, which can increase performance of some
167 operations.
168
169config MGEODEGX1
170 bool "GeodeGX1"
171 help
172 Select this for a Geode GX1 (Cyrix MediaGX) chip.
173
174config MCYRIXIII
175 bool "CyrixIII/VIA-C3"
176 help
177 Select this for a Cyrix III or C3 chip. Presently Linux and GCC
178 treat this chip as a generic 586. Whilst the CPU is 686 class,
179 it lacks the cmov extension which gcc assumes is present when
180 generating 686 code.
181 Note that Nehemiah (Model 9) and above will not boot with this
182 kernel due to them lacking the 3DNow! instructions used in earlier
183 incarnations of the CPU.
184
185config MVIAC3_2
186 bool "VIA C3-2 (Nehemiah)"
187 help
188 Select this for a VIA C3 "Nehemiah". Selecting this enables usage
189 of SSE and tells gcc to treat the CPU as a 686.
190 Note, this kernel will not boot on older (pre model 9) C3s.
191
192endchoice
193
194config X86_GENERIC
195 bool "Generic x86 support"
196 help
197 Instead of just including optimizations for the selected
198 x86 variant (e.g. PII, Crusoe or Athlon), include some more
199 generic optimizations as well. This will make the kernel
200 perform better on x86 CPUs other than that selected.
201
202 This is really intended for distributors who need more
203 generic optimizations.
204
205endif
206
207#
208# Define implied options from the CPU selection here
209#
210config X86_CMPXCHG
211 bool
212 depends on !M386
213 default y
214
215config X86_XADD
216 bool
217 depends on !M386
218 default y
219
220config X86_L1_CACHE_SHIFT
221 int
222 default "7" if MPENTIUM4 || X86_GENERIC
223 default "4" if X86_ELAN || M486 || M386
224 default "5" if MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODEGX1
225 default "6" if MK7 || MK8 || MPENTIUMM
226
227config RWSEM_GENERIC_SPINLOCK
228 bool
229 depends on M386
230 default y
231
232config RWSEM_XCHGADD_ALGORITHM
233 bool
234 depends on !M386
235 default y
236
237config GENERIC_CALIBRATE_DELAY
238 bool
239 default y
240
241config X86_PPRO_FENCE
242 bool
243 depends on M686 || M586MMX || M586TSC || M586 || M486 || M386 || MGEODEGX1
244 default y
245
246config X86_F00F_BUG
247 bool
248 depends on M586MMX || M586TSC || M586 || M486 || M386
249 default y
250
251config X86_WP_WORKS_OK
252 bool
253 depends on !M386
254 default y
255
256config X86_INVLPG
257 bool
258 depends on !M386
259 default y
260
261config X86_BSWAP
262 bool
263 depends on !M386
264 default y
265
266config X86_POPAD_OK
267 bool
268 depends on !M386
269 default y
270
271config X86_CMPXCHG64
272 bool
273 depends on !M386 && !M486
274 default y
275
276config X86_ALIGNMENT_16
277 bool
278 depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1
279 default y
280
281config X86_GOOD_APIC
282 bool
283 depends on MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || MK8 || MEFFICEON
284 default y
285
286config X86_INTEL_USERCOPY
287 bool
288 depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON
289 default y
290
291config X86_USE_PPRO_CHECKSUM
292 bool
293 depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MEFFICEON
294 default y
295
296config X86_USE_3DNOW
297 bool
298 depends on MCYRIXIII || MK7
299 default y
300
301config X86_OOSTORE
302 bool
303 depends on (MWINCHIP3D || MWINCHIP2 || MWINCHIPC6) && MTRR
304 default y
305
306config X86_TSC
307 bool
308 depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MGEODEGX1) && !X86_NUMAQ
309 default y
diff --git a/arch/i386/Makefile b/arch/i386/Makefile
index 09951990a622..d121ea18460f 100644
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -34,35 +34,8 @@ CFLAGS += -pipe -msoft-float
34# prevent gcc from keeping the stack 16 byte aligned 34# prevent gcc from keeping the stack 16 byte aligned
35CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2) 35CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
36 36
37align := $(cc-option-align) 37# CPU-specific tuning. Anything which can be shared with UML should go here.
38cflags-$(CONFIG_M386) += -march=i386 38include $(srctree)/arch/i386/Makefile.cpu
39cflags-$(CONFIG_M486) += -march=i486
40cflags-$(CONFIG_M586) += -march=i586
41cflags-$(CONFIG_M586TSC) += -march=i586
42cflags-$(CONFIG_M586MMX) += $(call cc-option,-march=pentium-mmx,-march=i586)
43cflags-$(CONFIG_M686) += -march=i686
44cflags-$(CONFIG_MPENTIUMII) += -march=i686 $(call cc-option,-mtune=pentium2)
45cflags-$(CONFIG_MPENTIUMIII) += -march=i686 $(call cc-option,-mtune=pentium3)
46cflags-$(CONFIG_MPENTIUMM) += -march=i686 $(call cc-option,-mtune=pentium3)
47cflags-$(CONFIG_MPENTIUM4) += -march=i686 $(call cc-option,-mtune=pentium4)
48cflags-$(CONFIG_MK6) += -march=k6
49# Please note, that patches that add -march=athlon-xp and friends are pointless.
50# They make zero difference whatsosever to performance at this time.
51cflags-$(CONFIG_MK7) += $(call cc-option,-march=athlon,-march=i686 $(align)-functions=4)
52cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8,$(call cc-option,-march=athlon,-march=i686 $(align)-functions=4))
53cflags-$(CONFIG_MCRUSOE) += -march=i686 $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
54cflags-$(CONFIG_MEFFICEON) += -march=i686 $(call cc-option,-mtune=pentium3) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
55cflags-$(CONFIG_MWINCHIPC6) += $(call cc-option,-march=winchip-c6,-march=i586)
56cflags-$(CONFIG_MWINCHIP2) += $(call cc-option,-march=winchip2,-march=i586)
57cflags-$(CONFIG_MWINCHIP3D) += $(call cc-option,-march=winchip2,-march=i586)
58cflags-$(CONFIG_MCYRIXIII) += $(call cc-option,-march=c3,-march=i486) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
59cflags-$(CONFIG_MVIAC3_2) += $(call cc-option,-march=c3-2,-march=i686)
60
61# AMD Elan support
62cflags-$(CONFIG_X86_ELAN) += -march=i486
63
64# Geode GX1 support
65cflags-$(CONFIG_MGEODEGX1) += $(call cc-option,-march=pentium-mmx,-march=i486)
66 39
67# -mregparm=3 works ok on gcc-3.0 and later 40# -mregparm=3 works ok on gcc-3.0 and later
68# 41#
diff --git a/arch/i386/Makefile.cpu b/arch/i386/Makefile.cpu
new file mode 100644
index 000000000000..86c7bb1b95e5
--- /dev/null
+++ b/arch/i386/Makefile.cpu
@@ -0,0 +1,33 @@
1# CPU tuning section - shared with UML.
2# Must change only cflags-y (or [yn]), not CFLAGS! That makes a difference for UML.
3
4align := $(cc-option-align)
5cflags-$(CONFIG_M386) += -march=i386
6cflags-$(CONFIG_M486) += -march=i486
7cflags-$(CONFIG_M586) += -march=i586
8cflags-$(CONFIG_M586TSC) += -march=i586
9cflags-$(CONFIG_M586MMX) += $(call cc-option,-march=pentium-mmx,-march=i586)
10cflags-$(CONFIG_M686) += -march=i686
11cflags-$(CONFIG_MPENTIUMII) += -march=i686 $(call cc-option,-mtune=pentium2)
12cflags-$(CONFIG_MPENTIUMIII) += -march=i686 $(call cc-option,-mtune=pentium3)
13cflags-$(CONFIG_MPENTIUMM) += -march=i686 $(call cc-option,-mtune=pentium3)
14cflags-$(CONFIG_MPENTIUM4) += -march=i686 $(call cc-option,-mtune=pentium4)
15cflags-$(CONFIG_MK6) += -march=k6
16# Please note, that patches that add -march=athlon-xp and friends are pointless.
17# They make zero difference whatsosever to performance at this time.
18cflags-$(CONFIG_MK7) += $(call cc-option,-march=athlon,-march=i686 $(align)-functions=4)
19cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8,$(call cc-option,-march=athlon,-march=i686 $(align)-functions=4))
20cflags-$(CONFIG_MCRUSOE) += -march=i686 $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
21cflags-$(CONFIG_MEFFICEON) += -march=i686 $(call cc-option,-mtune=pentium3) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
22cflags-$(CONFIG_MWINCHIPC6) += $(call cc-option,-march=winchip-c6,-march=i586)
23cflags-$(CONFIG_MWINCHIP2) += $(call cc-option,-march=winchip2,-march=i586)
24cflags-$(CONFIG_MWINCHIP3D) += $(call cc-option,-march=winchip2,-march=i586)
25cflags-$(CONFIG_MCYRIXIII) += $(call cc-option,-march=c3,-march=i486) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
26cflags-$(CONFIG_MVIAC3_2) += $(call cc-option,-march=c3-2,-march=i686)
27
28# AMD Elan support
29cflags-$(CONFIG_X86_ELAN) += -march=i486
30
31# Geode GX1 support
32cflags-$(CONFIG_MGEODEGX1) += $(call cc-option,-march=pentium-mmx,-march=i486)
33