Revert "powerpc/eeh: Fix crash in eeh_add_device_early() on Cell"
authorGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Mon, 11 Apr 2016 19:17:22 +0000 (16:17 -0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 12 May 2016 09:52:21 +0000 (19:52 +1000)
This reverts commit 89a51df5ab1d38b257300b8ac940bbac3bb0eb9b.

The function eeh_add_device_early() is used to perform EEH
initialization in devices added later on the system, like in
hotplug/DLPAR scenarios. Since the commit 89a51df5ab1d ("powerpc/eeh:
Fix crash in eeh_add_device_early() on Cell") a new check was introduced
in this function - Cell has no EEH capabilities which led to kernel oops
if hotplug was performed, so checking for eeh_enabled() was introduced
to avoid the issue.

However, in architectures that EEH is present like pSeries or PowerNV,
we might reach a case in which no PCI devices are present on boot time
and so EEH is not initialized. Then, if a device is added via DLPAR for
example, eeh_add_device_early() fails because eeh_enabled() is false,
and EEH end up not being enabled at all.

This reverts the aforementioned patch since a new verification was
introduced by the commit d91dafc02f42 ("powerpc/eeh: Delay probing EEH
device during hotplug") and so the original Cell issue does not happen
anymore.

Cc: stable@vger.kernel.org # v4.1+
Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/eeh.c

index 9d1d46ccf16c4a4ea330d1a70be43deacc920393..c9bc78e9c6101b2ae5016efec858c5c38b0f4158 100644 (file)
@@ -1068,7 +1068,7 @@ void eeh_add_device_early(struct pci_dn *pdn)
        struct pci_controller *phb;
        struct eeh_dev *edev = pdn_to_eeh_dev(pdn);
 
-       if (!edev || !eeh_enabled())
+       if (!edev)
                return;
 
        if (!eeh_has_flag(EEH_PROBE_MODE_DEVTREE))