From: "Jan Beulich" <jbeulich@novell.com>
To: "Andi Kleen" <ak@suse.de>
Cc: <linux-kernel@vger.kernel.org>, <patches@x86-64.org>
Subject: [PATCH] x86-64: conditionalize inclusion of some MTRR flavors
Date: Wed, 15 Nov 2006 15:04:33 +0000 [thread overview]
Message-ID: <455B3A91.76E4.0078.0@novell.com> (raw)
Avoid inclusion of code that's dead for x86-64.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
--- linux-2.6.19-rc5/arch/i386/kernel/cpu/mtrr/Makefile 2006-09-20 05:42:06.000000000 +0200
+++ 2.6.19-rc5-x86_64-mtrr/arch/i386/kernel/cpu/mtrr/Makefile 2006-11-09 13:38:13.000000000 +0100
@@ -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
--- linux-2.6.19-rc5/arch/i386/kernel/cpu/mtrr/main.c 2006-09-20 05:42:06.000000000 +0200
+++ 2.6.19-rc5-x86_64-mtrr/arch/i386/kernel/cpu/mtrr/main.c 2006-11-10 08:56:35.000000000 +0100
@@ -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
reply other threads:[~2006-11-15 15:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=455B3A91.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@x86-64.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®