Skip to content

Commit

Permalink
Small cleanup for OCC/HTMGT GPU sensor support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mderkse1 authored and dcrowell77 committed Sep 6, 2017
1 parent 9e01538 commit 696f17a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/usr/ipmi/ipmisensor.C
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 696f17a

Please sign in to comment.