mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
3.9 KiB

  1. Marcelo unfortunately added an last minute ACPI update that changed
  2. ACPI interfaces and broke x86-64 compilation. I didn't catch it in
  3. time, so 2.4.22 does not compile out of the box for AMD64.
  4. This patch fixes it.
  5. You'll have to apply it when compiling 2.4.22 for x86-64
  6. -Andi
  7. ----------
  8. Update x86-64 for the ACPI interrupt link changes.
  9. diff -u linux/arch/x86_64/kernel/io_apic.c-LINK linux/arch/x86_64/kernel/io_apic.c
  10. --- linux/arch/x86_64/kernel/io_apic.c-LINK 2003-08-22 12:29:21.000000000 +0200
  11. +++ linux/arch/x86_64/kernel/io_apic.c 2003-08-22 12:38:16.000000000 +0200
  12. @@ -1762,7 +1762,7 @@
  13. }
  14. -int io_apic_set_pci_routing (int ioapic, int pin, int irq)
  15. +int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level ,int active_high_low)
  16. {
  17. struct IO_APIC_route_entry entry;
  18. unsigned long flags;
  19. @@ -1785,18 +1785,21 @@
  20. entry.dest_mode = INT_DELIVERY_MODE;
  21. entry.dest.logical.logical_dest = TARGET_CPUS;
  22. entry.mask = 1; /* Disabled (masked) */
  23. - entry.trigger = 1; /* Level sensitive */
  24. - entry.polarity = 1; /* Low active */
  25. + entry.trigger = edge_level;
  26. + entry.polarity = active_high_low;
  27. add_pin_to_irq(irq, ioapic, pin);
  28. entry.vector = assign_irq_vector(irq);
  29. printk(KERN_DEBUG "IOAPIC[%d]: Set PCI routing entry (%d-%d -> 0x%x -> "
  30. - "IRQ %d)\n", ioapic,
  31. - mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq);
  32. + "IRQ %d) Mode:%i Active:%i\n", ioapic,
  33. + mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq, edge_level, active_high_low);
  34. - irq_desc[irq].handler = &ioapic_level_irq_type;
  35. + if (edge_level)
  36. + irq_desc[irq].handler = &ioapic_level_irq_type;
  37. + else
  38. + irq_desc[irq].handler = &ioapic_edge_irq_type;
  39. set_intr_gate(entry.vector, interrupt[irq]);
  40. diff -u linux/arch/x86_64/kernel/mpparse.c-LINK linux/arch/x86_64/kernel/mpparse.c
  41. --- linux/arch/x86_64/kernel/mpparse.c-LINK 2003-08-22 12:29:21.000000000 +0200
  42. +++ linux/arch/x86_64/kernel/mpparse.c 2003-08-22 12:29:25.000000000 +0200
  43. @@ -923,7 +923,7 @@
  44. ioapic_pin = irq - mp_ioapic_routing[ioapic].irq_start;
  45. - io_apic_set_pci_routing(ioapic, ioapic_pin, irq);
  46. + io_apic_set_pci_routing(ioapic, ioapic_pin, irq, 1, 1);
  47. }
  48. #endif /*CONFIG_ACPI_HT_ONLY*/
  49. @@ -939,6 +939,8 @@
  50. int ioapic_pin = 0;
  51. int irq = 0;
  52. int idx, bit = 0;
  53. + int edge_level = 0;
  54. + int active_high_low = 0;
  55. /*
  56. * Parsing through the PCI Interrupt Routing Table (PRT) and program
  57. @@ -949,11 +951,14 @@
  58. /* Need to get irq for dynamic entry */
  59. if (entry->link.handle) {
  60. - irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index);
  61. + irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index, &edge_level, &active_high_low);
  62. if (!irq)
  63. continue;
  64. - } else
  65. + } else {
  66. + edge_level = 1;
  67. + active_high_low = 1;
  68. irq = entry->link.index;
  69. + }
  70. irq = entry->link.index;
  71. ioapic = mp_find_ioapic(irq);
  72. @@ -983,7 +988,7 @@
  73. mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit);
  74. - vector = io_apic_set_pci_routing(ioapic, ioapic_pin, irq);
  75. + vector = io_apic_set_pci_routing(ioapic, ioapic_pin, irq, edge_level, active_high_low);
  76. if (vector)
  77. entry->irq = irq;
  78. diff -u linux/include/asm-x86_64/io_apic.h-LINK linux/include/asm-x86_64/io_apic.h
  79. --- linux/include/asm-x86_64/io_apic.h-LINK 2003-08-22 12:29:21.000000000 +0200
  80. +++ linux/include/asm-x86_64/io_apic.h 2003-08-22 12:29:25.000000000 +0200
  81. @@ -148,6 +148,6 @@
  82. extern int io_apic_get_unique_id (int ioapic, int apic_id);
  83. extern int io_apic_get_version (int ioapic);
  84. extern int io_apic_get_redir_entries (int ioapic);
  85. -extern int io_apic_set_pci_routing (int ioapic, int pin, int irq);
  86. +extern int io_apic_set_pci_routing (int ioapic, int pin, int irq, int, int);
  87. #endif
  88. -
  89. To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
  90. the body of a message to majordomo@vger.kernel.org
  91. More majordomo info at http://vger.kernel.org/majordomo-info.html
  92. Please read the FAQ at http://www.tux.org/lkml/