Skip to contentSkip to conversation

Fix compilation error in amd.c when SMP is not set

PATCH In review Nicolas Palix 3 participants 4 messages Jul 31, 2009 – Aug 1, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix compilation error in amd.c when SMP is not set

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.

---
 arch/x86/kernel/cpu/amd.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/kernel/cpu/amd.c +2 -0
index e06fa7c..1c15916 100644
@@ -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.
Signature · 5 lines
1.6.0.4


-- 
Nicolas Palix
#1 lore raw
Quoted 6 lines · Nicolas Palix

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.

I'm confused... I don't see this function anywhere in my trees, nor do I see git revision e06fa7c that this was based on either in my trees or the stable trees. What is the base rev of this patch?

-hpa

Signature · 2 lines
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.
#2 lore raw
Quoted 6 lines · On Friday 31 July 2009 19:12:05 H. Peter Anvin wrote:
Quoted 5 lines · Nicolas Palix

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.

Quoted 8 lines
Quoted 1 line

I'm confused... I don't see this function anywhere in my trees, nor do I see git revision e06fa7c that this was based on either in my trees or the stable trees. What is the base rev of this patch?

-hpa

It's in next, commit 29160dfe027e90532bd60a97db1dd158d996be8b.

It's broken since the 30 as also reported by
http://kisskb.ellerman.id.au/kisskb/target/629/

Signature · 1 line
Nicolas Palix
#3 lore raw
In reply to Nicolas Palix
Quoted 6 lines · Nicolas Palix

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.

Thanks, I'll integrate it into the original patch:
29160dfe027e90532bd60a97db1dd158d996be8b.

Signature · 2 lines
Regards/Gruss,
    Boris.