# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID c5ad4b36fce279c408e5d44a2c6901516fef8c0d
# Parent f4be07b6ad619892d3571fc44630676c99761216
[XEN] x86-64: don't compile some unused MTRR code
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
xen/arch/x86/cpu/mtrr/Makefile | 6 +++---
xen/arch/x86/cpu/mtrr/main.c | 8 ++++++++
2 files changed, 11 insertions(+), 3 deletions(-)
diff -r f4be07b6ad61 -r c5ad4b36fce2 xen/arch/x86/cpu/mtrr/Makefile
--- a/xen/arch/x86/cpu/mtrr/Makefile Mon Nov 13 14:02:37 2006 +0000
+++ b/xen/arch/x86/cpu/mtrr/Makefile Mon Nov 13 14:11:08 2006 +0000
@@ -1,6 +1,6 @@ obj-y += amd.o
-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
diff -r f4be07b6ad61 -r c5ad4b36fce2 xen/arch/x86/cpu/mtrr/main.c
--- a/xen/arch/x86/cpu/mtrr/main.c Mon Nov 13 14:02:37 2006 +0000
+++ b/xen/arch/x86/cpu/mtrr/main.c Mon Nov 13 14:11:08 2006 +0000
@@ -64,7 +64,11 @@ static void set_mtrr(unsigned int reg, u
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
@@ -593,6 +599,7 @@ void __init mtrr_bp_init(void)
size_and_mask = 0;
}
} else {
+#ifndef CONFIG_X86_64
switch (boot_cpu_data.x86_vendor) {
case X86_VENDOR_AMD:
if (cpu_has_k6_mtrr) {
@@ -619,6 +626,7 @@ void __init mtrr_bp_init(void)
default:
break;
}
+#endif
}
if (mtrr_if) {
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|