H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 1 | #ifndef _ASM_X86_GENAPIC_32_H |
| 2 | #define _ASM_X86_GENAPIC_32_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | |
Andi Kleen | 874c4fe | 2006-09-26 10:52:26 +0200 | [diff] [blame] | 4 | #include <asm/mpspec.h> |
Yinghai Lu | 569712b | 2008-11-16 03:12:49 -0800 | [diff] [blame] | 5 | #include <asm/atomic.h> |
Andi Kleen | 874c4fe | 2006-09-26 10:52:26 +0200 | [diff] [blame] | 6 | |
Andi Kleen | 874c4fe | 2006-09-26 10:52:26 +0200 | [diff] [blame] | 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 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | |
Joe Perches | eee28c2 | 2008-03-23 01:02:13 -0700 | [diff] [blame] | 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) \ |
Mike Travis | 95d313c | 2008-12-16 17:33:54 -0800 | [diff] [blame] | 45 | APICFUNC(cpu_mask_to_apicid_and) \ |
Yinghai Lu | 569712b | 2008-11-16 03:12:49 -0800 | [diff] [blame] | 46 | APICFUNC(vector_allocation_domain) \ |
Joe Perches | eee28c2 | 2008-03-23 01:02:13 -0700 | [diff] [blame] | 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) \ |
Yinghai Lu | 569712b | 2008-11-16 03:12:49 -0800 | [diff] [blame] | 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) \ |
Joe Perches | eee28c2 | 2008-03-23 01:02:13 -0700 | [diff] [blame] | 60 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 61 | |
Andrew Morton | a86f34b | 2007-05-02 19:27:04 +0200 | [diff] [blame] | 62 | extern struct genapic *genapic; |
Yinghai Lu | b5fe363 | 2008-11-18 08:14:14 -0800 | [diff] [blame] | 63 | extern void es7000_update_genapic_to_cluster(void); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 64 | |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 65 | #endif /* _ASM_X86_GENAPIC_32_H */ |