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.

139 lines
4.9 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/base/linux24/arch-x86-64-acpi-hotfix.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. Marcelo unfortunately added an last minute ACPI update that changed
  23. ACPI interfaces and broke x86-64 compilation. I didn't catch it in
  24. time, so 2.4.22 does not compile out of the box for AMD64.
  25. This patch fixes it.
  26. You'll have to apply it when compiling 2.4.22 for x86-64
  27. -Andi
  28. ----------
  29. Update x86-64 for the ACPI interrupt link changes.
  30. diff -u linux/arch/x86_64/kernel/io_apic.c-LINK linux/arch/x86_64/kernel/io_apic.c
  31. --- linux/arch/x86_64/kernel/io_apic.c-LINK 2003-08-22 12:29:21.000000000 +0200
  32. +++ linux/arch/x86_64/kernel/io_apic.c 2003-08-22 12:38:16.000000000 +0200
  33. @@ -1762,7 +1762,7 @@
  34. }
  35. -int io_apic_set_pci_routing (int ioapic, int pin, int irq)
  36. +int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level ,int active_high_low)
  37. {
  38. struct IO_APIC_route_entry entry;
  39. unsigned long flags;
  40. @@ -1785,18 +1785,21 @@
  41. entry.dest_mode = INT_DELIVERY_MODE;
  42. entry.dest.logical.logical_dest = TARGET_CPUS;
  43. entry.mask = 1; /* Disabled (masked) */
  44. - entry.trigger = 1; /* Level sensitive */
  45. - entry.polarity = 1; /* Low active */
  46. + entry.trigger = edge_level;
  47. + entry.polarity = active_high_low;
  48. add_pin_to_irq(irq, ioapic, pin);
  49. entry.vector = assign_irq_vector(irq);
  50. printk(KERN_DEBUG "IOAPIC[%d]: Set PCI routing entry (%d-%d -> 0x%x -> "
  51. - "IRQ %d)\n", ioapic,
  52. - mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq);
  53. + "IRQ %d) Mode:%i Active:%i\n", ioapic,
  54. + mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq, edge_level, active_high_low);
  55. - irq_desc[irq].handler = &ioapic_level_irq_type;
  56. + if (edge_level)
  57. + irq_desc[irq].handler = &ioapic_level_irq_type;
  58. + else
  59. + irq_desc[irq].handler = &ioapic_edge_irq_type;
  60. set_intr_gate(entry.vector, interrupt[irq]);
  61. diff -u linux/arch/x86_64/kernel/mpparse.c-LINK linux/arch/x86_64/kernel/mpparse.c
  62. --- linux/arch/x86_64/kernel/mpparse.c-LINK 2003-08-22 12:29:21.000000000 +0200
  63. +++ linux/arch/x86_64/kernel/mpparse.c 2003-08-22 12:29:25.000000000 +0200
  64. @@ -923,7 +923,7 @@
  65. ioapic_pin = irq - mp_ioapic_routing[ioapic].irq_start;
  66. - io_apic_set_pci_routing(ioapic, ioapic_pin, irq);
  67. + io_apic_set_pci_routing(ioapic, ioapic_pin, irq, 1, 1);
  68. }
  69. #endif /*CONFIG_ACPI_HT_ONLY*/
  70. @@ -939,6 +939,8 @@
  71. int ioapic_pin = 0;
  72. int irq = 0;
  73. int idx, bit = 0;
  74. + int edge_level = 0;
  75. + int active_high_low = 0;
  76. /*
  77. * Parsing through the PCI Interrupt Routing Table (PRT) and program
  78. @@ -949,11 +951,14 @@
  79. /* Need to get irq for dynamic entry */
  80. if (entry->link.handle) {
  81. - irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index);
  82. + irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index, &edge_level, &active_high_low);
  83. if (!irq)
  84. continue;
  85. - } else
  86. + } else {
  87. + edge_level = 1;
  88. + active_high_low = 1;
  89. irq = entry->link.index;
  90. + }
  91. irq = entry->link.index;
  92. ioapic = mp_find_ioapic(irq);
  93. @@ -983,7 +988,7 @@
  94. mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit);
  95. - vector = io_apic_set_pci_routing(ioapic, ioapic_pin, irq);
  96. + vector = io_apic_set_pci_routing(ioapic, ioapic_pin, irq, edge_level, active_high_low);
  97. if (vector)
  98. entry->irq = irq;
  99. diff -u linux/include/asm-x86_64/io_apic.h-LINK linux/include/asm-x86_64/io_apic.h
  100. --- linux/include/asm-x86_64/io_apic.h-LINK 2003-08-22 12:29:21.000000000 +0200
  101. +++ linux/include/asm-x86_64/io_apic.h 2003-08-22 12:29:25.000000000 +0200
  102. @@ -148,6 +148,6 @@
  103. extern int io_apic_get_unique_id (int ioapic, int apic_id);
  104. extern int io_apic_get_version (int ioapic);
  105. extern int io_apic_get_redir_entries (int ioapic);
  106. -extern int io_apic_set_pci_routing (int ioapic, int pin, int irq);
  107. +extern int io_apic_set_pci_routing (int ioapic, int pin, int irq, int, int);
  108. #endif
  109. -
  110. To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
  111. the body of a message to majordomo@vger.kernel.org
  112. More majordomo info at http://vger.kernel.org/majordomo-info.html
  113. Please read the FAQ at http://www.tux.org/lkml/