diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-24 19:17:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-24 19:17:07 -0400 |
commit | 6dd53aa4563a2c69e80a24d2cc68d484b5ea2891 (patch) | |
tree | 0cca9f65984b524527910960d972fc6ef85fac88 /arch/powerpc | |
parent | f14121ab35912e3d2e57ac9a4ce1f9d4b7baeffb (diff) | |
parent | 63b96f7baeba71966c723912c3f8f0274577f877 (diff) |
Merge tag 'for-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI changes from Bjorn Helgaas:
"Host bridge hotplug:
- Add MMCONFIG support for hot-added host bridges (Jiang Liu)
Device hotplug:
- Move fixups from __init to __devinit (Sebastian Andrzej Siewior)
- Call FINAL fixups for hot-added devices, too (Myron Stowe)
- Factor out generic code for P2P bridge hot-add (Yinghai Lu)
- Remove all functions in a slot, not just those with _EJx (Amos
Kong)
Dynamic resource management:
- Track bus number allocation (struct resource tree per domain)
(Yinghai Lu)
- Make P2P bridge 1K I/O windows work with resource reassignment
(Bjorn Helgaas, Yinghai Lu)
- Disable decoding while updating 64-bit BARs (Bjorn Helgaas)
Power management:
- Add PCIe runtime D3cold support (Huang Ying)
Virtualization:
- Add VFIO infrastructure (ACS, DMA source ID quirks) (Alex
Williamson)
- Add quirks for devices with broken INTx masking (Jan Kiszka)
Miscellaneous:
- Fix some PCI Express capability version issues (Myron Stowe)
- Factor out some arch code with a weak, generic, pcibios_setup()
(Myron Stowe)"
* tag 'for-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (122 commits)
PCI: hotplug: ensure a consistent return value in error case
PCI: fix undefined reference to 'pci_fixup_final_inited'
PCI: build resource code for M68K architecture
PCI: pciehp: remove unused pciehp_get_max_lnk_width(), pciehp_get_cur_lnk_width()
PCI: reorder __pci_assign_resource() (no change)
PCI: fix truncation of resource size to 32 bits
PCI: acpiphp: merge acpiphp_debug and debug
PCI: acpiphp: remove unused res_lock
sparc/PCI: replace pci_cfg_fake_ranges() with pci_read_bridge_bases()
PCI: call final fixups hot-added devices
PCI: move final fixups from __init to __devinit
x86/PCI: move final fixups from __init to __devinit
MIPS/PCI: move final fixups from __init to __devinit
PCI: support sizing P2P bridge I/O windows with 1K granularity
PCI: reimplement P2P bridge 1K I/O windows (Intel P64H2)
PCI: disable MEM decoding while updating 64-bit MEM BARs
PCI: leave MEM and IO decoding disabled during 64-bit BAR sizing, too
PCI: never discard enable/suspend/resume_early/resume fixups
PCI: release temporary reference in __nv_msi_ht_cap_quirk()
PCI: restructure 'pci_do_fixups()'
...
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/include/asm/pci-bridge.h | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci-common.c | 21 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci_64.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci_of_scan.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/tqm85xx.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/gef_ppc9a.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/gef_sbc310.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/gef_sbc610.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/powernv/pci-ioda.c | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/pci_dlpar.c | 2 | ||||
-rw-r--r-- | arch/powerpc/sysdev/mv64x60_pci.c | 2 |
11 files changed, 24 insertions, 22 deletions
diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h index ac39e6a3b25a..8cccbee61519 100644 --- a/arch/powerpc/include/asm/pci-bridge.h +++ b/arch/powerpc/include/asm/pci-bridge.h | |||
@@ -30,6 +30,7 @@ struct pci_controller { | |||
30 | int first_busno; | 30 | int first_busno; |
31 | int last_busno; | 31 | int last_busno; |
32 | int self_busno; | 32 | int self_busno; |
33 | struct resource busn; | ||
33 | 34 | ||
34 | void __iomem *io_base_virt; | 35 | void __iomem *io_base_virt; |
35 | #ifdef CONFIG_PPC64 | 36 | #ifdef CONFIG_PPC64 |
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index edef9afd8858..2aa04f29e1de 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -200,11 +200,6 @@ int pcibios_add_platform_entries(struct pci_dev *pdev) | |||
200 | return device_create_file(&pdev->dev, &dev_attr_devspec); | 200 | return device_create_file(&pdev->dev, &dev_attr_devspec); |
201 | } | 201 | } |
202 | 202 | ||
203 | char __devinit *pcibios_setup(char *str) | ||
204 | { | ||
205 | return str; | ||
206 | } | ||
207 | |||
208 | /* | 203 | /* |
209 | * Reads the interrupt pin to determine if interrupt is use by card. | 204 | * Reads the interrupt pin to determine if interrupt is use by card. |
210 | * If the interrupt is used, then gets the interrupt line from the | 205 | * If the interrupt is used, then gets the interrupt line from the |
@@ -1635,6 +1630,11 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose) | |||
1635 | /* Wire up PHB bus resources */ | 1630 | /* Wire up PHB bus resources */ |
1636 | pcibios_setup_phb_resources(hose, &resources); | 1631 | pcibios_setup_phb_resources(hose, &resources); |
1637 | 1632 | ||
1633 | hose->busn.start = hose->first_busno; | ||
1634 | hose->busn.end = hose->last_busno; | ||
1635 | hose->busn.flags = IORESOURCE_BUS; | ||
1636 | pci_add_resource(&resources, &hose->busn); | ||
1637 | |||
1638 | /* Create an empty bus for the toplevel */ | 1638 | /* Create an empty bus for the toplevel */ |
1639 | bus = pci_create_root_bus(hose->parent, hose->first_busno, | 1639 | bus = pci_create_root_bus(hose->parent, hose->first_busno, |
1640 | hose->ops, hose, &resources); | 1640 | hose->ops, hose, &resources); |
@@ -1651,13 +1651,14 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose) | |||
1651 | if (node && ppc_md.pci_probe_mode) | 1651 | if (node && ppc_md.pci_probe_mode) |
1652 | mode = ppc_md.pci_probe_mode(bus); | 1652 | mode = ppc_md.pci_probe_mode(bus); |
1653 | pr_debug(" probe mode: %d\n", mode); | 1653 | pr_debug(" probe mode: %d\n", mode); |
1654 | if (mode == PCI_PROBE_DEVTREE) { | 1654 | if (mode == PCI_PROBE_DEVTREE) |
1655 | bus->subordinate = hose->last_busno; | ||
1656 | of_scan_bus(node, bus); | 1655 | of_scan_bus(node, bus); |
1657 | } | ||
1658 | 1656 | ||
1659 | if (mode == PCI_PROBE_NORMAL) | 1657 | if (mode == PCI_PROBE_NORMAL) { |
1660 | hose->last_busno = bus->subordinate = pci_scan_child_bus(bus); | 1658 | pci_bus_update_busn_res_end(bus, 255); |
1659 | hose->last_busno = pci_scan_child_bus(bus); | ||
1660 | pci_bus_update_busn_res_end(bus, hose->last_busno); | ||
1661 | } | ||
1661 | 1662 | ||
1662 | /* Platform gets a chance to do some global fixups before | 1663 | /* Platform gets a chance to do some global fixups before |
1663 | * we proceed to resource allocation | 1664 | * we proceed to resource allocation |
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 94a54f61d341..4ff190ff24a0 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -236,7 +236,7 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus, | |||
236 | 236 | ||
237 | for (ln = pci_root_buses.next; ln != &pci_root_buses; ln = ln->next) { | 237 | for (ln = pci_root_buses.next; ln != &pci_root_buses; ln = ln->next) { |
238 | bus = pci_bus_b(ln); | 238 | bus = pci_bus_b(ln); |
239 | if (in_bus >= bus->number && in_bus <= bus->subordinate) | 239 | if (in_bus >= bus->number && in_bus <= bus->busn_res.end) |
240 | break; | 240 | break; |
241 | bus = NULL; | 241 | bus = NULL; |
242 | } | 242 | } |
diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c index d7dd42bd1452..30378a19f65d 100644 --- a/arch/powerpc/kernel/pci_of_scan.c +++ b/arch/powerpc/kernel/pci_of_scan.c | |||
@@ -239,7 +239,7 @@ void __devinit of_scan_pci_bridge(struct pci_dev *dev) | |||
239 | } | 239 | } |
240 | 240 | ||
241 | bus->primary = dev->bus->number; | 241 | bus->primary = dev->bus->number; |
242 | bus->subordinate = busrange[1]; | 242 | pci_bus_insert_busn_res(bus, busrange[0], busrange[1]); |
243 | bus->bridge_ctl = 0; | 243 | bus->bridge_ctl = 0; |
244 | 244 | ||
245 | /* parse ranges property */ | 245 | /* parse ranges property */ |
diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c b/arch/powerpc/platforms/85xx/tqm85xx.c index 4d786c25d3e5..3e70a2035e53 100644 --- a/arch/powerpc/platforms/85xx/tqm85xx.c +++ b/arch/powerpc/platforms/85xx/tqm85xx.c | |||
@@ -102,7 +102,7 @@ static void tqm85xx_show_cpuinfo(struct seq_file *m) | |||
102 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); | 102 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); |
103 | } | 103 | } |
104 | 104 | ||
105 | static void __init tqm85xx_ti1520_fixup(struct pci_dev *pdev) | 105 | static void __devinit tqm85xx_ti1520_fixup(struct pci_dev *pdev) |
106 | { | 106 | { |
107 | unsigned int val; | 107 | unsigned int val; |
108 | 108 | ||
diff --git a/arch/powerpc/platforms/86xx/gef_ppc9a.c b/arch/powerpc/platforms/86xx/gef_ppc9a.c index 1fca663f1b25..563aafa8629c 100644 --- a/arch/powerpc/platforms/86xx/gef_ppc9a.c +++ b/arch/powerpc/platforms/86xx/gef_ppc9a.c | |||
@@ -164,7 +164,7 @@ static void gef_ppc9a_show_cpuinfo(struct seq_file *m) | |||
164 | gef_ppc9a_get_vme_is_syscon() ? "yes" : "no"); | 164 | gef_ppc9a_get_vme_is_syscon() ? "yes" : "no"); |
165 | } | 165 | } |
166 | 166 | ||
167 | static void __init gef_ppc9a_nec_fixup(struct pci_dev *pdev) | 167 | static void __devinit gef_ppc9a_nec_fixup(struct pci_dev *pdev) |
168 | { | 168 | { |
169 | unsigned int val; | 169 | unsigned int val; |
170 | 170 | ||
diff --git a/arch/powerpc/platforms/86xx/gef_sbc310.c b/arch/powerpc/platforms/86xx/gef_sbc310.c index 14e0e576bcbd..cc6a91ae0889 100644 --- a/arch/powerpc/platforms/86xx/gef_sbc310.c +++ b/arch/powerpc/platforms/86xx/gef_sbc310.c | |||
@@ -152,7 +152,7 @@ static void gef_sbc310_show_cpuinfo(struct seq_file *m) | |||
152 | 152 | ||
153 | } | 153 | } |
154 | 154 | ||
155 | static void __init gef_sbc310_nec_fixup(struct pci_dev *pdev) | 155 | static void __devinit gef_sbc310_nec_fixup(struct pci_dev *pdev) |
156 | { | 156 | { |
157 | unsigned int val; | 157 | unsigned int val; |
158 | 158 | ||
diff --git a/arch/powerpc/platforms/86xx/gef_sbc610.c b/arch/powerpc/platforms/86xx/gef_sbc610.c index 1638f43599f0..aead6b337f4a 100644 --- a/arch/powerpc/platforms/86xx/gef_sbc610.c +++ b/arch/powerpc/platforms/86xx/gef_sbc610.c | |||
@@ -141,7 +141,7 @@ static void gef_sbc610_show_cpuinfo(struct seq_file *m) | |||
141 | seq_printf(m, "SVR\t\t: 0x%x\n", svid); | 141 | seq_printf(m, "SVR\t\t: 0x%x\n", svid); |
142 | } | 142 | } |
143 | 143 | ||
144 | static void __init gef_sbc610_nec_fixup(struct pci_dev *pdev) | 144 | static void __devinit gef_sbc610_nec_fixup(struct pci_dev *pdev) |
145 | { | 145 | { |
146 | unsigned int val; | 146 | unsigned int val; |
147 | 147 | ||
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index fbdd74dac3ac..9cda6a1ad0cf 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c | |||
@@ -589,7 +589,7 @@ static int __devinit pnv_ioda_configure_pe(struct pnv_phb *phb, | |||
589 | dcomp = OPAL_IGNORE_RID_DEVICE_NUMBER; | 589 | dcomp = OPAL_IGNORE_RID_DEVICE_NUMBER; |
590 | fcomp = OPAL_IGNORE_RID_FUNCTION_NUMBER; | 590 | fcomp = OPAL_IGNORE_RID_FUNCTION_NUMBER; |
591 | parent = pe->pbus->self; | 591 | parent = pe->pbus->self; |
592 | count = pe->pbus->subordinate - pe->pbus->secondary + 1; | 592 | count = pe->pbus->busn_res.end - pe->pbus->busn_res.start + 1; |
593 | switch(count) { | 593 | switch(count) { |
594 | case 1: bcomp = OpalPciBusAll; break; | 594 | case 1: bcomp = OpalPciBusAll; break; |
595 | case 2: bcomp = OpalPciBus7Bits; break; | 595 | case 2: bcomp = OpalPciBus7Bits; break; |
@@ -816,11 +816,11 @@ static void __devinit pnv_ioda_setup_bus_PE(struct pci_dev *dev, | |||
816 | pe->pdev = NULL; | 816 | pe->pdev = NULL; |
817 | pe->tce32_seg = -1; | 817 | pe->tce32_seg = -1; |
818 | pe->mve_number = -1; | 818 | pe->mve_number = -1; |
819 | pe->rid = bus->secondary << 8; | 819 | pe->rid = bus->busn_res.start << 8; |
820 | pe->dma_weight = 0; | 820 | pe->dma_weight = 0; |
821 | 821 | ||
822 | pe_info(pe, "Secondary busses %d..%d associated with PE\n", | 822 | pe_info(pe, "Secondary busses %pR associated with PE\n", |
823 | bus->secondary, bus->subordinate); | 823 | &bus->busn_res); |
824 | 824 | ||
825 | if (pnv_ioda_configure_pe(phb, pe)) { | 825 | if (pnv_ioda_configure_pe(phb, pe)) { |
826 | /* XXX What do we do here ? */ | 826 | /* XXX What do we do here ? */ |
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c index 8b7bafa489c2..3ccebc83dc02 100644 --- a/arch/powerpc/platforms/pseries/pci_dlpar.c +++ b/arch/powerpc/platforms/pseries/pci_dlpar.c | |||
@@ -121,7 +121,7 @@ void pcibios_add_pci_devices(struct pci_bus * bus) | |||
121 | if (!num) | 121 | if (!num) |
122 | return; | 122 | return; |
123 | pcibios_setup_bus_devices(bus); | 123 | pcibios_setup_bus_devices(bus); |
124 | max = bus->secondary; | 124 | max = bus->busn_res.start; |
125 | for (pass=0; pass < 2; pass++) | 125 | for (pass=0; pass < 2; pass++) |
126 | list_for_each_entry(dev, &bus->devices, bus_list) { | 126 | list_for_each_entry(dev, &bus->devices, bus_list) { |
127 | if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE || | 127 | if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE || |
diff --git a/arch/powerpc/sysdev/mv64x60_pci.c b/arch/powerpc/sysdev/mv64x60_pci.c index b0037cefaada..364b14d4754b 100644 --- a/arch/powerpc/sysdev/mv64x60_pci.c +++ b/arch/powerpc/sysdev/mv64x60_pci.c | |||
@@ -104,7 +104,7 @@ subsys_initcall(mv64x60_sysfs_init); | |||
104 | 104 | ||
105 | #endif /* CONFIG_SYSFS */ | 105 | #endif /* CONFIG_SYSFS */ |
106 | 106 | ||
107 | static void __init mv64x60_pci_fixup_early(struct pci_dev *dev) | 107 | static void __devinit mv64x60_pci_fixup_early(struct pci_dev *dev) |
108 | { | 108 | { |
109 | /* | 109 | /* |
110 | * Set the host bridge hdr_type to an invalid value so that | 110 | * Set the host bridge hdr_type to an invalid value so that |