diff options
| author | Matt Derksen <mderkse1@us.ibm.com> | 2017-09-05 10:30:29 -0500 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-09-06 14:41:22 -0400 |
| commit | 696f17ae72ededfd5cf05341bc50e00ce8b08fa6 (patch) | |
| tree | 433d17814b1dd41c2a4c57243fa008a48c28d867 /src/usr/ipmi | |
| parent | 9e01538769fb0365fc07e1b9c3dcfa7a12ed953b (diff) | |
| download | talos-hostboot-696f17ae72ededfd5cf05341bc50e00ce8b08fa6.tar.gz talos-hostboot-696f17ae72ededfd5cf05341bc50e00ce8b08fa6.zip | |
Small cleanup for OCC/HTMGT GPU sensor support
Made const more generic instead of system specific
Change-Id: I6229c727428c0c077d335e5c1eb66e06651ea39d
RTC:178218
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45654
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/ipmi')
| -rw-r--r-- | src/usr/ipmi/ipmisensor.C | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/usr/ipmi/ipmisensor.C b/src/usr/ipmi/ipmisensor.C index 59cfcd41f..4ee831fa8 100644 --- a/src/usr/ipmi/ipmisensor.C +++ b/src/usr/ipmi/ipmisensor.C @@ -1283,9 +1283,8 @@ namespace SENSOR /** * @brief All sensors returned cfgID bit - * NV keyword = 0x02 --> 0b0100 -> 4 */ - static const uint16_t NVCFG_ALL_SENSORS_RETURNED = 4; + static const uint16_t NVCFG_ALL_SENSORS_RETURNED = 0xFFFF; /** * @brief Helper function to getGpuSensors() @@ -1411,9 +1410,10 @@ namespace SENSOR row_ptr[3], row_ptr[4], row_ptr[5], row_ptr[6]); // Include Sensor if the GPU is present in the current OBUS_CFG - if ((L_obus_cfgID_bit & - row_ptr[TARGETING::GPU_SENSOR_ARRAY_OBUS_CFG_OFFSET]) - == L_obus_cfgID_bit ) + if ( (L_obus_cfgID_bit == NVCFG_ALL_SENSORS_RETURNED) || + ((L_obus_cfgID_bit & + row_ptr[TARGETING::GPU_SENSOR_ARRAY_OBUS_CFG_OFFSET]) + == L_obus_cfgID_bit) ) { switch(i_type) { @@ -1549,9 +1549,10 @@ namespace SENSOR StatusSensor::statusEnum newStatus = i_gpu_status[index]; // Include Sensor if the GPU is present in the current OBUS_CFG - if ((obus_cfgID_bit & + if ( (obus_cfgID_bit == NVCFG_ALL_SENSORS_RETURNED) || + ((obus_cfgID_bit & sensor_row_ptr[TARGETING::GPU_SENSOR_ARRAY_OBUS_CFG_OFFSET]) - == obus_cfgID_bit ) + == obus_cfgID_bit) ) { // Only update the GPU status sensors, skip temperature ones // GPU core Status/Functional Sensor |

