Paolo Ciarrocchi | 8108576 | 2008-02-20 00:17:34 +0100 | [diff] [blame] | 1 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | * APIC driver for the IBM "Summit" chipset. |
| 3 | */ |
| 4 | #define APIC_DEFINITION 1 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | #include <linux/threads.h> |
| 6 | #include <linux/cpumask.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | #include <linux/init.h> |
Yinghai Lu | e8c48ef | 2008-07-25 02:17:44 -0700 | [diff] [blame] | 14 | #include <asm/summit/apicdef.h> |
Yinghai Lu | 4696ca5 | 2008-07-11 18:43:10 -0700 | [diff] [blame] | 15 | #include <linux/smp.h> |
Yinghai Lu | e8c48ef | 2008-07-25 02:17:44 -0700 | [diff] [blame] | 16 | #include <asm/summit/apic.h> |
| 17 | #include <asm/summit/ipi.h> |
| 18 | #include <asm/summit/mpparse.h> |
Yinghai Lu | 569712b | 2008-11-16 03:12:49 -0800 | [diff] [blame] | 19 | #include <asm/mach-default/mach_wakecpu.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | |
Vivek Goyal | e96763d | 2007-01-11 01:52:44 +0100 | [diff] [blame] | 21 | static int probe_summit(void) |
Paolo Ciarrocchi | 8108576 | 2008-02-20 00:17:34 +0100 | [diff] [blame] | 22 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | /* probed later in mptable/ACPI hooks */ |
| 24 | return 0; |
Paolo Ciarrocchi | 8108576 | 2008-02-20 00:17:34 +0100 | [diff] [blame] | 25 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | |
Mike Travis | e798673 | 2008-12-16 17:33:52 -0800 | [diff] [blame] | 27 | static void vector_allocation_domain(int cpu, cpumask_t *retmask) |
Yinghai Lu | 497c9a1 | 2008-08-19 20:50:28 -0700 | [diff] [blame] | 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 | */ |
Mike Travis | e798673 | 2008-12-16 17:33:52 -0800 | [diff] [blame] | 37 | *retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } }; |
Yinghai Lu | 497c9a1 | 2008-08-19 20:50:28 -0700 | [diff] [blame] | 38 | } |
| 39 | |
Ingo Molnar | 491a50c | 2009-01-28 03:32:03 +0100 | [diff] [blame^] | 40 | struct genapic apic_summit = { |
| 41 | |
| 42 | .name = "summit", |
| 43 | .probe = probe_summit, |
| 44 | .acpi_madt_oem_check = acpi_madt_oem_check, |
| 45 | .apic_id_registered = apic_id_registered, |
| 46 | |
| 47 | .int_delivery_mode = INT_DELIVERY_MODE, |
| 48 | .int_dest_mode = INT_DEST_MODE, |
| 49 | |
| 50 | .target_cpus = target_cpus, |
| 51 | .ESR_DISABLE = esr_disable, |
| 52 | .apic_destination_logical = APIC_DEST_LOGICAL, |
| 53 | .check_apicid_used = check_apicid_used, |
| 54 | .check_apicid_present = check_apicid_present, |
| 55 | |
| 56 | .no_balance_irq = NO_BALANCE_IRQ, |
| 57 | .no_ioapic_check = 0, |
| 58 | |
| 59 | .vector_allocation_domain = vector_allocation_domain, |
| 60 | .init_apic_ldr = init_apic_ldr, |
| 61 | |
| 62 | .ioapic_phys_id_map = ioapic_phys_id_map, |
| 63 | .setup_apic_routing = setup_apic_routing, |
| 64 | .multi_timer_check = multi_timer_check, |
| 65 | .apicid_to_node = apicid_to_node, |
| 66 | .cpu_to_logical_apicid = cpu_to_logical_apicid, |
| 67 | .cpu_present_to_apicid = cpu_present_to_apicid, |
| 68 | .apicid_to_cpu_present = apicid_to_cpu_present, |
| 69 | .setup_portio_remap = setup_portio_remap, |
| 70 | .check_phys_apicid_present = check_phys_apicid_present, |
| 71 | .enable_apic_mode = enable_apic_mode, |
| 72 | .phys_pkg_id = phys_pkg_id, |
| 73 | .mps_oem_check = mps_oem_check, |
| 74 | |
| 75 | .get_apic_id = get_apic_id, |
| 76 | .set_apic_id = NULL, |
| 77 | .apic_id_mask = APIC_ID_MASK, |
| 78 | |
| 79 | .cpu_mask_to_apicid = cpu_mask_to_apicid, |
| 80 | .cpu_mask_to_apicid_and = cpu_mask_to_apicid_and, |
| 81 | |
| 82 | .send_IPI_mask = send_IPI_mask, |
| 83 | .send_IPI_mask_allbutself = NULL, |
| 84 | .send_IPI_allbutself = send_IPI_allbutself, |
| 85 | .send_IPI_all = send_IPI_all, |
| 86 | .send_IPI_self = NULL, |
| 87 | |
| 88 | .wakeup_cpu = NULL, |
| 89 | .trampoline_phys_low = TRAMPOLINE_PHYS_LOW, |
| 90 | .trampoline_phys_high = TRAMPOLINE_PHYS_HIGH, |
| 91 | .wait_for_init_deassert = wait_for_init_deassert, |
| 92 | .smp_callin_clear_local_apic = smp_callin_clear_local_apic, |
| 93 | .store_NMI_vector = store_NMI_vector, |
| 94 | .restore_NMI_vector = restore_NMI_vector, |
| 95 | .inquire_remote_apic = inquire_remote_apic, |
| 96 | }; |