提交 2f205bc4 编写于 作者: I Ingo Molnar

x86, apic: clean up the cpu_2_logical_apiciddeclaration

extern declarations were scattered in 4 files - consolidate them
into apic.h.
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 77313190
...@@ -541,4 +541,8 @@ static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid) ...@@ -541,4 +541,8 @@ static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid)
#endif /* CONFIG_X86_LOCAL_APIC */ #endif /* CONFIG_X86_LOCAL_APIC */
#ifdef CONFIG_X86_32
extern u8 cpu_2_logical_apicid[NR_CPUS];
#endif
#endif /* _ASM_X86_APIC_H */ #endif /* _ASM_X86_APIC_H */
...@@ -99,8 +99,6 @@ static inline physid_mask_t bigsmp_apicid_to_cpu_present(int phys_apicid) ...@@ -99,8 +99,6 @@ static inline physid_mask_t bigsmp_apicid_to_cpu_present(int phys_apicid)
return physid_mask_of_physid(phys_apicid); return physid_mask_of_physid(phys_apicid);
} }
extern u8 cpu_2_logical_apicid[];
/* Mapping from cpu number to logical apicid */ /* Mapping from cpu number to logical apicid */
static inline int bigsmp_cpu_to_logical_apicid(int cpu) static inline int bigsmp_cpu_to_logical_apicid(int cpu)
{ {
......
...@@ -403,7 +403,6 @@ void __init es7000_enable_apic_mode(void) ...@@ -403,7 +403,6 @@ void __init es7000_enable_apic_mode(void)
extern void es7000_enable_apic_mode(void); extern void es7000_enable_apic_mode(void);
extern int apic_version [MAX_APICS]; extern int apic_version [MAX_APICS];
extern u8 cpu_2_logical_apicid[];
extern unsigned int boot_cpu_physical_apicid; extern unsigned int boot_cpu_physical_apicid;
extern int parse_unisys_oem (char *oemptr); extern int parse_unisys_oem (char *oemptr);
...@@ -570,7 +569,7 @@ static int es7000_cpu_to_logical_apicid(int cpu) ...@@ -570,7 +569,7 @@ static int es7000_cpu_to_logical_apicid(int cpu)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
if (cpu >= nr_cpu_ids) if (cpu >= nr_cpu_ids)
return BAD_APICID; return BAD_APICID;
return (int)cpu_2_logical_apicid[cpu]; return cpu_2_logical_apicid[cpu];
#else #else
return logical_smp_processor_id(); return logical_smp_processor_id();
#endif #endif
......
...@@ -408,14 +408,11 @@ static inline physid_mask_t numaq_ioapic_phys_id_map(physid_mask_t phys_map) ...@@ -408,14 +408,11 @@ static inline physid_mask_t numaq_ioapic_phys_id_map(physid_mask_t phys_map)
return physids_promote(0xFUL); 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) static inline int numaq_cpu_to_logical_apicid(int cpu)
{ {
if (cpu >= nr_cpu_ids) if (cpu >= nr_cpu_ids)
return BAD_APICID; return BAD_APICID;
return (int)cpu_2_logical_apicid[cpu]; return cpu_2_logical_apicid[cpu];
} }
/* /*
......
...@@ -209,8 +209,6 @@ static inline unsigned long summit_check_apicid_present(int bit) ...@@ -209,8 +209,6 @@ static inline unsigned long summit_check_apicid_present(int bit)
#define apicid_cluster(apicid) ((apicid) & XAPIC_DEST_CLUSTER_MASK) #define apicid_cluster(apicid) ((apicid) & XAPIC_DEST_CLUSTER_MASK)
extern u8 cpu_2_logical_apicid[];
static inline void summit_init_apic_ldr(void) static inline void summit_init_apic_ldr(void)
{ {
unsigned long val, id; unsigned long val, id;
...@@ -264,7 +262,7 @@ static inline int summit_cpu_to_logical_apicid(int cpu) ...@@ -264,7 +262,7 @@ static inline int summit_cpu_to_logical_apicid(int cpu)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
if (cpu >= nr_cpu_ids) if (cpu >= nr_cpu_ids)
return BAD_APICID; return BAD_APICID;
return (int)cpu_2_logical_apicid[cpu]; return cpu_2_logical_apicid[cpu];
#else #else
return logical_smp_processor_id(); return logical_smp_processor_id();
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册