diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-17 08:45:30 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-17 11:52:46 -0500 |
commit | 2f205bc47f615b7bd0c7aba817d67ce25760eaf1 (patch) | |
tree | db0db390facd85e29bc14e58646ec5946ee0b665 /arch | |
parent | 77313190d121dd1fffa965aff6e9f0782a307bb8 (diff) |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/apic.h | 4 | ||||
-rw-r--r-- | arch/x86/kernel/bigsmp_32.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/es7000_32.c | 3 | ||||
-rw-r--r-- | arch/x86/kernel/numaq_32.c | 5 | ||||
-rw-r--r-- | arch/x86/kernel/summit_32.c | 4 |
5 files changed, 7 insertions, 11 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index c07f5fbf43c8..2cdd19e4536f 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
@@ -541,4 +541,8 @@ static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid) | |||
541 | 541 | ||
542 | #endif /* CONFIG_X86_LOCAL_APIC */ | 542 | #endif /* CONFIG_X86_LOCAL_APIC */ |
543 | 543 | ||
544 | #ifdef CONFIG_X86_32 | ||
545 | extern u8 cpu_2_logical_apicid[NR_CPUS]; | ||
546 | #endif | ||
547 | |||
544 | #endif /* _ASM_X86_APIC_H */ | 548 | #endif /* _ASM_X86_APIC_H */ |
diff --git a/arch/x86/kernel/bigsmp_32.c b/arch/x86/kernel/bigsmp_32.c index 41732abd7004..0de9eed7c600 100644 --- a/arch/x86/kernel/bigsmp_32.c +++ b/arch/x86/kernel/bigsmp_32.c | |||
@@ -99,8 +99,6 @@ static inline physid_mask_t bigsmp_apicid_to_cpu_present(int phys_apicid) | |||
99 | return physid_mask_of_physid(phys_apicid); | 99 | return physid_mask_of_physid(phys_apicid); |
100 | } | 100 | } |
101 | 101 | ||
102 | extern u8 cpu_2_logical_apicid[]; | ||
103 | |||
104 | /* Mapping from cpu number to logical apicid */ | 102 | /* Mapping from cpu number to logical apicid */ |
105 | static inline int bigsmp_cpu_to_logical_apicid(int cpu) | 103 | static inline int bigsmp_cpu_to_logical_apicid(int cpu) |
106 | { | 104 | { |
diff --git a/arch/x86/kernel/es7000_32.c b/arch/x86/kernel/es7000_32.c index cf53a98dbf10..3dc48831eb95 100644 --- a/arch/x86/kernel/es7000_32.c +++ b/arch/x86/kernel/es7000_32.c | |||
@@ -403,7 +403,6 @@ void __init es7000_enable_apic_mode(void) | |||
403 | 403 | ||
404 | extern void es7000_enable_apic_mode(void); | 404 | extern void es7000_enable_apic_mode(void); |
405 | extern int apic_version [MAX_APICS]; | 405 | extern int apic_version [MAX_APICS]; |
406 | extern u8 cpu_2_logical_apicid[]; | ||
407 | extern unsigned int boot_cpu_physical_apicid; | 406 | extern unsigned int boot_cpu_physical_apicid; |
408 | 407 | ||
409 | extern int parse_unisys_oem (char *oemptr); | 408 | extern int parse_unisys_oem (char *oemptr); |
@@ -570,7 +569,7 @@ static int es7000_cpu_to_logical_apicid(int cpu) | |||
570 | #ifdef CONFIG_SMP | 569 | #ifdef CONFIG_SMP |
571 | if (cpu >= nr_cpu_ids) | 570 | if (cpu >= nr_cpu_ids) |
572 | return BAD_APICID; | 571 | return BAD_APICID; |
573 | return (int)cpu_2_logical_apicid[cpu]; | 572 | return cpu_2_logical_apicid[cpu]; |
574 | #else | 573 | #else |
575 | return logical_smp_processor_id(); | 574 | return logical_smp_processor_id(); |
576 | #endif | 575 | #endif |
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c index dcf22f508273..9abaacde72eb 100644 --- a/arch/x86/kernel/numaq_32.c +++ b/arch/x86/kernel/numaq_32.c | |||
@@ -408,14 +408,11 @@ static inline physid_mask_t numaq_ioapic_phys_id_map(physid_mask_t phys_map) | |||
408 | return physids_promote(0xFUL); | 408 | return physids_promote(0xFUL); |
409 | } | 409 | } |
410 | 410 | ||
411 | /* Mapping from cpu number to logical apicid */ | ||
412 | extern u8 cpu_2_logical_apicid[]; | ||
413 | |||
414 | static inline int numaq_cpu_to_logical_apicid(int cpu) | 411 | static inline int numaq_cpu_to_logical_apicid(int cpu) |
415 | { | 412 | { |
416 | if (cpu >= nr_cpu_ids) | 413 | if (cpu >= nr_cpu_ids) |
417 | return BAD_APICID; | 414 | return BAD_APICID; |
418 | return (int)cpu_2_logical_apicid[cpu]; | 415 | return cpu_2_logical_apicid[cpu]; |
419 | } | 416 | } |
420 | 417 | ||
421 | /* | 418 | /* |
diff --git a/arch/x86/kernel/summit_32.c b/arch/x86/kernel/summit_32.c index 305977789144..7a1db1f23563 100644 --- a/arch/x86/kernel/summit_32.c +++ b/arch/x86/kernel/summit_32.c | |||
@@ -209,8 +209,6 @@ static inline unsigned long summit_check_apicid_present(int bit) | |||
209 | 209 | ||
210 | #define apicid_cluster(apicid) ((apicid) & XAPIC_DEST_CLUSTER_MASK) | 210 | #define apicid_cluster(apicid) ((apicid) & XAPIC_DEST_CLUSTER_MASK) |
211 | 211 | ||
212 | extern u8 cpu_2_logical_apicid[]; | ||
213 | |||
214 | static inline void summit_init_apic_ldr(void) | 212 | static inline void summit_init_apic_ldr(void) |
215 | { | 213 | { |
216 | unsigned long val, id; | 214 | unsigned long val, id; |
@@ -264,7 +262,7 @@ static inline int summit_cpu_to_logical_apicid(int cpu) | |||
264 | #ifdef CONFIG_SMP | 262 | #ifdef CONFIG_SMP |
265 | if (cpu >= nr_cpu_ids) | 263 | if (cpu >= nr_cpu_ids) |
266 | return BAD_APICID; | 264 | return BAD_APICID; |
267 | return (int)cpu_2_logical_apicid[cpu]; | 265 | return cpu_2_logical_apicid[cpu]; |
268 | #else | 266 | #else |
269 | return logical_smp_processor_id(); | 267 | return logical_smp_processor_id(); |
270 | #endif | 268 | #endif |