[PATCH] i386: conditionalize inclusion of some MTRR flavors
authorJan Beulich <jbeulich@novell.com>
Thu, 7 Dec 2006 01:14:09 +0000 (02:14 +0100)
committerAndi Kleen <andi@basil.nowhere.org>
Thu, 7 Dec 2006 01:14:09 +0000 (02:14 +0100)
Avoid inclusion of code that's dead for x86-64.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
arch/i386/kernel/cpu/mtrr/Makefile
arch/i386/kernel/cpu/mtrr/main.c

index a25b701ab84e4e83872907ce922149116d8f95c4..191fc05336494bcb30c38c1a3e76d452030cd5d7 100644 (file)
@@ -1,5 +1,3 @@
 obj-y          := main.o if.o generic.o state.o
-obj-y          += amd.o
-obj-y          += cyrix.o
-obj-y          += centaur.o
+obj-$(CONFIG_X86_32) += amd.o cyrix.o centaur.o
 
index 2b8b0b361ccb410564aae2c5a9340a708abf2da7..a4de30b9d3d3b5d4dc5afc3e1506eb1fa64b78db 100644 (file)
@@ -59,7 +59,11 @@ struct mtrr_ops * mtrr_if = NULL;
 static void set_mtrr(unsigned int reg, unsigned long base,
                     unsigned long size, mtrr_type type);
 
+#ifndef CONFIG_X86_64
 extern int arr3_protected;
+#else
+#define arr3_protected 0
+#endif
 
 void set_mtrr_ops(struct mtrr_ops * ops)
 {
@@ -544,9 +548,11 @@ extern void centaur_init_mtrr(void);
 
 static void __init init_ifs(void)
 {
+#ifndef CONFIG_X86_64
        amd_init_mtrr();
        cyrix_init_mtrr();
        centaur_init_mtrr();
+#endif
 }
 
 /* The suspend/resume methods are only for CPU without MTRR. CPU using generic