x86, apic: clean up the cpu_2_logical_apiciddeclaration
extern declarations were scattered in 4 files - consolidate them
into apic.h.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index c07f5fb..2cdd19e 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -541,4 +541,8 @@
#endif /* CONFIG_X86_LOCAL_APIC */
+#ifdef CONFIG_X86_32
+extern u8 cpu_2_logical_apicid[NR_CPUS];
+#endif
+
#endif /* _ASM_X86_APIC_H */
diff --git a/arch/x86/kernel/bigsmp_32.c b/arch/x86/kernel/bigsmp_32.c
index 41732ab..0de9eed 100644
--- a/arch/x86/kernel/bigsmp_32.c
+++ b/arch/x86/kernel/bigsmp_32.c
@@ -99,8 +99,6 @@
return physid_mask_of_physid(phys_apicid);
}
-extern u8 cpu_2_logical_apicid[];
-
/* Mapping from cpu number to logical apicid */
static inline int bigsmp_cpu_to_logical_apicid(int cpu)
{
diff --git a/arch/x86/kernel/es7000_32.c b/arch/x86/kernel/es7000_32.c
index cf53a98..3dc4883 100644
--- a/arch/x86/kernel/es7000_32.c
+++ b/arch/x86/kernel/es7000_32.c
@@ -403,7 +403,6 @@
extern void es7000_enable_apic_mode(void);
extern int apic_version [MAX_APICS];
-extern u8 cpu_2_logical_apicid[];
extern unsigned int boot_cpu_physical_apicid;
extern int parse_unisys_oem (char *oemptr);
@@ -570,7 +569,7 @@
#ifdef CONFIG_SMP
if (cpu >= nr_cpu_ids)
return BAD_APICID;
- return (int)cpu_2_logical_apicid[cpu];
+ return cpu_2_logical_apicid[cpu];
#else
return logical_smp_processor_id();
#endif
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c
index dcf22f5..9abaacd 100644
--- a/arch/x86/kernel/numaq_32.c
+++ b/arch/x86/kernel/numaq_32.c
@@ -408,14 +408,11 @@
return physids_promote(0xFUL);
}
-/* Mapping from cpu number to logical apicid */
-extern u8 cpu_2_logical_apicid[];
-
static inline int numaq_cpu_to_logical_apicid(int cpu)
{
if (cpu >= nr_cpu_ids)
return BAD_APICID;
- return (int)cpu_2_logical_apicid[cpu];
+ return cpu_2_logical_apicid[cpu];
}
/*
diff --git a/arch/x86/kernel/summit_32.c b/arch/x86/kernel/summit_32.c
index 3059777..7a1db1f 100644
--- a/arch/x86/kernel/summit_32.c
+++ b/arch/x86/kernel/summit_32.c
@@ -209,8 +209,6 @@
#define apicid_cluster(apicid) ((apicid) & XAPIC_DEST_CLUSTER_MASK)
-extern u8 cpu_2_logical_apicid[];
-
static inline void summit_init_apic_ldr(void)
{
unsigned long val, id;
@@ -264,7 +262,7 @@
#ifdef CONFIG_SMP
if (cpu >= nr_cpu_ids)
return BAD_APICID;
- return (int)cpu_2_logical_apicid[cpu];
+ return cpu_2_logical_apicid[cpu];
#else
return logical_smp_processor_id();
#endif