summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/eeh_dev.c
diff options
context:
space:
mode:
authorGavin Shan2012-09-08 00:44:02 +0200
committerBenjamin Herrenschmidt2012-09-10 01:35:27 +0200
commit35e5cfe27e674e4580408b34e7fc97e18460e048 (patch)
treeb601328b2efb63fab07fbc94fa1559da33870b8b /arch/powerpc/platforms/pseries/eeh_dev.c
parentpowerpc: Initialise paca.data_offset with poison (diff)
downloadkernel-qcow2-linux-35e5cfe27e674e4580408b34e7fc97e18460e048.tar.gz
kernel-qcow2-linux-35e5cfe27e674e4580408b34e7fc97e18460e048.tar.xz
kernel-qcow2-linux-35e5cfe27e674e4580408b34e7fc97e18460e048.zip
powerpc/eeh: Move EEH initialization around
Currently, we have 3 phases for EEH initialization on pSeries platform. All of them are done through builtin functions: platform initialization, EEH device creation, and EEH subsystem enablement. All of them are done no later than ppc_md.setup_arch. That means that the slab/slub isn't ready yet, so we have to allocate memory chunks on basis of PAGE_SIZE for those dynamically created EEH devices. That's pretty expensive. In order to utilize slab/slub for memory allocation, we have to move the EEH initialization functions around, but all of them should be called after slab is ready. Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/eeh_dev.c')
-rw-r--r--arch/powerpc/platforms/pseries/eeh_dev.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh_dev.c b/arch/powerpc/platforms/pseries/eeh_dev.c
index c4507d095900..ab68c5910f9f 100644
--- a/arch/powerpc/platforms/pseries/eeh_dev.c
+++ b/arch/powerpc/platforms/pseries/eeh_dev.c
@@ -93,10 +93,14 @@ void __devinit eeh_dev_phb_init_dynamic(struct pci_controller *phb)
* Scan all the existing PHBs and create EEH devices for their OF
* nodes and their children OF nodes
*/
-void __init eeh_dev_phb_init(void)
+static int __init eeh_dev_phb_init(void)
{
struct pci_controller *phb, *tmp;
list_for_each_entry_safe(phb, tmp, &hose_list, list_node)
eeh_dev_phb_init_dynamic(phb);
+
+ return 0;
}
+
+core_initcall(eeh_dev_phb_init);