summit.c 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. * APIC driver for the IBM "Summit" chipset.
  3. */
  4. #define APIC_DEFINITION 1
  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>
  13. #include <linux/init.h>
  14. #include <asm/summit/apicdef.h>
  15. #include <linux/smp.h>
  16. #include <asm/summit/apic.h>
  17. #include <asm/summit/ipi.h>
  18. #include <asm/summit/mpparse.h>
  19. #include <asm/mach-default/mach_wakecpu.h>
  20. static int probe_summit(void)
  21. {
  22. /* probed later in mptable/ACPI hooks */
  23. return 0;
  24. }
  25. static void vector_allocation_domain(int cpu, cpumask_t *retmask)
  26. {
  27. /* Careful. Some cpus do not strictly honor the set of cpus
  28. * specified in the interrupt destination when using lowest
  29. * priority interrupt delivery mode.
  30. *
  31. * In particular there was a hyperthreading cpu observed to
  32. * deliver interrupts to the wrong hyperthread when only one
  33. * hyperthread was specified in the interrupt desitination.
  34. */
  35. *retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } };
  36. }
  37. struct genapic apic_summit = {
  38. .name = "summit",
  39. .probe = probe_summit,
  40. .acpi_madt_oem_check = summit_acpi_madt_oem_check,
  41. .apic_id_registered = summit_apic_id_registered,
  42. .irq_delivery_mode = dest_LowestPrio,
  43. /* logical delivery broadcast to all CPUs: */
  44. .irq_dest_mode = 1,
  45. .target_cpus = summit_target_cpus,
  46. .disable_esr = 1,
  47. .apic_destination_logical = APIC_DEST_LOGICAL,
  48. .check_apicid_used = check_apicid_used,
  49. .check_apicid_present = check_apicid_present,
  50. .no_balance_irq = NO_BALANCE_IRQ,
  51. .no_ioapic_check = 0,
  52. .vector_allocation_domain = vector_allocation_domain,
  53. .init_apic_ldr = init_apic_ldr,
  54. .ioapic_phys_id_map = ioapic_phys_id_map,
  55. .setup_apic_routing = setup_apic_routing,
  56. .multi_timer_check = multi_timer_check,
  57. .apicid_to_node = apicid_to_node,
  58. .cpu_to_logical_apicid = cpu_to_logical_apicid,
  59. .cpu_present_to_apicid = cpu_present_to_apicid,
  60. .apicid_to_cpu_present = apicid_to_cpu_present,
  61. .setup_portio_remap = setup_portio_remap,
  62. .check_phys_apicid_present = check_phys_apicid_present,
  63. .enable_apic_mode = enable_apic_mode,
  64. .phys_pkg_id = phys_pkg_id,
  65. .mps_oem_check = mps_oem_check,
  66. .get_apic_id = get_apic_id,
  67. .set_apic_id = NULL,
  68. .apic_id_mask = APIC_ID_MASK,
  69. .cpu_mask_to_apicid = cpu_mask_to_apicid,
  70. .cpu_mask_to_apicid_and = cpu_mask_to_apicid_and,
  71. .send_IPI_mask = send_IPI_mask,
  72. .send_IPI_mask_allbutself = NULL,
  73. .send_IPI_allbutself = send_IPI_allbutself,
  74. .send_IPI_all = send_IPI_all,
  75. .send_IPI_self = NULL,
  76. .wakeup_cpu = NULL,
  77. .trampoline_phys_low = TRAMPOLINE_PHYS_LOW,
  78. .trampoline_phys_high = TRAMPOLINE_PHYS_HIGH,
  79. .wait_for_init_deassert = wait_for_init_deassert,
  80. .smp_callin_clear_local_apic = smp_callin_clear_local_apic,
  81. .store_NMI_vector = store_NMI_vector,
  82. .restore_NMI_vector = restore_NMI_vector,
  83. .inquire_remote_apic = inquire_remote_apic,
  84. };