Skip to content

Commit

Permalink
STOP: Put PIG and Notify_select back to back
Browse files Browse the repository at this point in the history
Change-Id: I41394f820379c140f373fe2287b43966791d7b06
Original-Change-Id: I5e0a237aa8abd7933bf0941d0c98d2c41b3f611f
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42876
Reviewed-by: Adam S. Hale <adam.samuel.hale@ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Brian T. Vanderpool <vanderp@us.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
  • Loading branch information
davidduyue authored and op-jenkins committed Aug 22, 2018
1 parent 1bdd5be commit 4f79fd1
Showing 1 changed file with 11 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1290,32 +1290,6 @@ p9_cme_stop_entry()
scom_data.words.upper = SSH_ACT_LV5_COMPLETE;
CME_PUTSCOM(PPM_SSHSRC, core, scom_data.value);

#if DEBUG_RUNTIME_STATE_CHECK

if (core & CME_MASK_C0)
{
CME_GETSCOM(CPPM_CPMMR, CME_MASK_C0, scom_data.value);

if ((scom_data.words.upper & BIT32(13)))
{
PKTRACE("ERROR.A0: C0 notify was already set?");
pk_halt();
}
}

if (core & CME_MASK_C1)
{
CME_GETSCOM(CPPM_CPMMR, CME_MASK_C1, scom_data.value);

if ((scom_data.words.upper & BIT32(13)))
{
PKTRACE("ERROR.A1: C1 notify was already set?");
pk_halt();
}
}

#endif

PK_TRACE("Send PCB interrupt per core via PIG, select irq type via CPMMR[10]");

for (core_mask = 2; core_mask; core_mask--)
Expand All @@ -1338,51 +1312,29 @@ p9_cme_stop_entry()
}

pig.fields.req_intr_payload = G_cme_stop_record.req_level[core_index];
CME_PUTSCOM(PPM_PIG, core_mask, pig.value);

// put PIG and Wakeup_Notify_Select back to back as possible
CME_PUTSCOM(PPM_PIG, core_mask, pig.value);
CME_PUTSCOM(CPPM_CPMMR_OR, core_mask, BIT64(13));
PK_TRACE_DBG("Switch Core[%d] PPM wakeup to STOP-GPE via CPMMR[13]", core_mask);

G_cme_stop_record.core_stopgpe |= core;
G_cme_stop_record.act_level[core_index] = STOP_LEVEL_5;
}
}

sync();

PK_TRACE("Clear special wakeup after wakeup_notify = 1 since it is edge triggered");
out32(CME_LCL_EISR_CLR, core << SHIFT32(15));

#if NIMBUS_DD_LEVEL != 10

PK_TRACE("Drop PPM_WRITE_DISABLE via CPMMR[0]");
CME_PUTSCOM(CPPM_CPMMR_CLR, core, BIT64(0));

#endif

PK_TRACE_DBG("Switch Core PPM wakeup to STOP-GPE via CPMMR[13]");
CME_PUTSCOM(CPPM_CPMMR_OR, core, BIT64(13));

#if DEBUG_RUNTIME_STATE_CHECK

if (core & CME_MASK_C0)
{
CME_GETSCOM(CPPM_CPMMR, CME_MASK_C0, scom_data.value);

if (!(scom_data.words.upper & BIT32(13)))
{
PKTRACE("ERROR.B0: C0 notify fail to set");
pk_halt();
}
}

if (core & CME_MASK_C1)
{
CME_GETSCOM(CPPM_CPMMR, CME_MASK_C1, scom_data.value);

if (!(scom_data.words.upper & BIT32(13)))
{
PKTRACE("ERROR.B1: C1 notify fail to set");
pk_halt();
}
}

#endif

PK_TRACE("Clear special wakeup after wakeup_notify = 1 since it is edge triggered");
out32(CME_LCL_EISR_CLR, core << SHIFT32(15));

PK_TRACE_INF("SE.5B: Core[%d] Handed off to SGPE", core);

}
Expand Down

0 comments on commit 4f79fd1

Please sign in to comment.