x86, apic: untangle the send_IPI_*() jungle
[linux-2.6-block.git] / arch / x86 / mach-generic / summit.c
CommitLineData
8108576a 1/*
1da177e4
LT
2 * APIC driver for the IBM "Summit" chipset.
3 */
4#define APIC_DEFINITION 1
1da177e4
LT
5#include <linux/threads.h>
6#include <linux/cpumask.h>
7#include <asm/mpspec.h>
8#include <asm/genapic.h>
9#include <asm/fixmap.h>
10#include <asm/apicdef.h>
11#include <linux/kernel.h>
12#include <linux/string.h>
1da177e4 13#include <linux/init.h>
e8c48efd 14#include <asm/summit/apicdef.h>
4696ca5b 15#include <linux/smp.h>
e8c48efd
YL
16#include <asm/summit/apic.h>
17#include <asm/summit/ipi.h>
18#include <asm/summit/mpparse.h>
569712b2 19#include <asm/mach-default/mach_wakecpu.h>
1da177e4 20
e96763d6 21static int probe_summit(void)
8108576a 22{
1da177e4
LT
23 /* probed later in mptable/ACPI hooks */
24 return 0;
8108576a 25}
1da177e4 26
e2d40b18 27static void summit_vector_allocation_domain(int cpu, cpumask_t *retmask)
497c9a19
YL
28{
29 /* Careful. Some cpus do not strictly honor the set of cpus
30 * specified in the interrupt destination when using lowest
31 * priority interrupt delivery mode.
32 *
33 * In particular there was a hyperthreading cpu observed to
34 * deliver interrupts to the wrong hyperthread when only one
35 * hyperthread was specified in the interrupt desitination.
36 */
e7986739 37 *retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } };
497c9a19
YL
38}
39
491a50c4
IM
40struct genapic apic_summit = {
41
42 .name = "summit",
43 .probe = probe_summit,
306db03b 44 .acpi_madt_oem_check = summit_acpi_madt_oem_check,
7ed248da 45 .apic_id_registered = summit_apic_id_registered,
491a50c4 46
82daea6b
IM
47 .irq_delivery_mode = dest_LowestPrio,
48 /* logical delivery broadcast to all CPUs: */
49 .irq_dest_mode = 1,
491a50c4 50
0a9cc20b 51 .target_cpus = summit_target_cpus,
08125d3e 52 .disable_esr = 1,
bdb1a9b6 53 .dest_logical = APIC_DEST_LOGICAL,
d1d7cae8
IM
54 .check_apicid_used = summit_check_apicid_used,
55 .check_apicid_present = summit_check_apicid_present,
491a50c4 56
e2d40b18 57 .vector_allocation_domain = summit_vector_allocation_domain,
a5c43296 58 .init_apic_ldr = summit_init_apic_ldr,
491a50c4 59
d190cb87 60 .ioapic_phys_id_map = summit_ioapic_phys_id_map,
72ce0165 61 .setup_apic_routing = summit_setup_apic_routing,
33a201fa 62 .multi_timer_check = NULL,
3f57a318 63 .apicid_to_node = summit_apicid_to_node,
5257c511 64 .cpu_to_logical_apicid = summit_cpu_to_logical_apicid,
a21769a4 65 .cpu_present_to_apicid = summit_cpu_present_to_apicid,
8058714a 66 .apicid_to_cpu_present = summit_apicid_to_cpu_present,
d83093b5 67 .setup_portio_remap = NULL,
a27a6210 68 .check_phys_apicid_present = summit_check_phys_apicid_present,
49040333 69 .enable_apic_mode = NULL,
cb8cc442 70 .phys_pkg_id = summit_phys_pkg_id,
9c764247 71 .mps_oem_check = summit_mps_oem_check,
491a50c4 72
ca6c8ed4 73 .get_apic_id = summit_get_apic_id,
491a50c4 74 .set_apic_id = NULL,
94af1875 75 .apic_id_mask = 0xFF << 24,
491a50c4 76
debccb3e
IM
77 .cpu_mask_to_apicid = summit_cpu_mask_to_apicid,
78 .cpu_mask_to_apicid_and = summit_cpu_mask_to_apicid_and,
491a50c4 79
dac5f412 80 .send_IPI_mask = summit_send_IPI_mask,
491a50c4 81 .send_IPI_mask_allbutself = NULL,
dac5f412
IM
82 .send_IPI_allbutself = summit_send_IPI_allbutself,
83 .send_IPI_all = summit_send_IPI_all,
491a50c4
IM
84 .send_IPI_self = NULL,
85
86 .wakeup_cpu = NULL,
87 .trampoline_phys_low = TRAMPOLINE_PHYS_LOW,
88 .trampoline_phys_high = TRAMPOLINE_PHYS_HIGH,
89 .wait_for_init_deassert = wait_for_init_deassert,
90 .smp_callin_clear_local_apic = smp_callin_clear_local_apic,
91 .store_NMI_vector = store_NMI_vector,
92 .restore_NMI_vector = restore_NMI_vector,
93 .inquire_remote_apic = inquire_remote_apic,
94};