numaq.c 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*
  2. * APIC driver for the IBM NUMAQ 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/numaq/apicdef.h>
  15. #include <linux/smp.h>
  16. #include <asm/numaq/apic.h>
  17. #include <asm/numaq/ipi.h>
  18. #include <asm/numaq/mpparse.h>
  19. #include <asm/numaq/wakecpu.h>
  20. #include <asm/numaq.h>
  21. static int mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
  22. {
  23. numaq_mps_oem_check(mpc, oem, productid);
  24. return found_numaq;
  25. }
  26. static int probe_numaq(void)
  27. {
  28. /* already know from get_memcfg_numaq() */
  29. return found_numaq;
  30. }
  31. /* Hook from generic ACPI tables.c */
  32. static int acpi_madt_oem_check(char *oem_id, char *oem_table_id)
  33. {
  34. return 0;
  35. }
  36. static void vector_allocation_domain(int cpu, cpumask_t *retmask)
  37. {
  38. /* Careful. Some cpus do not strictly honor the set of cpus
  39. * specified in the interrupt destination when using lowest
  40. * priority interrupt delivery mode.
  41. *
  42. * In particular there was a hyperthreading cpu observed to
  43. * deliver interrupts to the wrong hyperthread when only one
  44. * hyperthread was specified in the interrupt desitination.
  45. */
  46. *retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } };
  47. }
  48. struct genapic apic_numaq = {
  49. .name = "NUMAQ",
  50. .probe = probe_numaq,
  51. .acpi_madt_oem_check = acpi_madt_oem_check,
  52. .apic_id_registered = apic_id_registered,
  53. .int_delivery_mode = INT_DELIVERY_MODE,
  54. .int_dest_mode = INT_DEST_MODE,
  55. .target_cpus = target_cpus,
  56. .ESR_DISABLE = esr_disable,
  57. .apic_destination_logical = APIC_DEST_LOGICAL,
  58. .check_apicid_used = check_apicid_used,
  59. .check_apicid_present = check_apicid_present,
  60. .no_balance_irq = NO_BALANCE_IRQ,
  61. .no_ioapic_check = 0,
  62. .vector_allocation_domain = vector_allocation_domain,
  63. .init_apic_ldr = init_apic_ldr,
  64. .ioapic_phys_id_map = ioapic_phys_id_map,
  65. .setup_apic_routing = setup_apic_routing,
  66. .multi_timer_check = multi_timer_check,
  67. .apicid_to_node = apicid_to_node,
  68. .cpu_to_logical_apicid = cpu_to_logical_apicid,
  69. .cpu_present_to_apicid = cpu_present_to_apicid,
  70. .apicid_to_cpu_present = apicid_to_cpu_present,
  71. .setup_portio_remap = setup_portio_remap,
  72. .check_phys_apicid_present = check_phys_apicid_present,
  73. .enable_apic_mode = enable_apic_mode,
  74. .phys_pkg_id = phys_pkg_id,
  75. .mps_oem_check = mps_oem_check,
  76. .get_apic_id = get_apic_id,
  77. .set_apic_id = NULL,
  78. .apic_id_mask = APIC_ID_MASK,
  79. .cpu_mask_to_apicid = cpu_mask_to_apicid,
  80. .cpu_mask_to_apicid_and = cpu_mask_to_apicid_and,
  81. .send_IPI_mask = send_IPI_mask,
  82. .send_IPI_mask_allbutself = NULL,
  83. .send_IPI_allbutself = send_IPI_allbutself,
  84. .send_IPI_all = send_IPI_all,
  85. .send_IPI_self = NULL,
  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. };