diff options
| author | Christopher M. Riedl <cmriedl@us.ibm.com> | 2017-07-12 17:07:24 -0500 |
|---|---|---|
| committer | Joshua Hunsberger <jahunsbe@us.ibm.com> | 2017-10-23 18:24:49 -0500 |
| commit | 1ba6791a6b2c2f5a322b328e68a4962f4ff6a28c (patch) | |
| tree | 357aa9ac6acb141024f8b31a0f4a6db699425bed | |
| parent | 1f06b76afd78e0ca942c0c1335e9e94256962d16 (diff) | |
| download | talos-hcode-1ba6791a6b2c2f5a322b328e68a4962f4ff6a28c.tar.gz talos-hcode-1ba6791a6b2c2f5a322b328e68a4962f4ff6a28c.zip | |
PM: VDM Functional Fix
- Fix loop-termination condition when setting the VDM threshold indices
- Make local variable static to remove a memset() call and save some
space
Change-Id: If53ef69fcab06f8985b5ca1e86be88eef69d6d36
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43066
Reviewed-by: Michael S. Floyd <mfloyd@us.ibm.com>
Reviewed-by: BRIAN D. VICTOR <brian.d.victor1@ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
| -rw-r--r-- | import/chips/p9/procedures/ppe_closed/cme/pstate_cme/p9_cme_pstate.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/import/chips/p9/procedures/ppe_closed/cme/pstate_cme/p9_cme_pstate.c b/import/chips/p9/procedures/ppe_closed/cme/pstate_cme/p9_cme_pstate.c index f4922873..61ac19c7 100644 --- a/import/chips/p9/procedures/ppe_closed/cme/pstate_cme/p9_cme_pstate.c +++ b/import/chips/p9/procedures/ppe_closed/cme/pstate_cme/p9_cme_pstate.c @@ -340,7 +340,6 @@ void calc_vdm_threshold_indices(uint32_t pstate, uint32_t region, + (((int32_t)G_lppb->PsVDMThreshSlopes[region][i] * psdiff // Apply the rounding adjust + (int32_t)vdm_rounding_adjust[i]) >> THRESH_SLOPE_FP_SHIFT)); - } // Check the interpolation result; since each threshold has a distinct round @@ -362,8 +361,10 @@ void calc_vdm_threshold_indices(uint32_t pstate, uint32_t region, void p9_cme_vdm_update(uint32_t pstate) { - uint32_t new_idx[NUM_THRESHOLD_POINTS] = { 0 }; + // Static forces this array into .sbss instead of calling memset() + static uint32_t new_idx[NUM_THRESHOLD_POINTS] = { 0 }; uint32_t i = 0; + // Set one bit per threshold starting at bit 31 (28,29,30,31) uint32_t not_done = BITS32(32 - NUM_THRESHOLD_POINTS, NUM_THRESHOLD_POINTS); uint64_t scom_data = 0; uint64_t base_scom_data = 0; @@ -396,7 +397,9 @@ void p9_cme_vdm_update(uint32_t pstate) } else { - not_done &= 0x1 << i; + // Clear the unique bit for each threshold as each threshold is stepped + // to its new index + not_done &= ~(0x1 << i); } // OR the new threshold greycode into the correct position |

