aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-28 06:43:18 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-28 17:20:25 -0500
commita27a621001f4c3e57caf47feff4b014577fd01c6 (patch)
tree0f14c4c8eaff3c11142672f16a63e7b6e42d81a7 /arch/x86/include
parentd83093b50416f4ca59d3a84b2ddc217748214d64 (diff)
x86: refactor ->check_phys_apicid_present() subarch methods
- spread out the namespace to per driver methods - extend it to 64-bit as well so that we can use apic->check_phys_apicid_present() unconditionally Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/bigsmp/apic.h6
-rw-r--r--arch/x86/include/asm/es7000/apic.h4
-rw-r--r--arch/x86/include/asm/genapic.h1
-rw-r--r--arch/x86/include/asm/mach-default/mach_apic.h18
-rw-r--r--arch/x86/include/asm/mach-generic/mach_apic.h1
-rw-r--r--arch/x86/include/asm/numaq/apic.h4
-rw-r--r--arch/x86/include/asm/summit/apic.h2
7 files changed, 22 insertions, 14 deletions
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h
index 2fa70032e3b4..5ba4118fcdf2 100644
--- a/arch/x86/include/asm/bigsmp/apic.h
+++ b/arch/x86/include/asm/bigsmp/apic.h
@@ -99,13 +99,13 @@ static inline void bigsmp_setup_portio_remap(void)
99{ 99{
100} 100}
101 101
102static inline void enable_apic_mode(void) 102static inline int bigsmp_check_phys_apicid_present(int boot_cpu_physical_apicid)
103{ 103{
104 return 1;
104} 105}
105 106
106static inline int check_phys_apicid_present(int boot_cpu_physical_apicid) 107static inline void enable_apic_mode(void)
107{ 108{
108 return (1);
109} 109}
110 110
111/* As we are using single CPU as destination, pick only one CPU here */ 111/* As we are using single CPU as destination, pick only one CPU here */
diff --git a/arch/x86/include/asm/es7000/apic.h b/arch/x86/include/asm/es7000/apic.h
index c5b0eb51e53a..717c27f8da61 100644
--- a/arch/x86/include/asm/es7000/apic.h
+++ b/arch/x86/include/asm/es7000/apic.h
@@ -126,9 +126,9 @@ static inline physid_mask_t es7000_ioapic_phys_id_map(physid_mask_t phys_map)
126 return physids_promote(0xff); 126 return physids_promote(0xff);
127} 127}
128 128
129
130extern unsigned int boot_cpu_physical_apicid; 129extern unsigned int boot_cpu_physical_apicid;
131static inline int check_phys_apicid_present(int cpu_physical_apicid) 130
131static inline int es7000_check_phys_apicid_present(int cpu_physical_apicid)
132{ 132{
133 boot_cpu_physical_apicid = read_apic_id(); 133 boot_cpu_physical_apicid = read_apic_id();
134 return (1); 134 return (1);
diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h
index 2cb14d51e459..f292fd02ebab 100644
--- a/arch/x86/include/asm/genapic.h
+++ b/arch/x86/include/asm/genapic.h
@@ -110,6 +110,7 @@ DECLARE_PER_CPU(int, x2apic_extra_bits);
110extern void default_setup_apic_routing(void); 110extern void default_setup_apic_routing(void);
111 111
112extern int default_cpu_present_to_apicid(int mps_cpu); 112extern int default_cpu_present_to_apicid(int mps_cpu);
113extern int default_check_phys_apicid_present(int boot_cpu_physical_apicid);
113#endif 114#endif
114 115
115#endif /* _ASM_X86_GENAPIC_64_H */ 116#endif /* _ASM_X86_GENAPIC_64_H */
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h
index 54c20e19e280..0a824d3a2238 100644
--- a/arch/x86/include/asm/mach-default/mach_apic.h
+++ b/arch/x86/include/asm/mach-default/mach_apic.h
@@ -118,13 +118,26 @@ static inline int __default_cpu_present_to_apicid(int mps_cpu)
118 return BAD_APICID; 118 return BAD_APICID;
119} 119}
120 120
121static inline int
122__default_check_phys_apicid_present(int boot_cpu_physical_apicid)
123{
124 return physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map);
125}
126
121#ifdef CONFIG_X86_32 127#ifdef CONFIG_X86_32
122static inline int default_cpu_present_to_apicid(int mps_cpu) 128static inline int default_cpu_present_to_apicid(int mps_cpu)
123{ 129{
124 return __default_cpu_present_to_apicid(mps_cpu); 130 return __default_cpu_present_to_apicid(mps_cpu);
125} 131}
132
133static inline int
134default_check_phys_apicid_present(int boot_cpu_physical_apicid)
135{
136 return __default_check_phys_apicid_present(boot_cpu_physical_apicid);
137}
126#else 138#else
127extern int default_cpu_present_to_apicid(int mps_cpu); 139extern int default_cpu_present_to_apicid(int mps_cpu);
140extern int default_check_phys_apicid_present(int boot_cpu_physical_apicid);
128#endif 141#endif
129 142
130static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid) 143static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid)
@@ -132,11 +145,6 @@ static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid)
132 return physid_mask_of_physid(phys_apicid); 145 return physid_mask_of_physid(phys_apicid);
133} 146}
134 147
135static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
136{
137 return physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map);
138}
139
140static inline void enable_apic_mode(void) 148static inline void enable_apic_mode(void)
141{ 149{
142} 150}
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h
index 393a97c5685f..efd762d951ac 100644
--- a/arch/x86/include/asm/mach-generic/mach_apic.h
+++ b/arch/x86/include/asm/mach-generic/mach_apic.h
@@ -3,7 +3,6 @@
3 3
4#include <asm/genapic.h> 4#include <asm/genapic.h>
5 5
6#define check_phys_apicid_present (apic->check_phys_apicid_present)
7#define cpu_mask_to_apicid (apic->cpu_mask_to_apicid) 6#define cpu_mask_to_apicid (apic->cpu_mask_to_apicid)
8#define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and) 7#define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and)
9#define enable_apic_mode (apic->enable_apic_mode) 8#define enable_apic_mode (apic->enable_apic_mode)
diff --git a/arch/x86/include/asm/numaq/apic.h b/arch/x86/include/asm/numaq/apic.h
index 6b626519cd75..3be735e2ab90 100644
--- a/arch/x86/include/asm/numaq/apic.h
+++ b/arch/x86/include/asm/numaq/apic.h
@@ -92,9 +92,9 @@ static inline physid_mask_t numaq_apicid_to_cpu_present(int logical_apicid)
92 92
93extern void *xquad_portio; 93extern void *xquad_portio;
94 94
95static inline int check_phys_apicid_present(int boot_cpu_physical_apicid) 95static inline int numaq_check_phys_apicid_present(int boot_cpu_physical_apicid)
96{ 96{
97 return (1); 97 return 1;
98} 98}
99 99
100static inline void enable_apic_mode(void) 100static inline void enable_apic_mode(void)
diff --git a/arch/x86/include/asm/summit/apic.h b/arch/x86/include/asm/summit/apic.h
index 131343b0b757..fe578f6df782 100644
--- a/arch/x86/include/asm/summit/apic.h
+++ b/arch/x86/include/asm/summit/apic.h
@@ -120,7 +120,7 @@ static inline void summit_setup_portio_remap(void)
120{ 120{
121} 121}
122 122
123static inline int check_phys_apicid_present(int boot_cpu_physical_apicid) 123static inline int summit_check_phys_apicid_present(int boot_cpu_physical_apicid)
124{ 124{
125 return 1; 125 return 1;
126} 126}