diff options
| author | Rahul Batra <rbatra@us.ibm.com> | 2018-05-13 23:15:50 -0500 |
|---|---|---|
| committer | hostboot <hostboot@us.ibm.com> | 2018-05-23 10:55:20 -0500 |
| commit | 3be15513d0e4af8b605fbce94a596afeca36b205 (patch) | |
| tree | 3aa9cb39e03e38181346ead5c43f4cf53ad20ef4 | |
| parent | 503d2e402b13825ecee60d357ccf1fac62bf1ee7 (diff) | |
| download | talos-hcode-3be15513d0e4af8b605fbce94a596afeca36b205.tar.gz talos-hcode-3be15513d0e4af8b605fbce94a596afeca36b205.zip | |
PGPE: Fix WOF Enable/Disable Issues
- Only send Ctrl Stop Updt on the very first WOF enable since
PGPE boot
- Send correct ACK for WOF_CTRL(OFF) IPC
- Disable WOF during Pstate Stop processing if not already
disabled
Key_Cronus_Test=PM_REGRESS
Change-Id: Ia48d196343ce77893d0369fd8daa4373a121fc46
CQ: SW429049
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58738
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Cronus HW CI <cronushw-ci+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: YUE DU <daviddu@us.ibm.com>
Reviewed-by: RANGANATHPRASAD G. BRAHMASAMUDRA <prasadbgr@in.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
| -rw-r--r-- | import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_pstate.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_pstate.c b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_pstate.c index 365e8e0f..24e3a381 100644 --- a/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_pstate.c +++ b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_pstate.c @@ -1016,11 +1016,17 @@ void p9_pgpe_pstate_stop() ocb_qcsr_t qcsr; db0_parms_t p; + //If WOF is enabled, then disable it also. We should never have + //WOF enabled, but Pstate stopped + if(G_pgpe_pstate_record.wofStatus == WOF_ENABLED) + { + p9_pgpe_pstate_wof_ctrl(PGPE_ACTION_WOF_OFF); + } + + //Send PSTATE_STOP DB0 qcsr.value = in32(G_OCB_QCSR); db0_stop.value = 0; db0_stop.fields.msg_id = MSGID_DB0_STOP_PSTATE_BROADCAST; - - //Send PSTATE_STOP DB0 p.db0val = db0_stop.value; p.type = PGPE_DB0_TYPE_UNICAST; p.targetCores = G_pgpe_pstate_record.activeDB; @@ -1125,8 +1131,20 @@ void p9_pgpe_pstate_wof_ctrl(uint32_t action) if ((G_pgpe_header_data->g_pgpe_flags & PGPE_FLAG_ENABLE_VRATIO) || (G_pgpe_header_data->g_pgpe_flags & PGPE_FLAG_VRATIO_MODIFIER)) { - p9_pgpe_pstate_send_ctrl_stop_updt(CTRL_STOP_UPDT_ENABLE_CORE); - activeCores = G_sgpe_control_updt.fields.active_cores << 8; + //If this is first time wof has been enabled since PGPE boot, then ask SGPE for + //core active update. Otherwise, core active update are already enabled, and sending + //a Ctrl Stop Updt IPC can cause a livelock where SGPE is waiting for an ack + //for Active Cores Update and PGPE is waiting for an ack for Ctrl Stop Updt + if (G_pgpe_pstate_record.activeCoreUpdtAction == ACTIVE_CORE_UPDATE_ACTION_ERROR) + { + p9_pgpe_pstate_send_ctrl_stop_updt(CTRL_STOP_UPDT_ENABLE_CORE); + activeCores = G_sgpe_control_updt.fields.active_cores << 8; + } + else + { + activeCores = G_pgpe_pstate_record.activeCores; + } + G_pgpe_pstate_record.activeCoreUpdtAction = ACTIVE_CORE_UPDATE_ACTION_PROCESS_AND_ACK; } else |

