linux/arch/powerpc/platforms/powermac
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
..
backlight.c powerpc: add export.h to files making use of EXPORT_SYMBOL 2011-10-31 19:30:37 -04:00
bootx_init.c powerpc: Add missing calls to va_end() 2015-12-17 23:23:22 +11:00
cache.S powerpc: Fix misspellings in comments. 2016-03-01 19:27:20 +11:00
feature.c powerpc: Fix misspellings in comments. 2016-03-01 19:27:20 +11:00
Kconfig powerpc: Kconfig: remove BE-only platforms from LE kernel build 2015-09-29 22:57:00 +10:00
low_i2c.c powerpc: Various typo fixes 2016-06-14 13:58:26 +10:00
Makefile powerpc/ftrace: Use $(CC_FLAGS_FTRACE) when disabling ftrace 2016-03-07 14:53:55 +11:00
nvram.c powerpc: Remove more traces of bootmem 2014-11-19 21:41:51 +11:00
pci.c powerpc/pci: Delay populating pdn 2016-06-21 15:30:56 +10:00
pfunc_base.c powerpc: add explicit OF includes 2013-10-09 20:04:11 -05:00
pfunc_core.c powerpc: Delete non-required instances of include <linux/init.h> 2014-01-15 13:46:44 +11:00
pic.c powerpc/powermac: set IRQF_NO_THREAD for xmon/cascade handlers 2015-11-26 22:11:05 +11:00
pmac.h powerpc/powermac: Move controller ops from ppc_md to controller_ops 2015-04-11 20:49:15 +10:00
setup.c powerpc/powermac: Move controller ops from ppc_md to controller_ops 2015-04-11 20:49:15 +10:00
sleep.S
smp.c powerpc/powermac: Fix build error seen with powermac smp builds 2015-04-15 15:52:59 +10:00
time.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
udbg_adb.c of: Migrate of_find_node_by_name() users to for_each_node_by_name() 2014-06-26 17:12:24 +01:00
udbg_scc.c of: add 'of_' prefix to machine_is_compatible() 2010-02-09 08:33:00 -07:00