Skip to content

Commit

Permalink
PGPE: Ack Back any pending quad active update during WOF Disable
Browse files Browse the repository at this point in the history
     Key_Cronus_Test=PM_REGRESS

Change-Id: I6c473add9d794aa0cf99acc3da4b2248e3afb4c0
CQ: SW431277
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60035
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 8, 2018
1 parent 85e6dce commit 51692fa
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,27 @@ void p9_pgpe_pstate_wof_ctrl(uint32_t action)

G_pgpe_pstate_record.wofStatus = WOF_DISABLED;

//ACK any pending quad active update exit. PGPE might have been waiting for WOF VFRT from OCC, but
//with WOF disabled that will never come.
if (G_pgpe_pstate_record.ipcPendTbl[IPC_PEND_SGPE_ACTIVE_QUADS_UPDT].pending_ack == 1)
{
ipc_async_cmd_t* async_cmd = (ipc_async_cmd_t*)G_pgpe_pstate_record.ipcPendTbl[IPC_PEND_SGPE_ACTIVE_QUADS_UPDT].cmd;
ipcmsg_s2p_update_active_quads_t* args = (ipcmsg_s2p_update_active_quads_t*)async_cmd->cmd_data;

G_pgpe_pstate_record.ipcPendTbl[IPC_PEND_SGPE_ACTIVE_QUADS_UPDT].pending_ack = 0;
G_pgpe_pstate_record.pReqActQuads->fields.requested_active_quads |= (args->fields.requested_quads << 2);

p9_pgpe_pstate_process_quad_exit_notify(args->fields.requested_quads << 2);

args->fields.return_active_quads = G_pgpe_pstate_record.pReqActQuads->fields.requested_active_quads >> 2;
args->fields.return_code = IPC_SGPE_PGPE_RC_SUCCESS;
ipc_send_rsp(G_pgpe_pstate_record.ipcPendTbl[IPC_PEND_SGPE_ACTIVE_QUADS_UPDT].cmd, IPC_RC_SUCCESS);

p9_pgpe_optrace(ACK_QUAD_ACTV);

GPE_PUTSCOM(G_OCB_OCCFLG_CLR, BIT32(REQUESTED_ACTIVE_QUAD_UPDATE));//Clear OCCFLG[REQUESTED_ACTIVE_QUAD_UPDATE]
}

PK_TRACE_DBG("WCT: WOF Disabled");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,16 +363,17 @@ inline void p9_pgpe_process_sgpe_updt_active_quads()
}

args->fields.return_active_quads =
((G_pgpe_pstate_record.pReqActQuads->fields.requested_active_quads &= (~(quads_requested))) >> 2);
((G_pgpe_pstate_record.pReqActQuads->fields.requested_active_quads & (~(quads_requested))) >> 2);
args->fields.return_code = IPC_SGPE_PGPE_RC_SUCCESS;
}
//EXIT
else
{
if (args->fields.exit_type == UPDATE_ACTIVE_QUADS_ENTRY_TYPE_NOTIFY)
//Update Shared Memory Region
G_pgpe_pstate_record.pReqActQuads->fields.requested_active_quads |= (quads_requested);

if (args->fields.exit_type == UPDATE_ACTIVE_QUADS_EXIT_TYPE_NOTIFY)
{
//Update Shared Memory Region
G_pgpe_pstate_record.pReqActQuads->fields.requested_active_quads |= (args->fields.requested_quads << 2);

//WOF Enabled
//If WOF_ENABLED=1, and pstatesStatus == ACITVE, then request for WOF_VFRT
Expand All @@ -385,7 +386,7 @@ inline void p9_pgpe_process_sgpe_updt_active_quads()
}
else
{
p9_pgpe_pstate_process_quad_exit_notify(args->fields.requested_quads << 2);
p9_pgpe_pstate_process_quad_exit_notify(quads_requested);
args->fields.return_active_quads = G_pgpe_pstate_record.pReqActQuads->fields.requested_active_quads >>
2; //activeQuads isn't updated until registration, so we OR with requested quads.
args->fields.return_code = IPC_SGPE_PGPE_RC_SUCCESS;
Expand Down

0 comments on commit 51692fa

Please sign in to comment.