Skip to contentSkip to conversation

x86-64: don't compile some unused MTRR code

PATCH New Jan Beulich 1 participant 1 message Nov 13, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86-64: don't compile some unused MTRR code

xen/arch/x86/cpu/mtrr/Makefile +3 -3
Index: 2006-10-30/xen/arch/x86/cpu/mtrr/Makefile
===================================================================
@@ -1,6 +1,6 @@
-obj-y += amd.o
-obj-y += centaur.o
-obj-y += cyrix.o
+obj-$(x86_32) += amd.o
+obj-$(x86_32) += centaur.o
+obj-$(x86_32) += cyrix.o
 obj-y += generic.o
 obj-y += main.o
 obj-y += state.o
xen/arch/x86/cpu/mtrr/main.c +6 -0
Index: 2006-10-30/xen/arch/x86/cpu/mtrr/main.c
===================================================================
@@ -64,7 +64,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
 
 static char *mtrr_strings[MTRR_NUM_TYPES] =
 {
@@ -539,9 +543,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