diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-07 18:41:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-07 18:41:01 -0500 |
commit | b424e8d3b438e841cd1700f6433a100a5d611e4a (patch) | |
tree | 545638d0b925de4c7f740286760767cca86cb91e /arch/x86 | |
parent | 7c7758f99d39d529a64d4f60d22129bbf2f16d74 (diff) | |
parent | f6dc1e5e3d4b523e1616b43beddb04e4fb1d376a (diff) |
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (98 commits)
PCI PM: Put PM callbacks in the order of execution
PCI PM: Run default PM callbacks for all devices using new framework
PCI PM: Register power state of devices during initialization
PCI PM: Call pci_fixup_device from legacy routines
PCI PM: Rearrange code in pci-driver.c
PCI PM: Avoid touching devices behind bridges in unknown state
PCI PM: Move pci_has_legacy_pm_support
PCI PM: Power-manage devices without drivers during suspend-resume
PCI PM: Add suspend counterpart of pci_reenable_device
PCI PM: Fix poweroff and restore callbacks
PCI: Use msleep instead of cpu_relax during ASPM link retraining
PCI: PCIe portdrv: Add kerneldoc comments to remining core funtions
PCI: PCIe portdrv: Rearrange code so that related things are together
PCI: PCIe portdrv: Fix suspend and resume of PCI Express port services
PCI: PCIe portdrv: Add kerneldoc comments to some core functions
x86/PCI: Do not use interrupt links for devices using MSI-X
net: sfc: Use pci_clear_master() to disable bus mastering
PCI: Add pci_clear_master() as opposite of pci_set_master()
PCI hotplug: remove redundant test in cpq hotplug
PCI: pciehp: cleanup register and field definitions
...
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/pci-dma.c | 2 | ||||
-rw-r--r-- | arch/x86/mm/init_32.c | 2 | ||||
-rw-r--r-- | arch/x86/mm/init_64.c | 2 | ||||
-rw-r--r-- | arch/x86/pci/acpi.c | 7 | ||||
-rw-r--r-- | arch/x86/pci/common.c | 12 | ||||
-rw-r--r-- | arch/x86/pci/i386.c | 4 | ||||
-rw-r--r-- | arch/x86/pci/init.c | 3 | ||||
-rw-r--r-- | arch/x86/pci/irq.c | 54 | ||||
-rw-r--r-- | arch/x86/pci/visws.c | 20 |
9 files changed, 48 insertions, 58 deletions
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 19a1044a0cd9..b25428533141 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
@@ -38,7 +38,7 @@ EXPORT_SYMBOL(bad_dma_address); | |||
38 | be probably a smaller DMA mask, but this is bug-to-bug compatible | 38 | be probably a smaller DMA mask, but this is bug-to-bug compatible |
39 | to older i386. */ | 39 | to older i386. */ |
40 | struct device x86_dma_fallback_dev = { | 40 | struct device x86_dma_fallback_dev = { |
41 | .bus_id = "fallback device", | 41 | .init_name = "fallback device", |
42 | .coherent_dma_mask = DMA_32BIT_MASK, | 42 | .coherent_dma_mask = DMA_32BIT_MASK, |
43 | .dma_mask = &x86_dma_fallback_dev.coherent_dma_mask, | 43 | .dma_mask = &x86_dma_fallback_dev.coherent_dma_mask, |
44 | }; | 44 | }; |
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index 544d724caeee..88f1b10de3be 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
@@ -328,6 +328,8 @@ int devmem_is_allowed(unsigned long pagenr) | |||
328 | { | 328 | { |
329 | if (pagenr <= 256) | 329 | if (pagenr <= 256) |
330 | return 1; | 330 | return 1; |
331 | if (iomem_is_exclusive(pagenr << PAGE_SHIFT)) | ||
332 | return 0; | ||
331 | if (!page_is_ram(pagenr)) | 333 | if (!page_is_ram(pagenr)) |
332 | return 1; | 334 | return 1; |
333 | return 0; | 335 | return 0; |
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 54c437e96541..23f68e77ad1f 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -888,6 +888,8 @@ int devmem_is_allowed(unsigned long pagenr) | |||
888 | { | 888 | { |
889 | if (pagenr <= 256) | 889 | if (pagenr <= 256) |
890 | return 1; | 890 | return 1; |
891 | if (iomem_is_exclusive(pagenr << PAGE_SHIFT)) | ||
892 | return 0; | ||
891 | if (!page_is_ram(pagenr)) | 893 | if (!page_is_ram(pagenr)) |
892 | return 1; | 894 | return 1; |
893 | return 0; | 895 | return 0; |
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 9e5752fe4d15..c0ecf250fe51 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
@@ -210,11 +210,10 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do | |||
210 | if (bus && node != -1) { | 210 | if (bus && node != -1) { |
211 | #ifdef CONFIG_ACPI_NUMA | 211 | #ifdef CONFIG_ACPI_NUMA |
212 | if (pxm >= 0) | 212 | if (pxm >= 0) |
213 | printk(KERN_DEBUG "bus %02x -> pxm %d -> node %d\n", | 213 | dev_printk(KERN_DEBUG, &bus->dev, |
214 | busnum, pxm, node); | 214 | "on NUMA node %d (pxm %d)\n", node, pxm); |
215 | #else | 215 | #else |
216 | printk(KERN_DEBUG "bus %02x -> node %d\n", | 216 | dev_printk(KERN_DEBUG, &bus->dev, "on NUMA node %d\n", node); |
217 | busnum, node); | ||
218 | #endif | 217 | #endif |
219 | } | 218 | } |
220 | 219 | ||
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 62ddb73e09ed..82d22fc601ae 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -551,17 +551,25 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) | |||
551 | if ((err = pci_enable_resources(dev, mask)) < 0) | 551 | if ((err = pci_enable_resources(dev, mask)) < 0) |
552 | return err; | 552 | return err; |
553 | 553 | ||
554 | if (!dev->msi_enabled) | 554 | if (!pci_dev_msi_enabled(dev)) |
555 | return pcibios_enable_irq(dev); | 555 | return pcibios_enable_irq(dev); |
556 | return 0; | 556 | return 0; |
557 | } | 557 | } |
558 | 558 | ||
559 | void pcibios_disable_device (struct pci_dev *dev) | 559 | void pcibios_disable_device (struct pci_dev *dev) |
560 | { | 560 | { |
561 | if (!dev->msi_enabled && pcibios_disable_irq) | 561 | if (!pci_dev_msi_enabled(dev) && pcibios_disable_irq) |
562 | pcibios_disable_irq(dev); | 562 | pcibios_disable_irq(dev); |
563 | } | 563 | } |
564 | 564 | ||
565 | int pci_ext_cfg_avail(struct pci_dev *dev) | ||
566 | { | ||
567 | if (raw_pci_ext_ops) | ||
568 | return 1; | ||
569 | else | ||
570 | return 0; | ||
571 | } | ||
572 | |||
565 | struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) | 573 | struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) |
566 | { | 574 | { |
567 | struct pci_bus *bus = NULL; | 575 | struct pci_bus *bus = NULL; |
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index e51bf2cda4b0..f884740da318 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c | |||
@@ -129,7 +129,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list) | |||
129 | pr = pci_find_parent_resource(dev, r); | 129 | pr = pci_find_parent_resource(dev, r); |
130 | if (!r->start || !pr || | 130 | if (!r->start || !pr || |
131 | request_resource(pr, r) < 0) { | 131 | request_resource(pr, r) < 0) { |
132 | dev_err(&dev->dev, "BAR %d: can't allocate resource\n", idx); | 132 | dev_info(&dev->dev, "BAR %d: can't allocate resource\n", idx); |
133 | /* | 133 | /* |
134 | * Something is wrong with the region. | 134 | * Something is wrong with the region. |
135 | * Invalidate the resource to prevent | 135 | * Invalidate the resource to prevent |
@@ -170,7 +170,7 @@ static void __init pcibios_allocate_resources(int pass) | |||
170 | r->flags, disabled, pass); | 170 | r->flags, disabled, pass); |
171 | pr = pci_find_parent_resource(dev, r); | 171 | pr = pci_find_parent_resource(dev, r); |
172 | if (!pr || request_resource(pr, r) < 0) { | 172 | if (!pr || request_resource(pr, r) < 0) { |
173 | dev_err(&dev->dev, "BAR %d: can't allocate resource\n", idx); | 173 | dev_info(&dev->dev, "BAR %d: can't allocate resource\n", idx); |
174 | /* We'll assign a new address later */ | 174 | /* We'll assign a new address later */ |
175 | r->end -= r->start; | 175 | r->end -= r->start; |
176 | r->start = 0; | 176 | r->start = 0; |
diff --git a/arch/x86/pci/init.c b/arch/x86/pci/init.c index bec3b048e72b..25a1f8efed4a 100644 --- a/arch/x86/pci/init.c +++ b/arch/x86/pci/init.c | |||
@@ -12,7 +12,8 @@ static __init int pci_arch_init(void) | |||
12 | type = pci_direct_probe(); | 12 | type = pci_direct_probe(); |
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | pci_mmcfg_early_init(); | 15 | if (!(pci_probe & PCI_PROBE_NOEARLY)) |
16 | pci_mmcfg_early_init(); | ||
16 | 17 | ||
17 | #ifdef CONFIG_PCI_OLPC | 18 | #ifdef CONFIG_PCI_OLPC |
18 | if (!pci_olpc_init()) | 19 | if (!pci_olpc_init()) |
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c index 373b9afe6d44..4064345cf144 100644 --- a/arch/x86/pci/irq.c +++ b/arch/x86/pci/irq.c | |||
@@ -533,7 +533,7 @@ static int pirq_bios_set(struct pci_dev *router, struct pci_dev *dev, int pirq, | |||
533 | { | 533 | { |
534 | struct pci_dev *bridge; | 534 | struct pci_dev *bridge; |
535 | int pin = pci_get_interrupt_pin(dev, &bridge); | 535 | int pin = pci_get_interrupt_pin(dev, &bridge); |
536 | return pcibios_set_irq_routing(bridge, pin, irq); | 536 | return pcibios_set_irq_routing(bridge, pin - 1, irq); |
537 | } | 537 | } |
538 | 538 | ||
539 | #endif | 539 | #endif |
@@ -887,7 +887,6 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign) | |||
887 | dev_dbg(&dev->dev, "no interrupt pin\n"); | 887 | dev_dbg(&dev->dev, "no interrupt pin\n"); |
888 | return 0; | 888 | return 0; |
889 | } | 889 | } |
890 | pin = pin - 1; | ||
891 | 890 | ||
892 | /* Find IRQ routing entry */ | 891 | /* Find IRQ routing entry */ |
893 | 892 | ||
@@ -897,17 +896,17 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign) | |||
897 | info = pirq_get_info(dev); | 896 | info = pirq_get_info(dev); |
898 | if (!info) { | 897 | if (!info) { |
899 | dev_dbg(&dev->dev, "PCI INT %c not found in routing table\n", | 898 | dev_dbg(&dev->dev, "PCI INT %c not found in routing table\n", |
900 | 'A' + pin); | 899 | 'A' + pin - 1); |
901 | return 0; | 900 | return 0; |
902 | } | 901 | } |
903 | pirq = info->irq[pin].link; | 902 | pirq = info->irq[pin - 1].link; |
904 | mask = info->irq[pin].bitmap; | 903 | mask = info->irq[pin - 1].bitmap; |
905 | if (!pirq) { | 904 | if (!pirq) { |
906 | dev_dbg(&dev->dev, "PCI INT %c not routed\n", 'A' + pin); | 905 | dev_dbg(&dev->dev, "PCI INT %c not routed\n", 'A' + pin - 1); |
907 | return 0; | 906 | return 0; |
908 | } | 907 | } |
909 | dev_dbg(&dev->dev, "PCI INT %c -> PIRQ %02x, mask %04x, excl %04x", | 908 | dev_dbg(&dev->dev, "PCI INT %c -> PIRQ %02x, mask %04x, excl %04x", |
910 | 'A' + pin, pirq, mask, pirq_table->exclusive_irqs); | 909 | 'A' + pin - 1, pirq, mask, pirq_table->exclusive_irqs); |
911 | mask &= pcibios_irq_mask; | 910 | mask &= pcibios_irq_mask; |
912 | 911 | ||
913 | /* Work around broken HP Pavilion Notebooks which assign USB to | 912 | /* Work around broken HP Pavilion Notebooks which assign USB to |
@@ -949,7 +948,7 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign) | |||
949 | newirq = i; | 948 | newirq = i; |
950 | } | 949 | } |
951 | } | 950 | } |
952 | dev_dbg(&dev->dev, "PCI INT %c -> newirq %d", 'A' + pin, newirq); | 951 | dev_dbg(&dev->dev, "PCI INT %c -> newirq %d", 'A' + pin - 1, newirq); |
953 | 952 | ||
954 | /* Check if it is hardcoded */ | 953 | /* Check if it is hardcoded */ |
955 | if ((pirq & 0xf0) == 0xf0) { | 954 | if ((pirq & 0xf0) == 0xf0) { |
@@ -977,18 +976,18 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign) | |||
977 | return 0; | 976 | return 0; |
978 | } | 977 | } |
979 | } | 978 | } |
980 | dev_info(&dev->dev, "%s PCI INT %c -> IRQ %d\n", msg, 'A' + pin, irq); | 979 | dev_info(&dev->dev, "%s PCI INT %c -> IRQ %d\n", msg, 'A' + pin - 1, irq); |
981 | 980 | ||
982 | /* Update IRQ for all devices with the same pirq value */ | 981 | /* Update IRQ for all devices with the same pirq value */ |
983 | while ((dev2 = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev2)) != NULL) { | 982 | while ((dev2 = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev2)) != NULL) { |
984 | pci_read_config_byte(dev2, PCI_INTERRUPT_PIN, &pin); | 983 | pci_read_config_byte(dev2, PCI_INTERRUPT_PIN, &pin); |
985 | if (!pin) | 984 | if (!pin) |
986 | continue; | 985 | continue; |
987 | pin--; | 986 | |
988 | info = pirq_get_info(dev2); | 987 | info = pirq_get_info(dev2); |
989 | if (!info) | 988 | if (!info) |
990 | continue; | 989 | continue; |
991 | if (info->irq[pin].link == pirq) { | 990 | if (info->irq[pin - 1].link == pirq) { |
992 | /* | 991 | /* |
993 | * We refuse to override the dev->irq | 992 | * We refuse to override the dev->irq |
994 | * information. Give a warning! | 993 | * information. Give a warning! |
@@ -1042,6 +1041,9 @@ static void __init pcibios_fixup_irqs(void) | |||
1042 | dev = NULL; | 1041 | dev = NULL; |
1043 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { | 1042 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { |
1044 | pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); | 1043 | pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); |
1044 | if (!pin) | ||
1045 | continue; | ||
1046 | |||
1045 | #ifdef CONFIG_X86_IO_APIC | 1047 | #ifdef CONFIG_X86_IO_APIC |
1046 | /* | 1048 | /* |
1047 | * Recalculate IRQ numbers if we use the I/O APIC. | 1049 | * Recalculate IRQ numbers if we use the I/O APIC. |
@@ -1049,15 +1051,11 @@ static void __init pcibios_fixup_irqs(void) | |||
1049 | if (io_apic_assign_pci_irqs) { | 1051 | if (io_apic_assign_pci_irqs) { |
1050 | int irq; | 1052 | int irq; |
1051 | 1053 | ||
1052 | if (!pin) | ||
1053 | continue; | ||
1054 | |||
1055 | /* | 1054 | /* |
1056 | * interrupt pins are numbered starting from 1 | 1055 | * interrupt pins are numbered starting from 1 |
1057 | */ | 1056 | */ |
1058 | pin--; | ||
1059 | irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, | 1057 | irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, |
1060 | PCI_SLOT(dev->devfn), pin); | 1058 | PCI_SLOT(dev->devfn), pin - 1); |
1061 | /* | 1059 | /* |
1062 | * Busses behind bridges are typically not listed in the | 1060 | * Busses behind bridges are typically not listed in the |
1063 | * MP-table. In this case we have to look up the IRQ | 1061 | * MP-table. In this case we have to look up the IRQ |
@@ -1070,22 +1068,22 @@ static void __init pcibios_fixup_irqs(void) | |||
1070 | struct pci_dev *bridge = dev->bus->self; | 1068 | struct pci_dev *bridge = dev->bus->self; |
1071 | int bus; | 1069 | int bus; |
1072 | 1070 | ||
1073 | pin = (pin + PCI_SLOT(dev->devfn)) % 4; | 1071 | pin = pci_swizzle_interrupt_pin(dev, pin); |
1074 | bus = bridge->bus->number; | 1072 | bus = bridge->bus->number; |
1075 | irq = IO_APIC_get_PCI_irq_vector(bus, | 1073 | irq = IO_APIC_get_PCI_irq_vector(bus, |
1076 | PCI_SLOT(bridge->devfn), pin); | 1074 | PCI_SLOT(bridge->devfn), pin - 1); |
1077 | if (irq >= 0) | 1075 | if (irq >= 0) |
1078 | dev_warn(&dev->dev, | 1076 | dev_warn(&dev->dev, |
1079 | "using bridge %s INT %c to " | 1077 | "using bridge %s INT %c to " |
1080 | "get IRQ %d\n", | 1078 | "get IRQ %d\n", |
1081 | pci_name(bridge), | 1079 | pci_name(bridge), |
1082 | 'A' + pin, irq); | 1080 | 'A' + pin - 1, irq); |
1083 | } | 1081 | } |
1084 | if (irq >= 0) { | 1082 | if (irq >= 0) { |
1085 | dev_info(&dev->dev, | 1083 | dev_info(&dev->dev, |
1086 | "PCI->APIC IRQ transform: INT %c " | 1084 | "PCI->APIC IRQ transform: INT %c " |
1087 | "-> IRQ %d\n", | 1085 | "-> IRQ %d\n", |
1088 | 'A' + pin, irq); | 1086 | 'A' + pin - 1, irq); |
1089 | dev->irq = irq; | 1087 | dev->irq = irq; |
1090 | } | 1088 | } |
1091 | } | 1089 | } |
@@ -1093,7 +1091,7 @@ static void __init pcibios_fixup_irqs(void) | |||
1093 | /* | 1091 | /* |
1094 | * Still no IRQ? Try to lookup one... | 1092 | * Still no IRQ? Try to lookup one... |
1095 | */ | 1093 | */ |
1096 | if (pin && !dev->irq) | 1094 | if (!dev->irq) |
1097 | pcibios_lookup_irq(dev, 0); | 1095 | pcibios_lookup_irq(dev, 0); |
1098 | } | 1096 | } |
1099 | } | 1097 | } |
@@ -1220,12 +1218,10 @@ static int pirq_enable_irq(struct pci_dev *dev) | |||
1220 | if (pin && !pcibios_lookup_irq(dev, 1) && !dev->irq) { | 1218 | if (pin && !pcibios_lookup_irq(dev, 1) && !dev->irq) { |
1221 | char *msg = ""; | 1219 | char *msg = ""; |
1222 | 1220 | ||
1223 | pin--; /* interrupt pins are numbered starting from 1 */ | ||
1224 | |||
1225 | if (io_apic_assign_pci_irqs) { | 1221 | if (io_apic_assign_pci_irqs) { |
1226 | int irq; | 1222 | int irq; |
1227 | 1223 | ||
1228 | irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, PCI_SLOT(dev->devfn), pin); | 1224 | irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, PCI_SLOT(dev->devfn), pin - 1); |
1229 | /* | 1225 | /* |
1230 | * Busses behind bridges are typically not listed in the MP-table. | 1226 | * Busses behind bridges are typically not listed in the MP-table. |
1231 | * In this case we have to look up the IRQ based on the parent bus, | 1227 | * In this case we have to look up the IRQ based on the parent bus, |
@@ -1236,20 +1232,20 @@ static int pirq_enable_irq(struct pci_dev *dev) | |||
1236 | while (irq < 0 && dev->bus->parent) { /* go back to the bridge */ | 1232 | while (irq < 0 && dev->bus->parent) { /* go back to the bridge */ |
1237 | struct pci_dev *bridge = dev->bus->self; | 1233 | struct pci_dev *bridge = dev->bus->self; |
1238 | 1234 | ||
1239 | pin = (pin + PCI_SLOT(dev->devfn)) % 4; | 1235 | pin = pci_swizzle_interrupt_pin(dev, pin); |
1240 | irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number, | 1236 | irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number, |
1241 | PCI_SLOT(bridge->devfn), pin); | 1237 | PCI_SLOT(bridge->devfn), pin - 1); |
1242 | if (irq >= 0) | 1238 | if (irq >= 0) |
1243 | dev_warn(&dev->dev, "using bridge %s " | 1239 | dev_warn(&dev->dev, "using bridge %s " |
1244 | "INT %c to get IRQ %d\n", | 1240 | "INT %c to get IRQ %d\n", |
1245 | pci_name(bridge), 'A' + pin, | 1241 | pci_name(bridge), 'A' + pin - 1, |
1246 | irq); | 1242 | irq); |
1247 | dev = bridge; | 1243 | dev = bridge; |
1248 | } | 1244 | } |
1249 | dev = temp_dev; | 1245 | dev = temp_dev; |
1250 | if (irq >= 0) { | 1246 | if (irq >= 0) { |
1251 | dev_info(&dev->dev, "PCI->APIC IRQ transform: " | 1247 | dev_info(&dev->dev, "PCI->APIC IRQ transform: " |
1252 | "INT %c -> IRQ %d\n", 'A' + pin, irq); | 1248 | "INT %c -> IRQ %d\n", 'A' + pin - 1, irq); |
1253 | dev->irq = irq; | 1249 | dev->irq = irq; |
1254 | return 0; | 1250 | return 0; |
1255 | } else | 1251 | } else |
@@ -1268,7 +1264,7 @@ static int pirq_enable_irq(struct pci_dev *dev) | |||
1268 | return 0; | 1264 | return 0; |
1269 | 1265 | ||
1270 | dev_warn(&dev->dev, "can't find IRQ for PCI INT %c%s\n", | 1266 | dev_warn(&dev->dev, "can't find IRQ for PCI INT %c%s\n", |
1271 | 'A' + pin, msg); | 1267 | 'A' + pin - 1, msg); |
1272 | } | 1268 | } |
1273 | return 0; | 1269 | return 0; |
1274 | } | 1270 | } |
diff --git a/arch/x86/pci/visws.c b/arch/x86/pci/visws.c index 16d0c0eb0d19..bcead7a46871 100644 --- a/arch/x86/pci/visws.c +++ b/arch/x86/pci/visws.c | |||
@@ -24,24 +24,6 @@ static void pci_visws_disable_irq(struct pci_dev *dev) { } | |||
24 | 24 | ||
25 | unsigned int pci_bus0, pci_bus1; | 25 | unsigned int pci_bus0, pci_bus1; |
26 | 26 | ||
27 | static inline u8 bridge_swizzle(u8 pin, u8 slot) | ||
28 | { | ||
29 | return (((pin - 1) + slot) % 4) + 1; | ||
30 | } | ||
31 | |||
32 | static u8 __init visws_swizzle(struct pci_dev *dev, u8 *pinp) | ||
33 | { | ||
34 | u8 pin = *pinp; | ||
35 | |||
36 | while (dev->bus->self) { /* Move up the chain of bridges. */ | ||
37 | pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn)); | ||
38 | dev = dev->bus->self; | ||
39 | } | ||
40 | *pinp = pin; | ||
41 | |||
42 | return PCI_SLOT(dev->devfn); | ||
43 | } | ||
44 | |||
45 | static int __init visws_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 27 | static int __init visws_map_irq(struct pci_dev *dev, u8 slot, u8 pin) |
46 | { | 28 | { |
47 | int irq, bus = dev->bus->number; | 29 | int irq, bus = dev->bus->number; |
@@ -106,7 +88,7 @@ int __init pci_visws_init(void) | |||
106 | raw_pci_ops = &pci_direct_conf1; | 88 | raw_pci_ops = &pci_direct_conf1; |
107 | pci_scan_bus_with_sysdata(pci_bus0); | 89 | pci_scan_bus_with_sysdata(pci_bus0); |
108 | pci_scan_bus_with_sysdata(pci_bus1); | 90 | pci_scan_bus_with_sysdata(pci_bus1); |
109 | pci_fixup_irqs(visws_swizzle, visws_map_irq); | 91 | pci_fixup_irqs(pci_common_swizzle, visws_map_irq); |
110 | pcibios_resource_survey(); | 92 | pcibios_resource_survey(); |
111 | return 0; | 93 | return 0; |
112 | } | 94 | } |