blob: a56785ed12a99b63ab0432fac8c21816ab3ddf93 [file] [log] [blame]
H. Peter Anvin1965aae2008-10-22 22:26:29 -07001#ifndef _ASM_X86_GENAPIC_32_H
2#define _ASM_X86_GENAPIC_32_H
Linus Torvalds1da177e2005-04-16 15:20:36 -07003
Andi Kleen874c4fe2006-09-26 10:52:26 +02004#include <asm/mpspec.h>
Yinghai Lu569712b2008-11-16 03:12:49 -08005#include <asm/atomic.h>
Andi Kleen874c4fe2006-09-26 10:52:26 +02006
Andi Kleen874c4fe2006-09-26 10:52:26 +02007#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
Linus Torvalds1da177e2005-04-16 15:20:36 -070017
Joe Percheseee28c22008-03-23 01:02:13 -070018#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) \
Mike Travis95d313c2008-12-16 17:33:54 -080045 APICFUNC(cpu_mask_to_apicid_and) \
Yinghai Lu569712b2008-11-16 03:12:49 -080046 APICFUNC(vector_allocation_domain) \
Joe Percheseee28c22008-03-23 01:02:13 -070047 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) \
Yinghai Lu569712b2008-11-16 03:12:49 -080053 .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) \
Joe Percheseee28c22008-03-23 01:02:13 -070060}
Linus Torvalds1da177e2005-04-16 15:20:36 -070061
Andrew Mortona86f34b2007-05-02 19:27:04 +020062extern struct genapic *genapic;
Yinghai Lub5fe3632008-11-18 08:14:14 -080063extern void es7000_update_genapic_to_cluster(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070064
H. Peter Anvin1965aae2008-10-22 22:26:29 -070065#endif /* _ASM_X86_GENAPIC_32_H */