From 147aa0e27bfb67fba41b9a9187b60c4922f3b5b3 Mon Sep 17 00:00:00 2001 From: Yue Du Date: Thu, 16 Feb 2017 16:49:55 -0600 Subject: STOP: Fix L2 purge abort by pc interrupt on core handoff to sgpe Change-Id: I738ac02f0fccff8aadfe6b78535975cdc48b9155 Original-Change-Id: I81973d4de46f134f72dc9582aae7e6b6ea749e42 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36602 Tested-by: Jenkins Server Reviewed-by: JAMES DEZELLE Reviewed-by: ASHISH A. MORE Reviewed-by: Gregory S. Still --- .../ppe_closed/cme/stop_cme/p9_cme_stop_entry.c | 28 +++++++++++++++------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/import/chips/p9/procedures/ppe_closed/cme/stop_cme/p9_cme_stop_entry.c b/import/chips/p9/procedures/ppe_closed/cme/stop_cme/p9_cme_stop_entry.c index 86787611..d27fda58 100755 --- a/import/chips/p9/procedures/ppe_closed/cme/stop_cme/p9_cme_stop_entry.c +++ b/import/chips/p9/procedures/ppe_closed/cme/stop_cme/p9_cme_stop_entry.c @@ -806,12 +806,15 @@ p9_cme_stop_entry() core_aborted |= CME_MASK_C1; } - //======================================= - MARK_TAG(SE_PURGE_L2_ABORT, core_aborted) - //======================================= + if (core_aborted) + { + //======================================= + MARK_TAG(SE_PURGE_L2_ABORT, core_aborted) + //======================================= - PK_TRACE_DBG("Abort: L2+NCU purge aborted by core[%d]", core_aborted); - out32(CME_LCL_SICR_OR, BIT32(19) | BIT32(23)); + PK_TRACE_DBG("Abort: L2+NCU purge aborted by core[%d]", core_aborted); + out32(CME_LCL_SICR_OR, BIT32(19) | BIT32(23)); + } } #endif @@ -828,10 +831,17 @@ p9_cme_stop_entry() MARK_TAG(SE_PURGE_L2_DONE, core_aborted ? core_aborted : CME_MASK_BC) //=================================================================== - // if core = 3 aborted = 1, core = 2(sgpe handoff) aborted (cme wakeup) - // if core = 1 aborted = 2, core = 1(sgpe handoff) aborted (sgpe wakeup) - // if core = 1 aborted = 1, core = 0(break) aborted (cme wakeup) - // if core = 2 aborted = 3, core = 0(break) aborted (cme wakeup) + // 1) if core = 3 aborted = 1, core = 2(sgpe handoff) aborted (cme wakeup) + // 2) if core = 1 aborted = 1, core = 0(break) aborted (cme wakeup) + // 3) if core = 2 aborted = 3, core = 0(break) aborted (cme/sgpe wakeup) + // 4) if core = 1 aborted = 2, core = 1(sgpe handoff) aborted (sgpe wakeup) + // for case 3) and 4) on the other core already handoff to sgpe + // if rgwu or spwu, fine because it will be sgpe wakeup + // if pc, there wont be sgpe wakeup due to notify bug, + // so ignore this case for abortion. otherwise, + // for case 3) core is waking up by tag along with another core + // but leave stop8 record at sgpe + // for case 4) l2 is not purged and sgpe will do stop8 if (core != (core_aborted & core)) { core &= ~core_aborted; -- cgit v1.2.3