public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Alexander Beregalov <a.beregalov@gmail•com>
To: andreas.herrmann3@amd•com, linux-next@vger•kernel.org
Cc: Alexander Beregalov <a.beregalov@gmail•com>
Subject: [PATCH] x86: kernel/cpu/amd.c: Fix non-SMP build
Date: Thu, 30 Jul 2009 17:21:50 +0400	[thread overview]
Message-ID: <1248960110-19341-1-git-send-email-a.beregalov@gmail.com> (raw)

Fix this build errors when CONFIG_SMP is not set
(caused by 5b7d3d4 "x86: add cpu_node topology detection for AMD Magny-Cours"):

arch/x86/kernel/cpu/amd.c: In function 'amd_fixup_dcm':
arch/x86/kernel/cpu/amd.c:279: error: 'struct cpuinfo_x86' has no member named 'phys_proc_id'
arch/x86/kernel/cpu/amd.c:288: error: 'struct cpuinfo_x86' has no member named 'cpu_core_id'
arch/x86/kernel/cpu/amd.c:289: error: 'struct cpuinfo_x86' has no member named 'cpu_node_id'
arch/x86/kernel/cpu/amd.c:291: error: 'struct cpuinfo_x86' has no member named 'cpu_node_id'
arch/x86/kernel/cpu/amd.c:293: error: 'struct cpuinfo_x86' has no member named 'cpu_core_id'
arch/x86/kernel/cpu/amd.c:294: error: 'struct cpuinfo_x86' has no member named 'cpu_node_id'
arch/x86/kernel/cpu/amd.c:296: error: 'struct cpuinfo_x86' has no member named 'cpu_node_id'
arch/x86/kernel/cpu/amd.c:300: error: 'struct cpuinfo_x86' has no member named 'cpu_core_id'
arch/x86/kernel/cpu/amd.c:300: error: 'struct cpuinfo_x86' has no member named 'cpu_core_id'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail•com>
---
 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.3.3

                 reply	other threads:[~2009-07-30 13:22 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=1248960110-19341-1-git-send-email-a.beregalov@gmail.com \
    --to=a.beregalov@gmail$(echo .)com \
    --cc=andreas.herrmann3@amd$(echo .)com \
    --cc=linux-next@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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