[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110128162248.GA25746@htj.dyndns.org>
Date: Fri, 28 Jan 2011 17:22:48 +0100
From: Tejun Heo <tj@...nel.org>
To: Ingo Molnar <mingo@...e.hu>
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
tglx@...utronix.de, x86@...nel.org, eric.dumazet@...il.com,
yinghai@...nel.org, brgerst@...il.com, gorcunov@...il.com,
penberg@...nel.org, shaohui.zheng@...el.com, rientjes@...gle.com
Subject: [PATCH] x86: fix build failure on X86_UP_APIC
Commit 4c321ff8 (x86: Replace cpu_2_logical_apicid[] with early percpu
variable) and following changes introduced and used
x86_cpu_to_logical_apicid percpu variable. It was declared and
defined inside CONFIG_SMP && CONFIG_X86_32 but if CONFIG_X86_UP_APIC
is set UP configuration makes use of it and build fails.
Fix it by declaring and defining it inside CONFIG_X86_LOCAL_APIC &&
CONFIG_X86_32.
Signed-off-by: Tejun Heo <tj@...nel.org>
Reported-by: Ingo Molnar <mingo@...e.hu>
Cc: "H. Peter Anvin" <hpa@...or.com>
---
Oops, forgot about UP apic. This should fix the problem. Thank you.
arch/x86/include/asm/smp.h | 2 +-
arch/x86/kernel/apic/apic.c | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
Index: work/arch/x86/include/asm/smp.h
===================================================================
--- work.orig/arch/x86/include/asm/smp.h
+++ work/arch/x86/include/asm/smp.h
@@ -38,7 +38,7 @@ static inline struct cpumask *cpu_core_m
DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid);
DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid);
-#if defined(CONFIG_SMP) && defined(CONFIG_X86_32)
+#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32)
DECLARE_EARLY_PER_CPU(int, x86_cpu_to_logical_apicid);
#endif
Index: work/arch/x86/kernel/apic/apic.c
===================================================================
--- work.orig/arch/x86/kernel/apic/apic.c
+++ work/arch/x86/kernel/apic/apic.c
@@ -79,7 +79,6 @@ EXPORT_EARLY_PER_CPU_SYMBOL(x86_bios_cpu
#ifdef CONFIG_X86_32
-#ifdef CONFIG_SMP
/*
* On x86_32, the mapping between cpu and logical apicid may vary
* depending on apic in use. The following early percpu variable is
@@ -87,7 +86,6 @@ EXPORT_EARLY_PER_CPU_SYMBOL(x86_bios_cpu
* actually diverge. Let's keep it ugly for now.
*/
DEFINE_EARLY_PER_CPU(int, x86_cpu_to_logical_apicid, BAD_APICID);
-#endif
/*
* Knob to control our willingness to enable the local APIC.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists