diff -u -r 40_pcibios_segment/arch/ia64/kernel/acpi.c 50_iosapic_segment/arch/ia64/kernel/acpi.c --- 40_pcibios_segment/arch/ia64/kernel/acpi.c Mon Jul 22 09:52:13 2002 +++ 50_iosapic_segment/arch/ia64/kernel/acpi.c Mon Jul 22 09:54:02 2002 @@ -695,6 +695,7 @@ list_for_each(node, &acpi_prts.entries) { entry = (struct acpi_prt_entry *)node; + vector[i].segment = entry->id.seg; vector[i].bus = entry->id.bus; vector[i].pci_id = ((u32) entry->id.dev << 16) | 0xffff; vector[i].pin = entry->id.pin; diff -u -r 40_pcibios_segment/arch/ia64/kernel/iosapic.c 50_iosapic_segment/arch/ia64/kernel/iosapic.c --- 40_pcibios_segment/arch/ia64/kernel/iosapic.c Mon Jul 22 09:52:13 2002 +++ 50_iosapic_segment/arch/ia64/kernel/iosapic.c Mon Jul 22 09:54:02 2002 @@ -26,12 +26,13 @@ * 02/04/18 J.I. Lee bug fix in iosapic_init_pci_irq * 02/04/30 J.I. Lee bug fix in find_iosapic to fix ACPI PCI IRQ to IOSAPIC mapping * error + * 02/07/11 B. Helgaas Support PCI segments */ /* * Here is what the interrupt logic between a PCI device and the CPU looks like: * * (1) A PCI device raises one of the four interrupt pins (INTA, INTB, INTC, INTD). The - * device is uniquely identified by its bus--, and slot-number (the function + * device is uniquely identified by its segment--, bus--, and slot-number (the function * number does not matter here because all functions share the same interrupt * lines). * @@ -141,12 +142,13 @@ * return -1. */ int -pci_pin_to_vector (int bus, int slot, int pci_pin) +pci_pin_to_vector (int segment, int bus, int slot, int pci_pin) { struct pci_vector_struct *r; for (r = pci_irq.route; r < pci_irq.route + pci_irq.num_routes; ++r) - if (r->bus == bus && (r->pci_id >> 16) == slot && r->pin == pci_pin) + if (r->segment == segment && r->bus == bus && + (r->pci_id >> 16) == slot && r->pin == pci_pin) return iosapic_irq_to_vector(r->irq); return -1; } @@ -691,6 +693,7 @@ iosapic_pci_fixup (int phase) { struct pci_dev *dev; + int segment; unsigned char pin; int vector; struct hw_interrupt_type *irq_type; @@ -708,7 +711,8 @@ pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); if (pin) { pin--; /* interrupt pins are numbered starting from 1 */ - vector = pci_pin_to_vector(dev->bus->number, PCI_SLOT(dev->devfn), pin); + segment = PCI_SEGMENT(dev); + vector = pci_pin_to_vector(segment, dev->bus->number, PCI_SLOT(dev->devfn), pin); if (vector < 0 && dev->bus->parent) { /* go back to the bridge */ struct pci_dev *bridge = dev->bus->self; @@ -718,7 +722,7 @@ do { /* do the bridge swizzle... */ pin = (pin + PCI_SLOT(dev->devfn)) % 4; - vector = pci_pin_to_vector(bridge->bus->number, + vector = pci_pin_to_vector(segment, bridge->bus->number, PCI_SLOT(bridge->devfn), pin); } while (vector < 0 && (bridge = bridge->bus->self)); diff -u -r 40_pcibios_segment/include/asm-ia64/system.h 50_iosapic_segment/include/asm-ia64/system.h --- 40_pcibios_segment/include/asm-ia64/system.h Mon Jul 22 07:43:12 2002 +++ 50_iosapic_segment/include/asm-ia64/system.h Mon Jul 22 09:54:02 2002 @@ -29,6 +29,7 @@ #include struct pci_vector_struct { + __u16 segment; /* PCI Segment number */ __u16 bus; /* PCI Bus number */ __u32 pci_id; /* ACPI split 16 bits device, 16 bits function (see section 6.1.1) */ __u8 pin; /* PCI PIN (0 = A, 1 = B, 2 = C, 3 = D) */