public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Palix <npalix@diku.dk>
To: x86@kernel.org, Andreas Herrmann <andreas.herrmann3@amd.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] Fix compilation error in amd.c when SMP is not set
Date: Fri, 31 Jul 2009 16:40:25 +0200	[thread overview]
Message-ID: <200907311640.25585.npalix@diku.dk> (raw)

The function amd_fixup_dcm requires SMP to be set
but it is called only when CONFIG_X86_HT is set.

It thus defined only if CONFIG_X86_HT is set.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
---
 arch/x86/kernel/cpu/amd.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index e06fa7c..1c15916 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -256,6 +256,7 @@ static int __cpuinit nearby_node(int apicid)
  * Assumption 2: Mixed systems with both single-node and dual-node
  *               processors are not supported.
  */
+#ifdef CONFIG_X86_HT
 static void __cpuinit amd_fixup_dcm(struct cpuinfo_x86 *c)
 {
 	u32 t, cpn;
@@ -299,6 +300,7 @@ static void __cpuinit amd_fixup_dcm(struct cpuinfo_x86 *c)
 	 /* fixup core id to be in range from 0 to cpn */
 	c->cpu_core_id = c->cpu_core_id % cpn;
 }
+#endif
 
 /*
  * On a AMD dual core setup the lower bits of the APIC id distingush the cores.
-- 
1.6.0.4


-- 
Nicolas Palix

             reply	other threads:[~2009-07-31 14:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-31 14:40 Nicolas Palix [this message]
2009-07-31 17:12 ` [PATCH] Fix compilation error in amd.c when SMP is not set H. Peter Anvin
2009-07-31 21:36   ` Nicolas Palix
2009-08-01  7:47 ` Borislav Petkov

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=200907311640.25585.npalix@diku.dk \
    --to=npalix@diku.dk \
    --cc=andreas.herrmann3@amd.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=x86@kernel.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