linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2 v3] Revert "powerpc/eeh: Fix crash in eeh_add_device_early() on Cell"
@ 2016-04-11 19:17 Guilherme G. Piccoli
  2016-04-11 19:17 ` [PATCH 2/2 v3] powerpc/iommu: Remove the dependency on EEH struct in DDW mechanism Guilherme G. Piccoli
  2016-05-12 11:32 ` [1/2, v3] Revert "powerpc/eeh: Fix crash in eeh_add_device_early() on Cell" Michael Ellerman
  0 siblings, 2 replies; 4+ messages in thread
From: Guilherme G. Piccoli @ 2016-04-11 19:17 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: gwshan, mpe, benh, paulus, nfont

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
Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/eeh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index 6544017..6758484 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel/eeh.c
@@ -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))
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-12 11:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-11 19:17 [PATCH 1/2 v3] Revert "powerpc/eeh: Fix crash in eeh_add_device_early() on Cell" Guilherme G. Piccoli
2016-04-11 19:17 ` [PATCH 2/2 v3] powerpc/iommu: Remove the dependency on EEH struct in DDW mechanism Guilherme G. Piccoli
2016-05-12 11:32   ` [2/2, " Michael Ellerman
2016-05-12 11:32 ` [1/2, v3] Revert "powerpc/eeh: Fix crash in eeh_add_device_early() on Cell" Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).