diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-27 17:15:06 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-28 17:20:05 -0500 |
commit | ced733ec0bfe9a8a5140a7aefdfe802598e4b8c0 (patch) | |
tree | 8058557cfee2696c5e75d3cfa0939c9afd668580 /arch | |
parent | ef7471b13f3ef81074af1972b97355df9df3cdf3 (diff) |
x86, genapic: finish unification
Unify remaining bits of genapic_32/64.h.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/genapic.h | 80 | ||||
-rw-r--r-- | arch/x86/include/asm/genapic_32.h | 65 | ||||
-rw-r--r-- | arch/x86/include/asm/genapic_64.h | 19 |
3 files changed, 78 insertions, 86 deletions
diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h index 3dea66a328e3..7df1b48fa35a 100644 --- a/arch/x86/include/asm/genapic.h +++ b/arch/x86/include/asm/genapic.h | |||
@@ -93,9 +93,85 @@ struct genapic { | |||
93 | }; | 93 | }; |
94 | 94 | ||
95 | #ifdef CONFIG_X86_32 | 95 | #ifdef CONFIG_X86_32 |
96 | # include "genapic_32.h" | 96 | |
97 | #include <asm/mpspec.h> | ||
98 | #include <asm/atomic.h> | ||
99 | |||
100 | #define APICFUNC(x) .x = x, | ||
101 | |||
102 | /* More functions could be probably marked IPIFUNC and save some space | ||
103 | in UP GENERICARCH kernels, but I don't have the nerve right now | ||
104 | to untangle this mess. -AK */ | ||
105 | #ifdef CONFIG_SMP | ||
106 | #define IPIFUNC(x) APICFUNC(x) | ||
97 | #else | 107 | #else |
98 | # include "genapic_64.h" | 108 | #define IPIFUNC(x) |
99 | #endif | 109 | #endif |
100 | 110 | ||
111 | #define APIC_INIT(aname, aprobe) \ | ||
112 | { \ | ||
113 | .name = aname, \ | ||
114 | .probe = aprobe, \ | ||
115 | .int_delivery_mode = INT_DELIVERY_MODE, \ | ||
116 | .int_dest_mode = INT_DEST_MODE, \ | ||
117 | .no_balance_irq = NO_BALANCE_IRQ, \ | ||
118 | .ESR_DISABLE = esr_disable, \ | ||
119 | .apic_destination_logical = APIC_DEST_LOGICAL, \ | ||
120 | APICFUNC(apic_id_registered) \ | ||
121 | APICFUNC(target_cpus) \ | ||
122 | APICFUNC(check_apicid_used) \ | ||
123 | APICFUNC(check_apicid_present) \ | ||
124 | APICFUNC(init_apic_ldr) \ | ||
125 | APICFUNC(ioapic_phys_id_map) \ | ||
126 | APICFUNC(setup_apic_routing) \ | ||
127 | APICFUNC(multi_timer_check) \ | ||
128 | APICFUNC(apicid_to_node) \ | ||
129 | APICFUNC(cpu_to_logical_apicid) \ | ||
130 | APICFUNC(cpu_present_to_apicid) \ | ||
131 | APICFUNC(apicid_to_cpu_present) \ | ||
132 | APICFUNC(setup_portio_remap) \ | ||
133 | APICFUNC(check_phys_apicid_present) \ | ||
134 | APICFUNC(mps_oem_check) \ | ||
135 | APICFUNC(get_apic_id) \ | ||
136 | .apic_id_mask = APIC_ID_MASK, \ | ||
137 | APICFUNC(cpu_mask_to_apicid) \ | ||
138 | APICFUNC(cpu_mask_to_apicid_and) \ | ||
139 | APICFUNC(vector_allocation_domain) \ | ||
140 | APICFUNC(acpi_madt_oem_check) \ | ||
141 | IPIFUNC(send_IPI_mask) \ | ||
142 | IPIFUNC(send_IPI_allbutself) \ | ||
143 | IPIFUNC(send_IPI_all) \ | ||
144 | APICFUNC(enable_apic_mode) \ | ||
145 | APICFUNC(phys_pkg_id) \ | ||
146 | .trampoline_phys_low = TRAMPOLINE_PHYS_LOW, \ | ||
147 | .trampoline_phys_high = TRAMPOLINE_PHYS_HIGH, \ | ||
148 | APICFUNC(wait_for_init_deassert) \ | ||
149 | APICFUNC(smp_callin_clear_local_apic) \ | ||
150 | APICFUNC(store_NMI_vector) \ | ||
151 | APICFUNC(restore_NMI_vector) \ | ||
152 | APICFUNC(inquire_remote_apic) \ | ||
153 | } | ||
154 | |||
155 | extern struct genapic *genapic; | ||
156 | extern void es7000_update_genapic_to_cluster(void); | ||
157 | |||
158 | #else /* CONFIG_X86_64: */ | ||
159 | |||
160 | extern struct genapic *genapic; | ||
161 | |||
162 | extern struct genapic apic_flat; | ||
163 | extern struct genapic apic_physflat; | ||
164 | extern struct genapic apic_x2apic_cluster; | ||
165 | extern struct genapic apic_x2apic_phys; | ||
166 | extern int acpi_madt_oem_check(char *, char *); | ||
167 | |||
168 | extern void apic_send_IPI_self(int vector); | ||
169 | |||
170 | extern struct genapic apic_x2apic_uv_x; | ||
171 | DECLARE_PER_CPU(int, x2apic_extra_bits); | ||
172 | |||
173 | extern void setup_apic_routing(void); | ||
174 | |||
175 | #endif /* CONFIG_X86_64 */ | ||
176 | |||
101 | #endif /* _ASM_X86_GENAPIC_64_H */ | 177 | #endif /* _ASM_X86_GENAPIC_64_H */ |
diff --git a/arch/x86/include/asm/genapic_32.h b/arch/x86/include/asm/genapic_32.h deleted file mode 100644 index a56785ed12a9..000000000000 --- a/arch/x86/include/asm/genapic_32.h +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | #ifndef _ASM_X86_GENAPIC_32_H | ||
2 | #define _ASM_X86_GENAPIC_32_H | ||
3 | |||
4 | #include <asm/mpspec.h> | ||
5 | #include <asm/atomic.h> | ||
6 | |||
7 | #define APICFUNC(x) .x = x, | ||
8 | |||
9 | /* More functions could be probably marked IPIFUNC and save some space | ||
10 | in UP GENERICARCH kernels, but I don't have the nerve right now | ||
11 | to untangle this mess. -AK */ | ||
12 | #ifdef CONFIG_SMP | ||
13 | #define IPIFUNC(x) APICFUNC(x) | ||
14 | #else | ||
15 | #define IPIFUNC(x) | ||
16 | #endif | ||
17 | |||
18 | #define APIC_INIT(aname, aprobe) \ | ||
19 | { \ | ||
20 | .name = aname, \ | ||
21 | .probe = aprobe, \ | ||
22 | .int_delivery_mode = INT_DELIVERY_MODE, \ | ||
23 | .int_dest_mode = INT_DEST_MODE, \ | ||
24 | .no_balance_irq = NO_BALANCE_IRQ, \ | ||
25 | .ESR_DISABLE = esr_disable, \ | ||
26 | .apic_destination_logical = APIC_DEST_LOGICAL, \ | ||
27 | APICFUNC(apic_id_registered) \ | ||
28 | APICFUNC(target_cpus) \ | ||
29 | APICFUNC(check_apicid_used) \ | ||
30 | APICFUNC(check_apicid_present) \ | ||
31 | APICFUNC(init_apic_ldr) \ | ||
32 | APICFUNC(ioapic_phys_id_map) \ | ||
33 | APICFUNC(setup_apic_routing) \ | ||
34 | APICFUNC(multi_timer_check) \ | ||
35 | APICFUNC(apicid_to_node) \ | ||
36 | APICFUNC(cpu_to_logical_apicid) \ | ||
37 | APICFUNC(cpu_present_to_apicid) \ | ||
38 | APICFUNC(apicid_to_cpu_present) \ | ||
39 | APICFUNC(setup_portio_remap) \ | ||
40 | APICFUNC(check_phys_apicid_present) \ | ||
41 | APICFUNC(mps_oem_check) \ | ||
42 | APICFUNC(get_apic_id) \ | ||
43 | .apic_id_mask = APIC_ID_MASK, \ | ||
44 | APICFUNC(cpu_mask_to_apicid) \ | ||
45 | APICFUNC(cpu_mask_to_apicid_and) \ | ||
46 | APICFUNC(vector_allocation_domain) \ | ||
47 | APICFUNC(acpi_madt_oem_check) \ | ||
48 | IPIFUNC(send_IPI_mask) \ | ||
49 | IPIFUNC(send_IPI_allbutself) \ | ||
50 | IPIFUNC(send_IPI_all) \ | ||
51 | APICFUNC(enable_apic_mode) \ | ||
52 | APICFUNC(phys_pkg_id) \ | ||
53 | .trampoline_phys_low = TRAMPOLINE_PHYS_LOW, \ | ||
54 | .trampoline_phys_high = TRAMPOLINE_PHYS_HIGH, \ | ||
55 | APICFUNC(wait_for_init_deassert) \ | ||
56 | APICFUNC(smp_callin_clear_local_apic) \ | ||
57 | APICFUNC(store_NMI_vector) \ | ||
58 | APICFUNC(restore_NMI_vector) \ | ||
59 | APICFUNC(inquire_remote_apic) \ | ||
60 | } | ||
61 | |||
62 | extern struct genapic *genapic; | ||
63 | extern void es7000_update_genapic_to_cluster(void); | ||
64 | |||
65 | #endif /* _ASM_X86_GENAPIC_32_H */ | ||
diff --git a/arch/x86/include/asm/genapic_64.h b/arch/x86/include/asm/genapic_64.h deleted file mode 100644 index c70ca0d50eb3..000000000000 --- a/arch/x86/include/asm/genapic_64.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | #ifndef _ASM_X86_GENAPIC_64_H | ||
2 | #define _ASM_X86_GENAPIC_64_H | ||
3 | |||
4 | extern struct genapic *genapic; | ||
5 | |||
6 | extern struct genapic apic_flat; | ||
7 | extern struct genapic apic_physflat; | ||
8 | extern struct genapic apic_x2apic_cluster; | ||
9 | extern struct genapic apic_x2apic_phys; | ||
10 | extern int acpi_madt_oem_check(char *, char *); | ||
11 | |||
12 | extern void apic_send_IPI_self(int vector); | ||
13 | |||
14 | extern struct genapic apic_x2apic_uv_x; | ||
15 | DECLARE_PER_CPU(int, x2apic_extra_bits); | ||
16 | |||
17 | extern void setup_apic_routing(void); | ||
18 | |||
19 | #endif /* _ASM_X86_GENAPIC_64_H */ | ||