direct-io.hg

changeset 12388:c5ad4b36fce2

[XEN] x86-64: don't compile some unused MTRR code
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kfraser@localhost.localdomain
date Mon Nov 13 14:11:08 2006 +0000 (2006-11-13)
parents f4be07b6ad61
children 63d58674596f
files xen/arch/x86/cpu/mtrr/Makefile xen/arch/x86/cpu/mtrr/main.c
line diff
     1.1 --- a/xen/arch/x86/cpu/mtrr/Makefile	Mon Nov 13 14:02:37 2006 +0000
     1.2 +++ b/xen/arch/x86/cpu/mtrr/Makefile	Mon Nov 13 14:11:08 2006 +0000
     1.3 @@ -1,6 +1,6 @@
     1.4 -obj-y += amd.o
     1.5 -obj-y += centaur.o
     1.6 -obj-y += cyrix.o
     1.7 +obj-$(x86_32) += amd.o
     1.8 +obj-$(x86_32) += centaur.o
     1.9 +obj-$(x86_32) += cyrix.o
    1.10  obj-y += generic.o
    1.11  obj-y += main.o
    1.12  obj-y += state.o
     2.1 --- a/xen/arch/x86/cpu/mtrr/main.c	Mon Nov 13 14:02:37 2006 +0000
     2.2 +++ b/xen/arch/x86/cpu/mtrr/main.c	Mon Nov 13 14:11:08 2006 +0000
     2.3 @@ -64,7 +64,11 @@ struct mtrr_ops * mtrr_if = NULL;
     2.4  static void set_mtrr(unsigned int reg, unsigned long base,
     2.5  		     unsigned long size, mtrr_type type);
     2.6  
     2.7 +#ifndef CONFIG_X86_64
     2.8  extern int arr3_protected;
     2.9 +#else
    2.10 +#define arr3_protected 0
    2.11 +#endif
    2.12  
    2.13  static char *mtrr_strings[MTRR_NUM_TYPES] =
    2.14  {
    2.15 @@ -539,9 +543,11 @@ extern void centaur_init_mtrr(void);
    2.16  
    2.17  static void __init init_ifs(void)
    2.18  {
    2.19 +#ifndef CONFIG_X86_64
    2.20  	amd_init_mtrr();
    2.21  	cyrix_init_mtrr();
    2.22  	centaur_init_mtrr();
    2.23 +#endif
    2.24  }
    2.25  
    2.26  /* The suspend/resume methods are only for CPU without MTRR. CPU using generic
    2.27 @@ -593,6 +599,7 @@ void __init mtrr_bp_init(void)
    2.28  			size_and_mask = 0;
    2.29  		}
    2.30  	} else {
    2.31 +#ifndef CONFIG_X86_64
    2.32  		switch (boot_cpu_data.x86_vendor) {
    2.33  		case X86_VENDOR_AMD:
    2.34  			if (cpu_has_k6_mtrr) {
    2.35 @@ -619,6 +626,7 @@ void __init mtrr_bp_init(void)
    2.36  		default:
    2.37  			break;
    2.38  		}
    2.39 +#endif
    2.40  	}
    2.41  
    2.42  	if (mtrr_if) {