summaryrefslogtreecommitdiffstats
path: root/src/usr/isteps/istep06
diff options
context:
space:
mode:
authorMarty Gloff <mgloff@us.ibm.com>2017-06-02 16:16:53 -0500
committerMatthew A. Ploetz <maploetz@us.ibm.com>2017-06-15 12:11:41 -0400
commit6a85babe455aeb0cc37ffdaddc8764cf33ff825c (patch)
tree2e217c6f22ec6e3d06e4ad2feec573878e83a7e2 /src/usr/isteps/istep06
parent727f9b3c6f3f4624037eb72a1850b7917af40858 (diff)
downloadtalos-hostboot-6a85babe455aeb0cc37ffdaddc8764cf33ff825c.tar.gz
talos-hostboot-6a85babe455aeb0cc37ffdaddc8764cf33ff825c.zip
Data Type of ATTR_DPO_MIN_FREQ_PERCENT should be int32_t
ATTR_DPO_MIN_FREQ_PERCENT is always a negative value, so it should be int32_t type, instead of uint32_t. Make corresponding changes to DPO frequency calculation. Change-Id: I97d608d71a39b010b60b94bb740ba9fa9df7f17b CQ: SW390623 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41337 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com> Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com>
Diffstat (limited to 'src/usr/isteps/istep06')
-rw-r--r--src/usr/isteps/istep06/call_host_voltage_config.C10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/usr/isteps/istep06/call_host_voltage_config.C b/src/usr/isteps/istep06/call_host_voltage_config.C
index 0a3149a16..a939eee85 100644
--- a/src/usr/isteps/istep06/call_host_voltage_config.C
+++ b/src/usr/isteps/istep06/call_host_voltage_config.C
@@ -415,13 +415,15 @@ void* call_host_voltage_config( void *io_pArgs )
l_sys->setAttr<ATTR_NOMINAL_FREQ_MHZ>( l_nominalFreq );
// raise the min freq if there is a system policy for it
- uint32_t l_dpoPercent = l_sys->getAttr<ATTR_DPO_MIN_FREQ_PERCENT>();
+ int32_t l_dpoPercent = l_sys->getAttr<ATTR_DPO_MIN_FREQ_PERCENT>();
uint32_t l_dpoFreq = l_nominalFreq;
- if( (l_dpoPercent != 0) && (l_dpoPercent < 100) )
+ if( (l_dpoPercent != 0) && (l_dpoPercent > -100) )
{
- l_dpoFreq = (l_nominalFreq*l_dpoPercent)/100;
+ uint32_t l_multiplierPercent =
+ static_cast<uint32_t>(100 + l_dpoPercent);
+ l_dpoFreq = (l_nominalFreq*l_multiplierPercent)/100;
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "Computed floor=%d, DPO=%d (percent=-%d)",
+ "Computed floor=%d, DPO=%d (percent=%d)",
l_floorFreq, l_dpoFreq, l_dpoPercent );
l_floorFreq = std::max( l_floorFreq, l_dpoFreq );
}
OpenPOWER on IntegriCloud