From: "Jan Beulich" Subject: [PATCH] x86-64: don't compile some unused MTRR code Date: Mon, 13 Nov 2006 12:44:16 +0000 Message-ID: <455876B0.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Signed-off-by: Jan Beulich Index: 2006-10-30/xen/arch/x86/cpu/mtrr/Makefile =================================================================== --- 2006-10-30.orig/xen/arch/x86/cpu/mtrr/Makefile 2006-11-09 14:57:55.000000000 +0100 +++ 2006-10-30/xen/arch/x86/cpu/mtrr/Makefile 2006-11-09 14:58:08.000000000 +0100 @@ -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 Index: 2006-10-30/xen/arch/x86/cpu/mtrr/main.c =================================================================== --- 2006-10-30.orig/xen/arch/x86/cpu/mtrr/main.c 2006-11-09 14:57:55.000000000 +0100 +++ 2006-10-30/xen/arch/x86/cpu/mtrr/main.c 2006-11-10 08:58:15.000000000 +0100 @@ -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