Skip to content

Commit

Permalink
STOP: Atomic lock of cache clock controller and PCB slave
Browse files Browse the repository at this point in the history
Atomic lock the Cache clock controller before stopping L2 clocks.
Do not release it until both EXs exit Stop8.
Atomic lock the entire cache chiplet only for Stop11 entry, exit.

Change-Id: I6dce138bc1c10f54fafe86ad8f0eb305a6daf1c9
Original-Change-Id: I63691b707c17026ac744b461d40b438666c40d01
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/37881
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Brian T. Vanderpool <vanderp@us.ibm.com>
Reviewed-by: ASHISH A. MORE <ashish.more@in.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 2b66fcf commit e3f788c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ extern "C" {
#define EQ_CLK_REGION 0x10030006
#define EQ_CLOCK_STAT_SL 0x10030008
#define EQ_CLOCK_STAT_ARY 0x1003000A
#define EQ_CC_ATOMIC_LOCK 0x100303FF
#define EQ_HOST_ATTN 0x10040009
#define EQ_LOCAL_XSTOP_ERR 0x10040018
#define EQ_THERM_MODE_REG 0x1005000F
Expand Down Expand Up @@ -117,6 +118,7 @@ extern "C" {
#define EQ_QPPM_QCCR 0x100F01BD
#define EQ_QPPM_QCCR_WCLEAR 0x100F01BE
#define EQ_QPPM_QCCR_WOR 0x100F01BF
#define EQ_QPPM_ATOMIC_LOCK 0x100F03FF

#define EX_L2_MODE_REG0 0x1001080A
#define EX_L2_MODE_REG1 0x1001080B
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,17 @@ p9_sgpe_stop_entry()

PK_TRACE_DBG("Check: q[%d]ex[%d] start ex entry", qloop, ex);

PK_TRACE("Acquire cache clock controller atomic lock");
GPE_PUTSCOM(GPE_SCOM_ADDR_QUAD(EQ_CC_ATOMIC_LOCK, qloop), BITS64(0, 5));
GPE_GETSCOM(GPE_SCOM_ADDR_QUAD(EQ_CC_ATOMIC_LOCK, qloop), scom_data.value);

if ((scom_data.words.upper & BITS32(0, 5)) != 0xC0000000)
{
PKTRACE("ERROR: Failed to Obtain Cache %d Clk Ctrl Atomic Lock. Register Content: %x",
qloop, scom_data.words.upper);
pk_halt();
}

PK_TRACE("Update QSSR: stop_entry_ongoing");
out32(OCB_QSSR_OR, BIT32(qloop + 20));

Expand Down Expand Up @@ -503,6 +514,17 @@ p9_sgpe_stop_entry()

PK_TRACE_DBG("Check: q[%d]ex[%d] starts quad entry", qloop, ex);

PK_TRACE("Acquire cache PCB slave atomic lock");
GPE_PUTSCOM(GPE_SCOM_ADDR_QUAD(EQ_QPPM_ATOMIC_LOCK, qloop), BITS64(0, 5));
GPE_GETSCOM(GPE_SCOM_ADDR_QUAD(EQ_QPPM_ATOMIC_LOCK, qloop), scom_data.value);

if ((scom_data.words.upper & BITS32(0, 5)) != 0xC0000000)
{
PKTRACE("ERROR: Failed to Obtain Cache %d PCB Slave Atomic Lock. Register Content: %x",
qloop, scom_data.words.upper);
pk_halt();
}

PK_TRACE("Update QSSR: stop_entry_ongoing");
out32(OCB_QSSR_OR, BIT32(qloop + 20));

Expand Down

0 comments on commit e3f788c

Please sign in to comment.