diff options
author | Fadi Kassem <fmkassem@us.ibm.com> | 2015-05-05 16:47:01 -0500 |
---|---|---|
committer | Guillermo J. Silva <guilsilv@us.ibm.com> | 2015-05-06 11:38:59 -0500 |
commit | 1d036a6fcfc3cde742d58555c079fb9726f5ebd9 (patch) | |
tree | 462a9ae6bede4a4febef8e2c913883a468995574 | |
parent | 19678d6a7dd078e3206bac6f1d5e3cf03008542b (diff) | |
download | talos-occ-1d036a6fcfc3cde742d58555c079fb9726f5ebd9.tar.gz talos-occ-1d036a6fcfc3cde742d58555c079fb9726f5ebd9.zip |
Fixed call home issue reporting socket power.
Change-Id: I039e6d98bfb1add9c1f8bd6e5a54bcce80d8e169
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/17601
Reviewed-by: Guillermo J. Silva <guilsilv@us.ibm.com>
Tested-by: Guillermo J. Silva <guilsilv@us.ibm.com>
-rwxr-xr-x | src/occ/thread/chom.c | 34 | ||||
-rwxr-xr-x | src/occ/thread/chom.h | 20 |
2 files changed, 34 insertions, 20 deletions
diff --git a/src/occ/thread/chom.c b/src/occ/thread/chom.c index 8141569..9c8f85e 100755 --- a/src/occ/thread/chom.c +++ b/src/occ/thread/chom.c @@ -5,10 +5,10 @@ /* */ /* OpenPOWER OnChipController Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2014 */ -/* [+] Google Inc. */ +/* Contributors Listed Below - COPYRIGHT 2011,2015 */ /* [+] International Business Machines Corp. */ /* */ +/* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ /* You may obtain a copy of the License at */ @@ -63,13 +63,13 @@ const uint16_t * g_chom_sensor_table[CHOM_NUM_OF_SENSORS] = &g_amec_sys.sys.pwr250us.sample, // Socket power &g_amec_sys.proc[0].pwr250us.sample, + &G_dcom_slv_outbox_rx[1].pwr250usp0, &G_dcom_slv_outbox_rx[2].pwr250usp0, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, + &G_dcom_slv_outbox_rx[3].pwr250usp0, + &G_dcom_slv_outbox_rx[4].pwr250usp0, + &G_dcom_slv_outbox_rx[5].pwr250usp0, + &G_dcom_slv_outbox_rx[6].pwr250usp0, + &G_dcom_slv_outbox_rx[7].pwr250usp0, // Memory power &G_dcom_slv_outbox_rx[0].pwr250usmemp0, &G_dcom_slv_outbox_rx[1].pwr250usmemp0, @@ -290,8 +290,22 @@ void chom_update_sensors() for (i = 0 ; i<CHOM_NUM_OF_SENSORS ; i++) { // update sample, min, max, average sensor data if (NULL != g_chom_sensor_table[i]) - { // directly mapping to mini-sensor - g_chom->sensorData[0].sensor[i].sample = *g_chom_sensor_table[i]; + { + //Report all sensors listed in g_chom_sensor_table, unless + //we have a Murano (DCM), then we only report the power from the + //OCC_DCM_MASTER occ. The DCM occ pairs (OCC_DCM_MASTER,OCC_DCM_SLAVE) are + //((0,1),(2,3),(4,5),(6,7)). + if( ((i >= CHOMPWRS0) && (i <= CHOMPWRS7)) && + (CFAM_CHIP_TYPE_MURANO == cfam_chip_type()) && + (((i-CHOMPWRS0) % 2) == 1) ) + { + //Do nothing + } + else + { + // directly mapping to mini-sensor + g_chom->sensorData[0].sensor[i].sample = *g_chom_sensor_table[i]; + } } l_sample = g_chom->sensorData[0].sensor[i].sample; diff --git a/src/occ/thread/chom.h b/src/occ/thread/chom.h index a324209..b899e9e 100755 --- a/src/occ/thread/chom.h +++ b/src/occ/thread/chom.h @@ -5,10 +5,10 @@ /* */ /* OpenPOWER OnChipController Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2014 */ -/* [+] Google Inc. */ +/* Contributors Listed Below - COPYRIGHT 2011,2015 */ /* [+] International Business Machines Corp. */ /* */ +/* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ /* You may obtain a copy of the License at */ @@ -40,14 +40,14 @@ enum // Node total power (DC) CHOMPWR = 0, // Socket power - CHOMPWRP0, - CHOMPWRP1, - CHOMPWRP2, - CHOMPWRP3, - CHOMPWRP4, - CHOMPWRP5, - CHOMPWRP6, - CHOMPWRP7, + CHOMPWRS0, + CHOMPWRS1, + CHOMPWRS2, + CHOMPWRS3, + CHOMPWRS4, + CHOMPWRS5, + CHOMPWRS6, + CHOMPWRS7, // Memory power CHOMPWRM0, CHOMPWRM1, |