]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: configuration options to compile out x86 CPU support code
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 5 Aug 2008 09:45:19 +0000 (11:45 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 18 Aug 2008 14:05:48 +0000 (16:05 +0200)
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>
arch/x86/Kconfig.cpu
arch/x86/kernel/cpu/Makefile
include/asm-x86/bugs.h

index 2c518fbc52ece13221e587ee71f11c81a4d5cec7..6156ac25ff8cca40b82807e56e9a659c806aa982 100644 (file)
@@ -415,3 +415,73 @@ config X86_MINIMUM_CPU_FAMILY
 config X86_DEBUGCTLMSR
        def_bool y
        depends on !(MK6 || MWINCHIPC6 || MWINCHIP2 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486 || M386)
+
+menuconfig PROCESSOR_SELECT
+       default y
+       bool "Supported processor vendors" if EMBEDDED
+       help
+         This lets you choose what x86 vendor support code your kernel
+         will include.
+
+config CPU_SUP_INTEL_32
+       default y
+       bool "Support Intel processors" if PROCESSOR_SELECT
+       depends on !64BIT
+       help
+         This enables extended support for Intel processors
+
+config CPU_SUP_INTEL_64
+       default y
+       bool "Support Intel processors" if PROCESSOR_SELECT
+       depends on 64BIT
+       help
+         This enables extended support for Intel processors
+
+config CPU_SUP_CYRIX_32
+       default y
+       bool "Support Cyrix processors" if PROCESSOR_SELECT
+       depends on !64BIT
+       help
+         This enables extended support for Cyrix processors
+
+config CPU_SUP_AMD_32
+       default y
+       bool "Support AMD processors" if PROCESSOR_SELECT
+       depends on !64BIT
+       help
+         This enables extended support for AMD processors
+
+config CPU_SUP_AMD_64
+       default y
+       bool "Support AMD processors" if PROCESSOR_SELECT
+       depends on 64BIT
+       help
+         This enables extended support for AMD processors
+
+config CPU_SUP_CENTAUR_32
+       default y
+       bool "Support Centaur processors" if PROCESSOR_SELECT
+       depends on !64BIT
+       help
+         This enables extended support for Centaur processors
+
+config CPU_SUP_CENTAUR_64
+       default y
+       bool "Support Centaur processors" if PROCESSOR_SELECT
+       depends on 64BIT
+       help
+         This enables extended support for Centaur processors
+
+config CPU_SUP_TRANSMETA_32
+       default y
+       bool "Support Transmeta processors" if PROCESSOR_SELECT
+       depends on !64BIT
+       help
+         This enables extended support for Transmeta processors
+
+config CPU_SUP_UMC_32
+       default y
+       bool "Support UMC processors" if PROCESSOR_SELECT
+       depends on !64BIT
+       help
+         This enables extended support for UMC processors
index 25b4c063fbf65352c2504ce49878464097e06985..a0fc6c144384aeee652dff488335887c07b839fe 100644 (file)
@@ -7,15 +7,16 @@ obj-y                 += proc.o feature_names.o
 
 obj-$(CONFIG_X86_32)   += common.o bugs.o cmpxchg.o
 obj-$(CONFIG_X86_64)   += common_64.o bugs_64.o
-obj-$(CONFIG_X86_32)   += amd.o
-obj-$(CONFIG_X86_64)   += amd_64.o
-obj-$(CONFIG_X86_32)   += cyrix.o
-obj-$(CONFIG_X86_32)   += centaur.o
-obj-$(CONFIG_X86_64)   += centaur_64.o
-obj-$(CONFIG_X86_32)   += transmeta.o
-obj-$(CONFIG_X86_32)   += intel.o
-obj-$(CONFIG_X86_64)   += intel_64.o
-obj-$(CONFIG_X86_32)   += umc.o
+
+obj-$(CONFIG_CPU_SUP_AMD_32)           += amd.o
+obj-$(CONFIG_CPU_SUP_AMD_64)           += amd_64.o
+obj-$(CONFIG_CPU_SUP_CYRIX_32)         += cyrix.o
+obj-$(CONFIG_CPU_SUP_CENTAUR_32)       += centaur.o
+obj-$(CONFIG_CPU_SUP_CENTAUR_64)       += centaur_64.o
+obj-$(CONFIG_CPU_SUP_TRANSMETA_32)     += transmeta.o
+obj-$(CONFIG_CPU_SUP_INTEL_32)         += intel.o
+obj-$(CONFIG_CPU_SUP_INTEL_64)         += intel_64.o
+obj-$(CONFIG_CPU_SUP_UMC_32)           += umc.o
 
 obj-$(CONFIG_X86_MCE)  += mcheck/
 obj-$(CONFIG_MTRR)     += mtrr/
index 021cbdd5f258a7739c2433d62f00a37a51070a4b..00e4a0cd6f283568228fe9647cdc75fae292dfce 100644 (file)
@@ -2,6 +2,11 @@
 #define _ASM_X86_BUGS_H
 
 extern void check_bugs(void);
+
+#ifdef CONFIG_CPU_SUP_INTEL_32
 int ppro_with_ram_bug(void);
+#else
+static inline int ppro_with_ram_bug(void) { return 0; }
+#endif
 
 #endif /* _ASM_X86_BUGS_H */