aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/eeh.c
diff options
context:
space:
mode:
authorGavin Shan <shangw@linux.vnet.ibm.com>2012-09-07 22:44:09 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-09-10 09:35:31 +1000
commit9b84348c92a122f3ccecda04083ada620312aa53 (patch)
tree9dc1c17f168117b62f90d1466af647f0ffce7488 /arch/powerpc/platforms/pseries/eeh.c
parentpowerpc/eeh: Search PE based on requirement (diff)
downloadlinux-dev-9b84348c92a122f3ccecda04083ada620312aa53.tar.xz
linux-dev-9b84348c92a122f3ccecda04083ada620312aa53.zip
powerpc/eeh: Create PEs duing EEH initialization
The patch creates PEs and associated the newly created PEs with it parent/silbing as well as EEH devices. It would become more straight to trace EEH errors and recover them accordingly. Once the EEH functionality on one PCI IOA has been enabled, we tries to create PE against it. If there's existing PE, to which the current PCI IOA should be attached, the existing PE will be converted from "device" type to "bus" type accordingly. 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.c')
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index 0ba7e3b84672..8f2149061846 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -895,6 +895,8 @@ static void *eeh_early_enable(struct device_node *dn, void *data)
eeh_subsystem_enabled = 1;
edev->mode |= EEH_MODE_SUPPORTED;
+ eeh_add_to_parent_pe(edev);
+
pr_debug("EEH: %s: eeh enabled, config=%x pe_config=%x\n",
dn->full_name, edev->config_addr,
edev->pe_config_addr);
@@ -908,6 +910,10 @@ static void *eeh_early_enable(struct device_node *dn, void *data)
/* Parent supports EEH. */
edev->mode |= EEH_MODE_SUPPORTED;
edev->config_addr = of_node_to_eeh_dev(dn->parent)->config_addr;
+ edev->pe_config_addr = of_node_to_eeh_dev(dn->parent)->pe_config_addr;
+
+ eeh_add_to_parent_pe(edev);
+
return NULL;
}
}