summit.c 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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 = apic_id_registered,
  42. .int_delivery_mode = INT_DELIVERY_MODE,
  43. .int_dest_mode = INT_DEST_MODE,
  44. .target_cpus = target_cpus,
  45. .ESR_DISABLE = esr_disable,
  46. .apic_destination_logical = APIC_DEST_LOGICAL,
  47. .check_apicid_used = check_apicid_used,
  48. .check_apicid_present = check_apicid_present,
  49. .no_balance_irq = NO_BALANCE_IRQ,
  50. .no_ioapic_check = 0,
  51. .vector_allocation_domain = vector_allocation_domain,
  52. .init_apic_ldr = init_apic_ldr,
  53. .ioapic_phys_id_map = ioapic_phys_id_map,
  54. .setup_apic_routing = setup_apic_routing,
  55. .multi_timer_check = multi_timer_check,
  56. .apicid_to_node = apicid_to_node,
  57. .cpu_to_logical_apicid = cpu_to_logical_apicid,
  58. .cpu_present_to_apicid = cpu_present_to_apicid,
  59. .apicid_to_cpu_present = apicid_to_cpu_present,
  60. .setup_portio_remap = setup_portio_remap,
  61. .check_phys_apicid_present = check_phys_apicid_present,
  62. .enable_apic_mode = enable_apic_mode,
  63. .phys_pkg_id = phys_pkg_id,
  64. .mps_oem_check = mps_oem_check,
  65. .get_apic_id = get_apic_id,
  66. .set_apic_id = NULL,
  67. .apic_id_mask = APIC_ID_MASK,
  68. .cpu_mask_to_apicid = cpu_mask_to_apicid,
  69. .cpu_mask_to_apicid_and = cpu_mask_to_apicid_and,
  70. .send_IPI_mask = send_IPI_mask,
  71. .send_IPI_mask_allbutself = NULL,
  72. .send_IPI_allbutself = send_IPI_allbutself,
  73. .send_IPI_all = send_IPI_all,
  74. .send_IPI_self = NULL,
  75. .wakeup_cpu = NULL,
  76. .trampoline_phys_low = TRAMPOLINE_PHYS_LOW,
  77. .trampoline_phys_high = TRAMPOLINE_PHYS_HIGH,
  78. .wait_for_init_deassert = wait_for_init_deassert,
  79. .smp_callin_clear_local_apic = smp_callin_clear_local_apic,
  80. .store_NMI_vector = store_NMI_vector,
  81. .restore_NMI_vector = restore_NMI_vector,
  82. .inquire_remote_apic = inquire_remote_apic,
  83. };