Commit 91b6e661 authored by Len Brown's avatar Len Brown

Merge intel.com:/home/lenb/bk/linux-2.6.5

into intel.com:/home/lenb/src/linux-acpi-test-2.6.5
parents 4e6e2877 4711f01a
...@@ -277,7 +277,7 @@ acpi_parse_ioapic ( ...@@ -277,7 +277,7 @@ acpi_parse_ioapic (
* Parse Interrupt Source Override for the ACPI SCI * Parse Interrupt Source Override for the ACPI SCI
*/ */
static void static void
acpi_parse_sci_int_src_ovr(u8 bus_irq, u16 polarity, u16 trigger, u32 global_irq) acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger)
{ {
if (trigger == 0) /* compatible SCI trigger is level */ if (trigger == 0) /* compatible SCI trigger is level */
trigger = 3; trigger = 3;
...@@ -292,13 +292,18 @@ acpi_parse_sci_int_src_ovr(u8 bus_irq, u16 polarity, u16 trigger, u32 global_irq ...@@ -292,13 +292,18 @@ acpi_parse_sci_int_src_ovr(u8 bus_irq, u16 polarity, u16 trigger, u32 global_irq
if (acpi_sci_flags.polarity) if (acpi_sci_flags.polarity)
polarity = acpi_sci_flags.polarity; polarity = acpi_sci_flags.polarity;
mp_override_legacy_irq(bus_irq, polarity, trigger, global_irq); /*
* mp_config_acpi_legacy_irqs() already setup IRQs < 16
* If GSI is < 16, this will update its flags,
* else it will create a new mp_irqs[] entry.
*/
mp_override_legacy_irq(gsi, polarity, trigger, gsi);
/* /*
* stash over-ride to indicate we've been here * stash over-ride to indicate we've been here
* and for later update of acpi_fadt * and for later update of acpi_fadt
*/ */
acpi_sci_override_gsi = global_irq; acpi_sci_override_gsi = gsi;
return; return;
} }
...@@ -315,9 +320,8 @@ acpi_parse_int_src_ovr ( ...@@ -315,9 +320,8 @@ acpi_parse_int_src_ovr (
acpi_table_print_madt_entry(header); acpi_table_print_madt_entry(header);
if (intsrc->bus_irq == acpi_fadt.sci_int) { if (intsrc->bus_irq == acpi_fadt.sci_int) {
acpi_parse_sci_int_src_ovr(intsrc->bus_irq, acpi_sci_ioapic_setup(intsrc->global_irq,
intsrc->flags.polarity, intsrc->flags.trigger, intsrc->flags.polarity, intsrc->flags.trigger);
intsrc->global_irq);
return 0; return 0;
} }
...@@ -660,7 +664,7 @@ acpi_parse_madt_ioapic_entries(void) ...@@ -660,7 +664,7 @@ acpi_parse_madt_ioapic_entries(void)
* pretend we got one so we can set the SCI flags. * pretend we got one so we can set the SCI flags.
*/ */
if (!acpi_sci_override_gsi) if (!acpi_sci_override_gsi)
acpi_parse_sci_int_src_ovr(acpi_fadt.sci_int, 0, 0, acpi_fadt.sci_int); acpi_sci_ioapic_setup(acpi_fadt.sci_int, 0, 0);
count = acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src, NR_IRQ_VECTORS); count = acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src, NR_IRQ_VECTORS);
if (count < 0) { if (count < 0) {
......
...@@ -72,6 +72,7 @@ struct acpi_pci_link_irq { ...@@ -72,6 +72,7 @@ struct acpi_pci_link_irq {
u8 edge_level; /* All IRQs */ u8 edge_level; /* All IRQs */
u8 active_high_low; /* All IRQs */ u8 active_high_low; /* All IRQs */
u8 setonboot; u8 setonboot;
u8 resource_type;
u8 possible_count; u8 possible_count;
u8 possible[ACPI_PCI_LINK_MAX_POSSIBLE]; u8 possible[ACPI_PCI_LINK_MAX_POSSIBLE];
}; };
...@@ -123,6 +124,7 @@ acpi_pci_link_check_possible ( ...@@ -123,6 +124,7 @@ acpi_pci_link_check_possible (
} }
link->irq.edge_level = p->edge_level; link->irq.edge_level = p->edge_level;
link->irq.active_high_low = p->active_high_low; link->irq.active_high_low = p->active_high_low;
link->irq.resource_type = ACPI_RSTYPE_IRQ;
break; break;
} }
case ACPI_RSTYPE_EXT_IRQ: case ACPI_RSTYPE_EXT_IRQ:
...@@ -143,6 +145,7 @@ acpi_pci_link_check_possible ( ...@@ -143,6 +145,7 @@ acpi_pci_link_check_possible (
} }
link->irq.edge_level = p->edge_level; link->irq.edge_level = p->edge_level;
link->irq.active_high_low = p->active_high_low; link->irq.active_high_low = p->active_high_low;
link->irq.resource_type = ACPI_RSTYPE_EXT_IRQ;
break; break;
} }
default: default:
...@@ -342,13 +345,18 @@ acpi_pci_link_set ( ...@@ -342,13 +345,18 @@ acpi_pci_link_set (
} }
} }
resource_type = link->irq.resource_type;
if (resource_type != ACPI_RSTYPE_IRQ &&
resource_type != ACPI_RSTYPE_EXT_IRQ){
/* If IRQ<=15, first try with a "normal" IRQ descriptor. If that fails, try with /* If IRQ<=15, first try with a "normal" IRQ descriptor. If that fails, try with
* an extended one */ * an extended one */
if (irq <= 15) { if (irq <= 15) {
resource_type = ACPI_RSTYPE_IRQ; resource_type = ACPI_RSTYPE_IRQ;
} else { } else {
resource_type = ACPI_RSTYPE_EXT_IRQ; resource_type = ACPI_RSTYPE_EXT_IRQ;
} }
}
retry_programming: retry_programming:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment