linux/arch/powerpc/platforms/pasemi
Gavin Shan 8cc7581cdb powerpc/pci: Delay populating pdn
The pdn (struct pci_dn) instances are allocated from memblock or
bootmem when creating PCI controller (hoses) in setup_arch(). PCI
hotplug, which will be supported by proceeding patches, releases
PCI device nodes and their corresponding pdn on unplugging event.
The memory chunks for pdn instances allocated from memblock or
bootmem are hard to reused after being released.

This delays creating pdn by pci_devs_phb_init() from setup_arch()
to core_initcall() so that they are allocated from slab. The memory
consumed by pdn can be released to system without problem during
PCI unplugging time. It indicates that pci_dn is unavailable in
setup_arch() and the the fixup on pdn (like AGP's) can't be carried
out that time. We have to do that in pcibios_root_bridge_prepare()
on maple/pasemi/powermac platforms where/when the pdn is available.
pcibios_root_bridge_prepare is called from subsys_initcall() which
is executed after core_initcall() so the code flow does not change.

At the mean while, the EEH device is created when pdn is populated,
meaning pdn and EEH device have same life cycle. In turn, we needn't
call eeh_dev_init() to create EEH device explicitly.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2016-06-21 15:30:56 +10:00
..
dma_lib.c powerpc: Delete non-required instances of include <linux/init.h> 2014-01-15 13:46:44 +11:00
gpio_mdio.c mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00
idle.c
iommu.c powerpc/iommu: Move tce_xxx callbacks from ppc_md to iommu_table 2015-06-11 15:14:56 +10:00
Kconfig powerpc: Kconfig: remove BE-only platforms from LE kernel build 2015-09-29 22:57:00 +10:00
Makefile powerpc/pasemi: Only the build the pasemi MSI code for PASEMI=y 2015-05-11 19:55:25 +10:00
misc.c
msi.c irqdomain: Use irq_domain_get_of_node() instead of direct field access 2015-10-13 19:01:23 +02:00
pasemi.h powerpc/pasemi: Move controller ops from ppc_md to controller_ops 2015-04-11 20:49:16 +10:00
pci.c powerpc/pci: Delay populating pdn 2016-06-21 15:30:56 +10:00
powersave.S powerpc: No need to use dot symbols when branching to a function 2014-04-23 10:05:16 +10:00
setup.c powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
time.c