diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2008-08-05 05:45:19 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-18 10:05:48 -0400 |
commit | 8d02c2110b3fb8e2700b31596a582a2989fd72ba (patch) | |
tree | c56374a7151020a580504a6fd8669cea9b7d629a /arch/x86 | |
parent | 774400a3ba23b63f4de39e67ce6c4e48935809dc (diff) |
x86: configuration options to compile out x86 CPU support code
This patch adds some configuration options that allow to compile out
CPU vendor-specific code in x86 kernels (in arch/x86/kernel/cpu). The
new configuration options are only visible when CONFIG_EMBEDDED is
selected, as they are mostly interesting for space savings reasons.
An example of size saving, on x86 with only Intel CPU support:
text data bss dec hex filename
1125479 118760 212992 1457231 163c4f vmlinux.old
1121355 116536 212992 1450883 162383 vmlinux
-4124 -2224 0 -6348 -18CC +/-
However, I'm not exactly sure that the Kconfig wording is correct with
regard to !64BIT / 64BIT.
[ mingo@elte.hu: convert macro to inline ]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/Kconfig.cpu | 70 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/Makefile | 19 |
2 files changed, 80 insertions, 9 deletions
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu index 2c518fbc52ec..6156ac25ff8c 100644 --- a/arch/x86/Kconfig.cpu +++ b/arch/x86/Kconfig.cpu | |||
@@ -415,3 +415,73 @@ config X86_MINIMUM_CPU_FAMILY | |||
415 | config X86_DEBUGCTLMSR | 415 | config X86_DEBUGCTLMSR |
416 | def_bool y | 416 | def_bool y |
417 | depends on !(MK6 || MWINCHIPC6 || MWINCHIP2 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486 || M386) | 417 | depends on !(MK6 || MWINCHIPC6 || MWINCHIP2 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486 || M386) |
418 | |||
419 | menuconfig PROCESSOR_SELECT | ||
420 | default y | ||
421 | bool "Supported processor vendors" if EMBEDDED | ||
422 | help | ||
423 | This lets you choose what x86 vendor support code your kernel | ||
424 | will include. | ||
425 | |||
426 | config CPU_SUP_INTEL_32 | ||
427 | default y | ||
428 | bool "Support Intel processors" if PROCESSOR_SELECT | ||
429 | depends on !64BIT | ||
430 | help | ||
431 | This enables extended support for Intel processors | ||
432 | |||
433 | config CPU_SUP_INTEL_64 | ||
434 | default y | ||
435 | bool "Support Intel processors" if PROCESSOR_SELECT | ||
436 | depends on 64BIT | ||
437 | help | ||
438 | This enables extended support for Intel processors | ||
439 | |||
440 | config CPU_SUP_CYRIX_32 | ||
441 | default y | ||
442 | bool "Support Cyrix processors" if PROCESSOR_SELECT | ||
443 | depends on !64BIT | ||
444 | help | ||
445 | This enables extended support for Cyrix processors | ||
446 | |||
447 | config CPU_SUP_AMD_32 | ||
448 | default y | ||
449 | bool "Support AMD processors" if PROCESSOR_SELECT | ||
450 | depends on !64BIT | ||
451 | help | ||
452 | This enables extended support for AMD processors | ||
453 | |||
454 | config CPU_SUP_AMD_64 | ||
455 | default y | ||
456 | bool "Support AMD processors" if PROCESSOR_SELECT | ||
457 | depends on 64BIT | ||
458 | help | ||
459 | This enables extended support for AMD processors | ||
460 | |||
461 | config CPU_SUP_CENTAUR_32 | ||
462 | default y | ||
463 | bool "Support Centaur processors" if PROCESSOR_SELECT | ||
464 | depends on !64BIT | ||
465 | help | ||
466 | This enables extended support for Centaur processors | ||
467 | |||
468 | config CPU_SUP_CENTAUR_64 | ||
469 | default y | ||
470 | bool "Support Centaur processors" if PROCESSOR_SELECT | ||
471 | depends on 64BIT | ||
472 | help | ||
473 | This enables extended support for Centaur processors | ||
474 | |||
475 | config CPU_SUP_TRANSMETA_32 | ||
476 | default y | ||
477 | bool "Support Transmeta processors" if PROCESSOR_SELECT | ||
478 | depends on !64BIT | ||
479 | help | ||
480 | This enables extended support for Transmeta processors | ||
481 | |||
482 | config CPU_SUP_UMC_32 | ||
483 | default y | ||
484 | bool "Support UMC processors" if PROCESSOR_SELECT | ||
485 | depends on !64BIT | ||
486 | help | ||
487 | This enables extended support for UMC processors | ||
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile index 25b4c063fbf6..a0fc6c144384 100644 --- a/arch/x86/kernel/cpu/Makefile +++ b/arch/x86/kernel/cpu/Makefile | |||
@@ -7,15 +7,16 @@ obj-y += proc.o feature_names.o | |||
7 | 7 | ||
8 | obj-$(CONFIG_X86_32) += common.o bugs.o cmpxchg.o | 8 | obj-$(CONFIG_X86_32) += common.o bugs.o cmpxchg.o |
9 | obj-$(CONFIG_X86_64) += common_64.o bugs_64.o | 9 | obj-$(CONFIG_X86_64) += common_64.o bugs_64.o |
10 | obj-$(CONFIG_X86_32) += amd.o | 10 | |
11 | obj-$(CONFIG_X86_64) += amd_64.o | 11 | obj-$(CONFIG_CPU_SUP_AMD_32) += amd.o |
12 | obj-$(CONFIG_X86_32) += cyrix.o | 12 | obj-$(CONFIG_CPU_SUP_AMD_64) += amd_64.o |
13 | obj-$(CONFIG_X86_32) += centaur.o | 13 | obj-$(CONFIG_CPU_SUP_CYRIX_32) += cyrix.o |
14 | obj-$(CONFIG_X86_64) += centaur_64.o | 14 | obj-$(CONFIG_CPU_SUP_CENTAUR_32) += centaur.o |
15 | obj-$(CONFIG_X86_32) += transmeta.o | 15 | obj-$(CONFIG_CPU_SUP_CENTAUR_64) += centaur_64.o |
16 | obj-$(CONFIG_X86_32) += intel.o | 16 | obj-$(CONFIG_CPU_SUP_TRANSMETA_32) += transmeta.o |
17 | obj-$(CONFIG_X86_64) += intel_64.o | 17 | obj-$(CONFIG_CPU_SUP_INTEL_32) += intel.o |
18 | obj-$(CONFIG_X86_32) += umc.o | 18 | obj-$(CONFIG_CPU_SUP_INTEL_64) += intel_64.o |
19 | obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o | ||
19 | 20 | ||
20 | obj-$(CONFIG_X86_MCE) += mcheck/ | 21 | obj-$(CONFIG_X86_MCE) += mcheck/ |
21 | obj-$(CONFIG_MTRR) += mtrr/ | 22 | obj-$(CONFIG_MTRR) += mtrr/ |