[PATCH] x86: kernel/cpu/amd.c: Fix non-SMP build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux