aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/genapic.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-27 17:15:06 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-28 17:20:05 -0500
commitced733ec0bfe9a8a5140a7aefdfe802598e4b8c0 (patch)
tree8058557cfee2696c5e75d3cfa0939c9afd668580 /arch/x86/include/asm/genapic.h
parentef7471b13f3ef81074af1972b97355df9df3cdf3 (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/x86/include/asm/genapic.h')
-rw-r--r--arch/x86/include/asm/genapic.h80
1 files changed, 78 insertions, 2 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
155extern struct genapic *genapic;
156extern void es7000_update_genapic_to_cluster(void);
157
158#else /* CONFIG_X86_64: */
159
160extern struct genapic *genapic;
161
162extern struct genapic apic_flat;
163extern struct genapic apic_physflat;
164extern struct genapic apic_x2apic_cluster;
165extern struct genapic apic_x2apic_phys;
166extern int acpi_madt_oem_check(char *, char *);
167
168extern void apic_send_IPI_self(int vector);
169
170extern struct genapic apic_x2apic_uv_x;
171DECLARE_PER_CPU(int, x2apic_extra_bits);
172
173extern 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 */