summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRahul Batra <rbatra@us.ibm.com>2018-03-01 22:20:55 -0600
committerhostboot <hostboot@us.ibm.com>2018-03-22 14:05:13 -0500
commitec726f6ff0618905ac977a46b4d75f34e7079454 (patch)
tree0aaa25d5cea125a657ec965751da7778a7d8a099
parent54c221c11ab60fd8cc869e20194ccf2617e0dc03 (diff)
downloadtalos-hcode-ec726f6ff0618905ac977a46b4d75f34e7079454.tar.gz
talos-hcode-ec726f6ff0618905ac977a46b4d75f34e7079454.zip
WOF: WOF Phase 2 Vindex Rounding Fix
Key_Cronus_Test=PM_REGRESS Change-Id: I3fd6a2e12261b7c42f23c2dea84ae00bb6062802 CQ: SW419291 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54942 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: Gregory S. Still <stillgs@us.ibm.com> Reviewed-by: Michael S. Floyd <mfloyd@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
-rw-r--r--import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_pstate.c22
1 files changed, 10 insertions, 12 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 4930980e..540d29ce 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
@@ -114,7 +114,7 @@ void p9_pgpe_pstate_init()
{
if (ccsr.value & CORE_MASK(c))
{
- G_pgpe_pstate_record.numConfCores += 1;
+ G_pgpe_pstate_record.numSortCores += 1;
}
}
}
@@ -134,7 +134,7 @@ void p9_pgpe_pstate_init()
if (pad.fields.good_cores_in_sort)
{
- G_pgpe_pstate_record.numConfCores = pad.fields.good_cores_in_sort;
+ G_pgpe_pstate_record.numSortCores = pad.fields.good_cores_in_sort;
}
//Init OCC Shared SRAM
@@ -370,25 +370,23 @@ void p9_pgpe_pstate_calc_wof()
//Currently, PGPE only support VRATIO Fixed and VRATIO active cores only
if (G_pgpe_header_data->g_pgpe_qm_flags & PGPE_FLAG_ENABLE_VRATIO)
{
+ G_pgpe_pstate_record.vratio = (G_pgpe_pstate_record.numActiveCores * MAX_VRATIO) / (G_pgpe_pstate_record.numSortCores);
+
+
+ // Note we separate out numActiveCores = 0 case. Otherwise, subtracting 1 might
+ // result in invalid vindex
if (G_pgpe_pstate_record.numActiveCores != 0)
{
- G_pgpe_pstate_record.vratio = ((G_pgpe_pstate_record.numActiveCores << 16) - 1) / G_pgpe_pstate_record.numConfCores;
+ G_pgpe_pstate_record.vindex = (((24 * G_pgpe_pstate_record.vratio) + VRATIO_ROUNDING_ADJUST) / MAX_VRATIO) - 1;
}
else
{
- G_pgpe_pstate_record.vratio = 0;
- }
-
- G_pgpe_pstate_record.vindex = (G_pgpe_pstate_record.vratio + 0xAAC - 0xA8B) / 0xAAC;
-
- if (G_pgpe_pstate_record.vindex > VFRT_VRATIO_SIZE - 1)
- {
- G_pgpe_pstate_record.vindex = VFRT_VRATIO_SIZE - 1;
+ G_pgpe_pstate_record.vindex = 0;
}
}
else
{
- G_pgpe_pstate_record.vratio = 0xFFFF;
+ G_pgpe_pstate_record.vratio = MAX_VRATIO; //0xFFFF
G_pgpe_pstate_record.vindex = VFRT_VRATIO_SIZE - 1;
}
OpenPOWER on IntegriCloud