diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-04 21:04:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-04 21:04:29 -0400 |
commit | 89661adaaee2f85116b399e642129ccd4dafd195 (patch) | |
tree | 86a0bea62ef1ebbd454d5daa4deef1534ab5a222 /arch | |
parent | 6adae5d9e69743aede91b274224751811f7174f1 (diff) | |
parent | 9890b12a4a65a7b3181dd963421740edf0e14d69 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (59 commits)
PCI: Free resource files in error path of pci_create_sysfs_dev_files()
pci-quirks: disable MSI on RS400-200 and RS480
PCI hotplug: Use menuconfig objects
PCI: ZT5550 CPCI Hotplug driver fix
PCI: rpaphp: Remove semaphores
PCI: rpaphp: Ensure more pcibios_add/pcibios_remove symmetry
PCI: rpaphp: Use pcibios_remove_pci_devices() symmetrically
PCI: rpaphp: Document is_php_dn()
PCI: rpaphp: Document find_php_slot()
PCI: rpaphp: Rename rpaphp_register_pci_slot() to rpaphp_enable_slot()
PCI: rpaphp: refactor tail call to rpaphp_register_slot()
PCI: rpaphp: remove rpaphp_set_attention_status()
PCI: rpaphp: remove print_slot_pci_funcs()
PCI: rpaphp: Remove setup_pci_slot()
PCI: rpaphp: remove a call that does nothing but a pointer lookup
PCI: rpaphp: Remove another wrappered function
PCI: rpaphp: Remve another call that is a wrapper
PCI: rpaphp: remove a function that does nothing but wrap debug printks
PCI: rpaphp: Remove un-needed goto
PCI: rpaphp: Fix a memleak; slot->location string was never freed
...
Diffstat (limited to 'arch')
30 files changed, 20 insertions, 31 deletions
diff --git a/arch/alpha/kernel/err_common.c b/arch/alpha/kernel/err_common.c index 687580b16b41..13d53b1c9657 100644 --- a/arch/alpha/kernel/err_common.c +++ b/arch/alpha/kernel/err_common.c | |||
@@ -7,7 +7,6 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/pci.h> | ||
11 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
12 | 11 | ||
13 | #include <asm/io.h> | 12 | #include <asm/io.h> |
diff --git a/arch/alpha/kernel/err_ev6.c b/arch/alpha/kernel/err_ev6.c index 69b5f4ea7355..11aee012a8ae 100644 --- a/arch/alpha/kernel/err_ev6.c +++ b/arch/alpha/kernel/err_ev6.c | |||
@@ -7,7 +7,6 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/pci.h> | ||
11 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
12 | 11 | ||
13 | #include <asm/io.h> | 12 | #include <asm/io.h> |
diff --git a/arch/alpha/kernel/err_ev7.c b/arch/alpha/kernel/err_ev7.c index 95463ab1cf35..bc799f72d8c1 100644 --- a/arch/alpha/kernel/err_ev7.c +++ b/arch/alpha/kernel/err_ev7.c | |||
@@ -7,7 +7,6 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/pci.h> | ||
11 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
12 | 11 | ||
13 | #include <asm/io.h> | 12 | #include <asm/io.h> |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e7baca29f3fb..db00376aca15 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -255,6 +255,7 @@ config ARCH_IOP13XX | |||
255 | depends on MMU | 255 | depends on MMU |
256 | select PLAT_IOP | 256 | select PLAT_IOP |
257 | select PCI | 257 | select PCI |
258 | select ARCH_SUPPORTS_MSI | ||
258 | help | 259 | help |
259 | Support for Intel's IOP13XX (XScale) family of processors. | 260 | Support for Intel's IOP13XX (XScale) family of processors. |
260 | 261 | ||
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index 53d62373a524..bcf2fc408a1a 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig | |||
@@ -1073,6 +1073,7 @@ config PCI | |||
1073 | bool "PCI support" if !X86_VISWS | 1073 | bool "PCI support" if !X86_VISWS |
1074 | depends on !X86_VOYAGER | 1074 | depends on !X86_VOYAGER |
1075 | default y if X86_VISWS | 1075 | default y if X86_VISWS |
1076 | select ARCH_SUPPORTS_MSI if (X86_LOCAL_APIC && X86_IO_APIC) | ||
1076 | help | 1077 | help |
1077 | Find out whether you have a PCI motherboard. PCI is the name of a | 1078 | Find out whether you have a PCI motherboard. PCI is the name of a |
1078 | bus system, i.e. the way the CPU talks to the other stuff inside | 1079 | bus system, i.e. the way the CPU talks to the other stuff inside |
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c b/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c index d59277c00911..b1acc8ce3167 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/moduleparam.h> | 13 | #include <linux/moduleparam.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/cpufreq.h> | 15 | #include <linux/cpufreq.h> |
16 | #include <linux/pci.h> | ||
17 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
18 | 17 | ||
19 | #include <asm/msr.h> | 18 | #include <asm/msr.h> |
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c index ff0d89806114..e1c509aa3054 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c | |||
@@ -17,10 +17,10 @@ | |||
17 | #include <linux/moduleparam.h> | 17 | #include <linux/moduleparam.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/cpufreq.h> | 19 | #include <linux/cpufreq.h> |
20 | #include <linux/pci.h> | ||
21 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
22 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
23 | #include <asm/ist.h> | 22 | #include <asm/ist.h> |
23 | #include <asm/io.h> | ||
24 | 24 | ||
25 | #include "speedstep-lib.h" | 25 | #include "speedstep-lib.h" |
26 | 26 | ||
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index b3ab8ffebd27..89d85d244926 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -2611,19 +2611,19 @@ int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) | |||
2611 | if (irq < 0) | 2611 | if (irq < 0) |
2612 | return irq; | 2612 | return irq; |
2613 | 2613 | ||
2614 | set_irq_msi(irq, desc); | ||
2615 | ret = msi_compose_msg(dev, irq, &msg); | 2614 | ret = msi_compose_msg(dev, irq, &msg); |
2616 | if (ret < 0) { | 2615 | if (ret < 0) { |
2617 | destroy_irq(irq); | 2616 | destroy_irq(irq); |
2618 | return ret; | 2617 | return ret; |
2619 | } | 2618 | } |
2620 | 2619 | ||
2620 | set_irq_msi(irq, desc); | ||
2621 | write_msi_msg(irq, &msg); | 2621 | write_msi_msg(irq, &msg); |
2622 | 2622 | ||
2623 | set_irq_chip_and_handler_name(irq, &msi_chip, handle_edge_irq, | 2623 | set_irq_chip_and_handler_name(irq, &msi_chip, handle_edge_irq, |
2624 | "edge"); | 2624 | "edge"); |
2625 | 2625 | ||
2626 | return irq; | 2626 | return 0; |
2627 | } | 2627 | } |
2628 | 2628 | ||
2629 | void arch_teardown_msi_irq(unsigned int irq) | 2629 | void arch_teardown_msi_irq(unsigned int irq) |
diff --git a/arch/i386/pci/fixup.c b/arch/i386/pci/fixup.c index 8053b17ab647..b62eafb997bc 100644 --- a/arch/i386/pci/fixup.c +++ b/arch/i386/pci/fixup.c | |||
@@ -354,7 +354,7 @@ static void __devinit pci_fixup_video(struct pci_dev *pdev) | |||
354 | printk(KERN_DEBUG "Boot video device is %s\n", pci_name(pdev)); | 354 | printk(KERN_DEBUG "Boot video device is %s\n", pci_name(pdev)); |
355 | } | 355 | } |
356 | } | 356 | } |
357 | DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_video); | 357 | DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_video); |
358 | 358 | ||
359 | /* | 359 | /* |
360 | * Some Toshiba laptops need extra code to enable their TI TSB43AB22/A. | 360 | * Some Toshiba laptops need extra code to enable their TI TSB43AB22/A. |
diff --git a/arch/i386/pci/i386.c b/arch/i386/pci/i386.c index 43005f044424..bcd2f94b732c 100644 --- a/arch/i386/pci/i386.c +++ b/arch/i386/pci/i386.c | |||
@@ -246,8 +246,8 @@ int pcibios_enable_resources(struct pci_dev *dev, int mask) | |||
246 | continue; | 246 | continue; |
247 | if (!r->start && r->end) { | 247 | if (!r->start && r->end) { |
248 | printk(KERN_ERR "PCI: Device %s not available " | 248 | printk(KERN_ERR "PCI: Device %s not available " |
249 | "because of resource collisions\n", | 249 | "because of resource %d collisions\n", |
250 | pci_name(dev)); | 250 | pci_name(dev), idx); |
251 | return -EINVAL; | 251 | return -EINVAL; |
252 | } | 252 | } |
253 | if (r->flags & IORESOURCE_IO) | 253 | if (r->flags & IORESOURCE_IO) |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index e19185d26554..3b71f97d0b60 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -14,6 +14,7 @@ config IA64 | |||
14 | select PCI if (!IA64_HP_SIM) | 14 | select PCI if (!IA64_HP_SIM) |
15 | select ACPI if (!IA64_HP_SIM) | 15 | select ACPI if (!IA64_HP_SIM) |
16 | select PM if (!IA64_HP_SIM) | 16 | select PM if (!IA64_HP_SIM) |
17 | select ARCH_SUPPORTS_MSI | ||
17 | default y | 18 | default y |
18 | help | 19 | help |
19 | The Itanium Processor Family is Intel's 64-bit successor to | 20 | The Itanium Processor Family is Intel's 64-bit successor to |
diff --git a/arch/ia64/sn/kernel/huberror.c b/arch/ia64/sn/kernel/huberror.c index fcf7f93c4b61..2c3f9dfca78b 100644 --- a/arch/ia64/sn/kernel/huberror.c +++ b/arch/ia64/sn/kernel/huberror.c | |||
@@ -8,7 +8,6 @@ | |||
8 | 8 | ||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/interrupt.h> | 10 | #include <linux/interrupt.h> |
11 | #include <linux/pci.h> | ||
12 | #include <asm/delay.h> | 11 | #include <asm/delay.h> |
13 | #include <asm/sn/sn_sal.h> | 12 | #include <asm/sn/sn_sal.h> |
14 | #include "ioerror.h" | 13 | #include "ioerror.h" |
diff --git a/arch/ia64/sn/kernel/msi_sn.c b/arch/ia64/sn/kernel/msi_sn.c index 49873aa4a37d..83f190ffe350 100644 --- a/arch/ia64/sn/kernel/msi_sn.c +++ b/arch/ia64/sn/kernel/msi_sn.c | |||
@@ -87,7 +87,6 @@ int sn_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *entry) | |||
87 | if (irq < 0) | 87 | if (irq < 0) |
88 | return irq; | 88 | return irq; |
89 | 89 | ||
90 | set_irq_msi(irq, entry); | ||
91 | /* | 90 | /* |
92 | * Set up the vector plumbing. Let the prom (via sn_intr_alloc) | 91 | * Set up the vector plumbing. Let the prom (via sn_intr_alloc) |
93 | * decide which cpu to direct this msi at by default. | 92 | * decide which cpu to direct this msi at by default. |
@@ -144,10 +143,11 @@ int sn_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *entry) | |||
144 | */ | 143 | */ |
145 | msg.data = 0x100 + irq; | 144 | msg.data = 0x100 + irq; |
146 | 145 | ||
146 | set_irq_msi(irq, entry); | ||
147 | write_msi_msg(irq, &msg); | 147 | write_msi_msg(irq, &msg); |
148 | set_irq_chip_and_handler(irq, &sn_msi_chip, handle_edge_irq); | 148 | set_irq_chip_and_handler(irq, &sn_msi_chip, handle_edge_irq); |
149 | 149 | ||
150 | return irq; | 150 | return 0; |
151 | } | 151 | } |
152 | 152 | ||
153 | #ifdef CONFIG_SMP | 153 | #ifdef CONFIG_SMP |
diff --git a/arch/ia64/sn/kernel/xpnet.c b/arch/ia64/sn/kernel/xpnet.c index 5419acb89a8c..88fad85ceeff 100644 --- a/arch/ia64/sn/kernel/xpnet.c +++ b/arch/ia64/sn/kernel/xpnet.c | |||
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/pci.h> | ||
28 | #include <linux/init.h> | 27 | #include <linux/init.h> |
29 | #include <linux/ioport.h> | 28 | #include <linux/ioport.h> |
30 | #include <linux/netdevice.h> | 29 | #include <linux/netdevice.h> |
diff --git a/arch/m68knommu/kernel/dma.c b/arch/m68knommu/kernel/dma.c index 14b19c4161f4..0a25874a2aae 100644 --- a/arch/m68knommu/kernel/dma.c +++ b/arch/m68knommu/kernel/dma.c | |||
@@ -8,7 +8,6 @@ | |||
8 | #include <linux/types.h> | 8 | #include <linux/types.h> |
9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
10 | #include <linux/string.h> | 10 | #include <linux/string.h> |
11 | #include <linux/pci.h> | ||
12 | #include <asm/io.h> | 11 | #include <asm/io.h> |
13 | 12 | ||
14 | void *dma_alloc_coherent(struct device *dev, size_t size, | 13 | void *dma_alloc_coherent(struct device *dev, size_t size, |
diff --git a/arch/mips/lib/iomap.c b/arch/mips/lib/iomap.c index d51d5cb0a4a9..e3acb2dad33a 100644 --- a/arch/mips/lib/iomap.c +++ b/arch/mips/lib/iomap.c | |||
@@ -6,7 +6,6 @@ | |||
6 | * (C) Copyright 2007 MIPS Technologies, Inc. | 6 | * (C) Copyright 2007 MIPS Technologies, Inc. |
7 | * written by Ralf Baechle <ralf@linux-mips.org> | 7 | * written by Ralf Baechle <ralf@linux-mips.org> |
8 | */ | 8 | */ |
9 | #include <linux/pci.h> | ||
10 | #include <linux/module.h> | 9 | #include <linux/module.h> |
11 | #include <asm/io.h> | 10 | #include <asm/io.h> |
12 | 11 | ||
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 60d7d4baa227..7138092826aa 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -340,7 +340,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node, | |||
340 | struct pci_dev *dev; | 340 | struct pci_dev *dev; |
341 | const char *type; | 341 | const char *type; |
342 | 342 | ||
343 | dev = kzalloc(sizeof(struct pci_dev), GFP_KERNEL); | 343 | dev = alloc_pci_dev(); |
344 | if (!dev) | 344 | if (!dev) |
345 | return NULL; | 345 | return NULL; |
346 | type = of_get_property(node, "device_type", NULL); | 346 | type = of_get_property(node, "device_type", NULL); |
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c index 53aa04101ced..3a393c7f390e 100644 --- a/arch/powerpc/platforms/pseries/ras.c +++ b/arch/powerpc/platforms/pseries/ras.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/timex.h> | 31 | #include <linux/timex.h> |
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
34 | #include <linux/pci.h> | ||
35 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
36 | #include <linux/irq.h> | 35 | #include <linux/irq.h> |
37 | #include <linux/random.h> | 36 | #include <linux/random.h> |
diff --git a/arch/ppc/8260_io/enet.c b/arch/ppc/8260_io/enet.c index 48ce84f5be93..4c0a7d732f69 100644 --- a/arch/ppc/8260_io/enet.c +++ b/arch/ppc/8260_io/enet.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <linux/ioport.h> | 32 | #include <linux/ioport.h> |
33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
34 | #include <linux/interrupt.h> | 34 | #include <linux/interrupt.h> |
35 | #include <linux/pci.h> | ||
36 | #include <linux/init.h> | 35 | #include <linux/init.h> |
37 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
38 | #include <linux/netdevice.h> | 37 | #include <linux/netdevice.h> |
diff --git a/arch/ppc/8260_io/fcc_enet.c b/arch/ppc/8260_io/fcc_enet.c index 9db825fe37f0..cab395da25da 100644 --- a/arch/ppc/8260_io/fcc_enet.c +++ b/arch/ppc/8260_io/fcc_enet.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/ioport.h> | 29 | #include <linux/ioport.h> |
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
32 | #include <linux/pci.h> | ||
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
34 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
35 | #include <linux/netdevice.h> | 34 | #include <linux/netdevice.h> |
diff --git a/arch/ppc/8xx_io/enet.c b/arch/ppc/8xx_io/enet.c index bfa3f52996d1..e58288e14369 100644 --- a/arch/ppc/8xx_io/enet.c +++ b/arch/ppc/8xx_io/enet.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/ioport.h> | 30 | #include <linux/ioport.h> |
31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
32 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
33 | #include <linux/pci.h> | ||
34 | #include <linux/init.h> | 33 | #include <linux/init.h> |
35 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
36 | #include <linux/netdevice.h> | 35 | #include <linux/netdevice.h> |
diff --git a/arch/ppc/syslib/ppc4xx_sgdma.c b/arch/ppc/syslib/ppc4xx_sgdma.c index 939abe3c1f45..5dadca3e0d61 100644 --- a/arch/ppc/syslib/ppc4xx_sgdma.c +++ b/arch/ppc/syslib/ppc4xx_sgdma.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/pci.h> | ||
27 | 26 | ||
28 | #include <asm/system.h> | 27 | #include <asm/system.h> |
29 | #include <asm/io.h> | 28 | #include <asm/io.h> |
diff --git a/arch/sh64/mach-cayman/iomap.c b/arch/sh64/mach-cayman/iomap.c index 2d06e9a55137..a5c645f02d57 100644 --- a/arch/sh64/mach-cayman/iomap.c +++ b/arch/sh64/mach-cayman/iomap.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * License. See the file "COPYING" in the main directory of this archive | 9 | * License. See the file "COPYING" in the main directory of this archive |
10 | * for more details. | 10 | * for more details. |
11 | */ | 11 | */ |
12 | #include <linux/pci.h> | ||
13 | #include <asm/io.h> | 12 | #include <asm/io.h> |
14 | #include <asm/cayman.h> | 13 | #include <asm/cayman.h> |
15 | 14 | ||
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index 590a41b864b9..be9e10b94ef8 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -306,6 +306,7 @@ config SUN_IO | |||
306 | 306 | ||
307 | config PCI | 307 | config PCI |
308 | bool "PCI support" | 308 | bool "PCI support" |
309 | select ARCH_SUPPORTS_MSI | ||
309 | help | 310 | help |
310 | Find out whether you have a PCI motherboard. PCI is the name of a | 311 | Find out whether you have a PCI motherboard. PCI is the name of a |
311 | bus system, i.e. the way the CPU talks to the other stuff inside | 312 | bus system, i.e. the way the CPU talks to the other stuff inside |
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index 023af41ad68d..9a549547cb2b 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c | |||
@@ -1092,10 +1092,10 @@ int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc) | |||
1092 | return -EINVAL; | 1092 | return -EINVAL; |
1093 | 1093 | ||
1094 | err = p->setup_msi_irq(&virt_irq, pdev, desc); | 1094 | err = p->setup_msi_irq(&virt_irq, pdev, desc); |
1095 | if (err < 0) | 1095 | if (err) |
1096 | return err; | 1096 | return err; |
1097 | 1097 | ||
1098 | return virt_irq; | 1098 | return 0; |
1099 | } | 1099 | } |
1100 | 1100 | ||
1101 | void arch_teardown_msi_irq(unsigned int virt_irq) | 1101 | void arch_teardown_msi_irq(unsigned int virt_irq) |
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c index 94295c219329..1ccf4c9a9a43 100644 --- a/arch/sparc64/kernel/pci_sun4v.c +++ b/arch/sparc64/kernel/pci_sun4v.c | |||
@@ -1169,8 +1169,6 @@ static int pci_sun4v_setup_msi_irq(unsigned int *virt_irq_p, | |||
1169 | if (!devino) | 1169 | if (!devino) |
1170 | goto out_err; | 1170 | goto out_err; |
1171 | 1171 | ||
1172 | set_irq_msi(*virt_irq_p, entry); | ||
1173 | |||
1174 | msiqid = ((devino - pbm->msiq_first_devino) + | 1172 | msiqid = ((devino - pbm->msiq_first_devino) + |
1175 | pbm->msiq_first); | 1173 | pbm->msiq_first); |
1176 | 1174 | ||
@@ -1204,6 +1202,8 @@ static int pci_sun4v_setup_msi_irq(unsigned int *virt_irq_p, | |||
1204 | msg.address_lo = pbm->msi32_start; | 1202 | msg.address_lo = pbm->msi32_start; |
1205 | } | 1203 | } |
1206 | msg.data = msi_num; | 1204 | msg.data = msi_num; |
1205 | |||
1206 | set_irq_msi(*virt_irq_p, entry); | ||
1207 | write_msi_msg(*virt_irq_p, &msg); | 1207 | write_msi_msg(*virt_irq_p, &msg); |
1208 | 1208 | ||
1209 | irq_install_pre_handler(*virt_irq_p, | 1209 | irq_install_pre_handler(*virt_irq_p, |
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 56eb14c98475..e9b4f058a49a 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig | |||
@@ -676,6 +676,7 @@ menu "Bus options (PCI etc.)" | |||
676 | 676 | ||
677 | config PCI | 677 | config PCI |
678 | bool "PCI support" | 678 | bool "PCI support" |
679 | select ARCH_SUPPORTS_MSI if (X86_LOCAL_APIC && X86_IO_APIC) | ||
679 | 680 | ||
680 | # x86-64 doesn't support PCI BIOS access from long mode so always go direct. | 681 | # x86-64 doesn't support PCI BIOS access from long mode so always go direct. |
681 | config PCI_DIRECT | 682 | config PCI_DIRECT |
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index c6a5bc7e8118..b7d2b76b92d4 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -1983,18 +1983,18 @@ int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) | |||
1983 | if (irq < 0) | 1983 | if (irq < 0) |
1984 | return irq; | 1984 | return irq; |
1985 | 1985 | ||
1986 | set_irq_msi(irq, desc); | ||
1987 | ret = msi_compose_msg(dev, irq, &msg); | 1986 | ret = msi_compose_msg(dev, irq, &msg); |
1988 | if (ret < 0) { | 1987 | if (ret < 0) { |
1989 | destroy_irq(irq); | 1988 | destroy_irq(irq); |
1990 | return ret; | 1989 | return ret; |
1991 | } | 1990 | } |
1992 | 1991 | ||
1992 | set_irq_msi(irq, desc); | ||
1993 | write_msi_msg(irq, &msg); | 1993 | write_msi_msg(irq, &msg); |
1994 | 1994 | ||
1995 | set_irq_chip_and_handler_name(irq, &msi_chip, handle_edge_irq, "edge"); | 1995 | set_irq_chip_and_handler_name(irq, &msi_chip, handle_edge_irq, "edge"); |
1996 | 1996 | ||
1997 | return irq; | 1997 | return 0; |
1998 | } | 1998 | } |
1999 | 1999 | ||
2000 | void arch_teardown_msi_irq(unsigned int irq) | 2000 | void arch_teardown_msi_irq(unsigned int irq) |
diff --git a/arch/xtensa/kernel/xtensa_ksyms.c b/arch/xtensa/kernel/xtensa_ksyms.c index 0b4cb93db5a3..cd7e6a020602 100644 --- a/arch/xtensa/kernel/xtensa_ksyms.c +++ b/arch/xtensa/kernel/xtensa_ksyms.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <asm/irq.h> | 19 | #include <asm/irq.h> |
20 | #include <linux/in6.h> | 20 | #include <linux/in6.h> |
21 | #include <linux/pci.h> | ||
22 | #include <linux/ide.h> | 21 | #include <linux/ide.h> |
23 | 22 | ||
24 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
diff --git a/arch/xtensa/platform-iss/setup.c b/arch/xtensa/platform-iss/setup.c index c8a42b60c57a..f60c8cf6dfbe 100644 --- a/arch/xtensa/platform-iss/setup.c +++ b/arch/xtensa/platform-iss/setup.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
22 | #include <linux/reboot.h> | 22 | #include <linux/reboot.h> |
23 | #include <linux/pci.h> | ||
24 | #include <linux/kdev_t.h> | 23 | #include <linux/kdev_t.h> |
25 | #include <linux/types.h> | 24 | #include <linux/types.h> |
26 | #include <linux/major.h> | 25 | #include <linux/major.h> |