Skip to content

Commit

Permalink
CME: Process DB0 inside intercme_msg_handler
Browse files Browse the repository at this point in the history
    Key_Cronus_Test=PM_REGRESS

Change-Id: Ibba9da7c8715dcd0b79790c8466db72a0ccdeeb1
CQ: SW426908
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59864
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
  • Loading branch information
rbatraAustinIBM authored and op-jenkins committed Jun 6, 2018
1 parent fc7996a commit b175658
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,10 @@ void p9_cme_pstate_intercme_in0_irq_handler(void)

void p9_cme_pstate_intercme_msg_handler(void)
{
p9_cme_pstate_sibling_lock_and_intercme_protocol(INTERCME_MSG_LOCK_WAIT_ON_RECV ,
INTERCME_IN0_PROCESS_SKIP);
p9_cme_pstate_sibling_lock_and_intercme_protocol(INTERCME_MSG_LOCK_WAIT_ON_RECV);
}

void p9_cme_pstate_sibling_lock_and_intercme_protocol(INTERCME_MSG_LOCK_ACTION intercme_msg_lock_action,
INTERCME_IN0_PROCESS_ACTION intercme_in0_process_action)
void p9_cme_pstate_sibling_lock_and_intercme_protocol(INTERCME_MSG_LOCK_ACTION intercme_msg_lock_action)
{
PK_TRACE_INF("SIBL: Enter");
uint32_t msg;
Expand All @@ -82,7 +80,7 @@ void p9_cme_pstate_sibling_lock_and_intercme_protocol(INTERCME_MSG_LOCK_ACTION i
}

//If INTERCME_DIRECT_IN0, then process DB0 data
if((in32(CME_LCL_EISR) & BIT32(7)) && (intercme_in0_process_action == INTERCME_IN0_PROCESS))
if(in32(CME_LCL_EISR) & BIT32(7))
{
p9_cme_pstate_process_db0_sibling();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,6 @@ typedef enum
INTERCME_MSG_LOCK_SKIP = 1,
} INTERCME_MSG_LOCK_ACTION;

typedef enum
{
INTERCME_IN0_PROCESS = 0,
INTERCME_IN0_PROCESS_SKIP = 1,
} INTERCME_IN0_PROCESS_ACTION;


typedef struct
{
Expand Down Expand Up @@ -228,8 +222,7 @@ void intercme_direct(INTERCME_DIRECT_INTF intf, INTERCME_DIRECT_TYPE type, uint3
void p9_cme_core_stop_analog_control(uint32_t core_mask, ANALOG_CONTROL enable);
void p9_cme_pstate_pmsr_updt();
void p9_cme_pstate_pmsr_updt_in_progress();
void p9_cme_pstate_sibling_lock_and_intercme_protocol(INTERCME_MSG_LOCK_ACTION intercme_msg_lock_action,
INTERCME_IN0_PROCESS_ACTION intercme_in0_process_action);
void p9_cme_pstate_sibling_lock_and_intercme_protocol(INTERCME_MSG_LOCK_ACTION intercme_msg_lock_action);
void p9_cme_pstate_process_db0_sibling();


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void p9_cme_pstate_db3_handler(void)

intercme_direct(INTERCME_DIRECT_IN2, INTERCME_DIRECT_ACK, 0);

p9_cme_pstate_sibling_lock_and_intercme_protocol(INTERCME_MSG_LOCK_SKIP, INTERCME_IN0_PROCESS);
p9_cme_pstate_sibling_lock_and_intercme_protocol(INTERCME_MSG_LOCK_SKIP);
}

if (db3.fields.cme_message_numbern == MSGID_DB3_ENTER_SAFE_MODE)
Expand Down Expand Up @@ -772,7 +772,7 @@ inline void p9_cme_pstate_register()
}
else
{
p9_cme_pstate_sibling_lock_and_intercme_protocol(INTERCME_MSG_LOCK_WAIT_ON_RECV, INTERCME_IN0_PROCESS);
p9_cme_pstate_sibling_lock_and_intercme_protocol(INTERCME_MSG_LOCK_WAIT_ON_RECV);
msgCnt++;

if (msgCnt == 3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,9 @@ p9_cme_stop_entry()
}
while(scom_data.words.upper & BIT32(13));

wrteei(0);
p9_cme_core_stop_analog_control(core, ANALOG_DISABLE);
wrteei(1);

PK_TRACE("Switch glsmux to refclk to save clock grid power via CGCR[3]");
CME_PUTSCOM(C_PPM_CGCR, core, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,9 @@ p9_cme_stop_exit_lv2(uint32_t core)
MARK_TRAP(SX_ENABLE_ANALOG)
//=========================

wrteei(0);
p9_cme_core_stop_analog_control(core, ANALOG_ENABLE);
wrteei(1);

// do this after assert glsmux so glitch can have time to resolve
// catchup to stop2 exit will acquire here
Expand Down

0 comments on commit b175658

Please sign in to comment.