lkml.org 
[lkml]   [2008]   [Oct]   [30]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateFri, 31 Oct 2008 00:45:29 +0100
FromIngo Molnar <>
SubjectRe: [PATCH] x86: fix missing cpu_index initialisation
* Ingo Molnar <mingo@elte.hu> wrote:

> > Depends on [VOYAGER] x86: add ability to test for boot CPU
> 
> applied both to tip/x86/urgent:
> 
>  6b5496e: x86/voyager: fix missing cpu_index initialisation
>  3b25aec: x86/voyager: fix compile breakage caused by dc1e35c6e95e8923cf1d35104

this broke the x86 build:

 arch/x86/kernel/cpu/common.c: In function 'early_identify_cpu':
 arch/x86/kernel/cpu/common.c:553: error: 'struct cpuinfo_x86' has no member named 'cpu_index'

fixed via the patch below.

	Ingo

---------->
From 1c4acdb467f8a6704855a5670ff3d82e3c18eb0b Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Fri, 31 Oct 2008 00:43:03 +0100
Subject: [PATCH] x86: cpu_index build fix
fix:

 arch/x86/kernel/cpu/common.c: In function 'early_identify_cpu':
 arch/x86/kernel/cpu/common.c:553: error: 'struct cpuinfo_x86' has no member named 'cpu_index'

as cpu_index is only available on SMP.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/cpu/common.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index da8f15a..003a653 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -550,7 +550,9 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
 
 	validate_pat_support(c);
 
+#ifdef CONFIG_SMP
 	c->cpu_index = boot_cpu_id;
+#endif
 }
 
 void __init early_cpu_init(void)

\
 
 \ /
  Last update: 2008-10-31 00:49    [from the cache]
©2003-2008