summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYue Du <daviddu@us.ibm.com>2017-07-21 11:01:47 -0500
committerJoshua Hunsberger <jahunsbe@us.ibm.com>2017-10-23 18:34:33 -0500
commitaf8b82e5326ac10f49eeaeab2cdca03c4c952278 (patch)
treeda22d98d1f048aa3a09d57d5d63ec05b156f4c4c
parent2bb04d2b2d2344e255a1df52cfa91c08e7be35ac (diff)
downloadtalos-hcode-af8b82e5326ac10f49eeaeab2cdca03c4c952278.tar.gz
talos-hcode-af8b82e5326ac10f49eeaeab2cdca03c4c952278.zip
STOP: Fix long delayed Phantom by dec wakeup in stop5
Change-Id: Ic1dee437a17c35ed9bd19894cfef9cf0c08eee02 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43434 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Michael S. Floyd <mfloyd@us.ibm.com> Reviewed-by: BRIAN D. VICTOR <brian.d.victor1@ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
-rw-r--r--import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_irq_handlers.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_irq_handlers.c b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_irq_handlers.c
index df7c38f7..25986506 100644
--- a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_irq_handlers.c
+++ b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_irq_handlers.c
@@ -251,6 +251,7 @@ p9_sgpe_ipi3_low_handler(void* arg, PkIrqId irq)
static void
p9_sgpe_pig_type23_parser(const uint32_t type)
{
+ uint32_t timeout = 0;
uint32_t qloop = 0;
uint32_t cloop = 0;
uint32_t cstart = 0;
@@ -395,16 +396,20 @@ p9_sgpe_pig_type23_parser(const uint32_t type)
// request exit
if (cpayload & TYPE2_PAYLOAD_EXIT_EVENT)
{
- if (!(scom_data.words.upper & BIT32(13)))
+ // phantom can be processed when WNS already handoff to cme by a different wakeup
+ // OR can be delayed long enough when WNS handoff back to sgpe by next cme entry
+ if ((!(scom_data.words.upper & BIT32(13))) ||
+ (G_sgpe_stop_record.level[qloop][cloop] == 0))
{
- if (cpayload == 0x400)
+ // type2 duplicate wakeup can happen due to manual PCWU vs other HW wakeup
+ if (type == 2)
{
- PK_TRACE_INF("WARNING: Ignore Phantom PCWU PIG \
+ PK_TRACE_INF("WARNING: Ignore Phantom Type2 Wakeup PIG \
(already handoff cme by other wakeup");
}
- else
+ else // otherwise PPM shouldnt send duplicate pig if wakeup is present
{
- PK_TRACE_INF("ERROR: Received Phantom Exit PIG \
+ PK_TRACE_INF("ERROR: Received Phantom Type3 Wakeup PIG \
When Wakeup_notify_select = 0. HALT SGPE!");
PK_PANIC(SGPE_PIG_TYPE23_EXIT_WNS_CME);
}
@@ -439,7 +444,15 @@ p9_sgpe_pig_type23_parser(const uint32_t type)
else if ((G_sgpe_stop_record.level[qloop][cloop] =
(cpayload & TYPE2_PAYLOAD_STOP_LEVEL)))
{
- if (!(scom_data.words.upper & BIT32(13)))
+ timeout = 16;
+
+ while((!(scom_data.words.upper & BIT32(13))) && timeout)
+ {
+ GPE_GETSCOM(GPE_SCOM_ADDR_CORE(CPPM_CPMMR, cindex), scom_data.value);
+ timeout--;
+ }
+
+ if (!timeout)
{
PK_TRACE_ERR("ERROR: Received Phantom Entry PIG \
When Wakeup_notify_select = 0. HALT SGPE!");
OpenPOWER on IntegriCloud