aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/of_platform.c
diff options
context:
space:
mode:
authorGravatar Oliver O'Halloran <oohall@gmail.com> 2020-03-06 18:39:03 +1100
committerGravatar Michael Ellerman <mpe@ellerman.id.au> 2020-03-25 12:09:39 +1100
commitb6eebb093cad0feb56c717611ee0d2d7c66b4ec7 (patch)
tree350aaffbb9bed493107f6e368092ea25788514a9 /arch/powerpc/kernel/of_platform.c
parentpowerpc/eeh: Remove PHB check in probe (diff)
downloadlinux-b6eebb093cad0feb56c717611ee0d2d7c66b4ec7.tar.gz
linux-b6eebb093cad0feb56c717611ee0d2d7c66b4ec7.tar.bz2
linux-b6eebb093cad0feb56c717611ee0d2d7c66b4ec7.zip
powerpc/eeh: Make early EEH init pseries specific
The eeh_ops->probe() function is called from two different contexts: 1. On pseries, where we set EEH_PROBE_MODE_DEVTREE, it's called in eeh_add_device_early() which is supposed to run before we create a pci_dev. 2. On PowerNV, where we set EEH_PROBE_MODE_DEV, it's called in eeh_device_add_late() which is supposed to run *after* the pci_dev is created. The "early" probe is required because PAPR requires that we perform an RTAS call to enable EEH support on a device before we start interacting with it via config space or MMIO. This requirement doesn't exist on PowerNV and shoehorning two completely separate initialisation paths into a common interface just results in a convoluted code everywhere. Additionally the early probe requires the probe function to take an pci_dn rather than a pci_dev argument. We'd like to make pci_dn a pseries specific data structure since there's no real requirement for them on PowerNV. To help both goals move the early probe into the pseries containment zone so the platform depedence is more explicit. Reviewed-by: Sam Bobroff <sbobroff@linux.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200306073904.4737-5-oohall@gmail.com
Diffstat (limited to 'arch/powerpc/kernel/of_platform.c')
-rw-r--r--arch/powerpc/kernel/of_platform.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index 64edac81c633..71a3f97dc988 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -62,13 +62,9 @@ static int of_pci_phb_probe(struct platform_device *dev)
/* Init pci_dn data structures */
pci_devs_phb_init_dynamic(phb);
- /* Create EEH devices for the PHB */
+ /* Create EEH PEs for the PHB */
eeh_dev_phb_init_dynamic(phb);
- /* Register devices with EEH */
- if (dev->dev.of_node->child)
- eeh_add_device_tree_early(PCI_DN(dev->dev.of_node));
-
/* Scan the bus */
pcibios_scan_phb(phb);
if (phb->bus == NULL)