linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/eeh: Avoid to handle EEH on a passed Child PE
@ 2015-09-21  9:29 Wei Yang
  2015-09-21 11:49 ` Gavin Shan
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Yang @ 2015-09-21  9:29 UTC (permalink / raw)
  To: gwshan; +Cc: linuxppc-dev, Wei Yang

Current EEH infrastructure would avoid to handle EEH when a PE is passed to
guest, while if this PE is a Child PE of the one hit EEH, host would handle
this. By doing so, this would leads to guest hang. The correct way is
avoid to handle it on host and let guest to recover.

This patch avoids to handle EEH on a passed Child PE.

Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/eeh_pe.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/powerpc/kernel/eeh_pe.c b/arch/powerpc/kernel/eeh_pe.c
index 5cde950..c6d0e9f 100644
--- a/arch/powerpc/kernel/eeh_pe.c
+++ b/arch/powerpc/kernel/eeh_pe.c
@@ -172,6 +172,7 @@ static struct eeh_pe *eeh_pe_next(struct eeh_pe *pe,
  * callback returns something other than NULL, or no more PEs
  * to be traversed.
  */
+static void *__eeh_pe_get(void *data, void *flag);
 void *eeh_pe_traverse(struct eeh_pe *root,
 		      eeh_traverse_func fn, void *flag)
 {
@@ -179,6 +180,8 @@ void *eeh_pe_traverse(struct eeh_pe *root,
 	void *ret;
 
 	for (pe = root; pe; pe = eeh_pe_next(pe, root)) {
+		if (eeh_pe_passed(pe) && (fn != __eeh_pe_get))
+			continue;
 		ret = fn(pe, flag);
 		if (ret) return ret;
 	}
@@ -210,6 +213,8 @@ void *eeh_pe_dev_traverse(struct eeh_pe *root,
 
 	/* Traverse root PE */
 	for (pe = root; pe; pe = eeh_pe_next(pe, root)) {
+		if (eeh_pe_passed(pe))
+			continue;
 		eeh_pe_for_each_dev(pe, edev, tmp) {
 			ret = fn(edev, flag);
 			if (ret)
-- 
2.5.0

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

end of thread, other threads:[~2015-09-25  8:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-21  9:29 [PATCH] powerpc/eeh: Avoid to handle EEH on a passed Child PE Wei Yang
2015-09-21 11:49 ` Gavin Shan
2015-09-22  4:43   ` Wei Yang
2015-09-22 23:07     ` Gavin Shan
2015-09-25  8:19       ` Wei Yang

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).