diff options
author | Nathan Fontenot <nfont@austin.ibm.com> | 2008-10-27 15:48:17 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-10-31 01:12:03 -0400 |
commit | e90a13184600ec756875238ad130e2f205cd9a1b (patch) | |
tree | 2a82267eebaef48a8ce2001d2a1e6ec6d87ce1a3 /arch/powerpc/platforms | |
parent | 6098e2ee14849e0819ffa887ebf470dcfad4a2be (diff) |
powerpc/pci: Properly allocate bus resources for hotplug PHBs
Resources for PHB's that are dynamically added to a system are not
properly allocated in the resource tree.
Not having these resources allocated causes an oops when removing
the PHB when we try to release them.
The diff appears a bit messy, this is mainly due to moving everything
one tab to the left in the pcibios_allocate_bus_resources routine.
The functionality change in this routine is only that the
list_for_each_entry() loop is pulled out and moved to the necessary
calling routine.
Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/pseries/pci_dlpar.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c index 21a6d55418f1..31481dc485de 100644 --- a/arch/powerpc/platforms/pseries/pci_dlpar.c +++ b/arch/powerpc/platforms/pseries/pci_dlpar.c | |||
@@ -189,6 +189,7 @@ struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn) | |||
189 | { | 189 | { |
190 | struct pci_controller *phb; | 190 | struct pci_controller *phb; |
191 | int primary; | 191 | int primary; |
192 | struct pci_bus *b; | ||
192 | 193 | ||
193 | primary = list_empty(&hose_list); | 194 | primary = list_empty(&hose_list); |
194 | phb = pcibios_alloc_controller(dn); | 195 | phb = pcibios_alloc_controller(dn); |
@@ -203,6 +204,7 @@ struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn) | |||
203 | eeh_add_device_tree_early(dn); | 204 | eeh_add_device_tree_early(dn); |
204 | 205 | ||
205 | scan_phb(phb); | 206 | scan_phb(phb); |
207 | pcibios_allocate_bus_resources(phb->bus); | ||
206 | pcibios_fixup_new_pci_devices(phb->bus); | 208 | pcibios_fixup_new_pci_devices(phb->bus); |
207 | pci_bus_add_devices(phb->bus); | 209 | pci_bus_add_devices(phb->bus); |
208 | eeh_add_device_tree_late(phb->bus); | 210 | eeh_add_device_tree_late(phb->bus); |