diff options
author | Bilicon Patil <bilpatil@in.ibm.com> | 2014-12-08 03:07:13 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-02-27 23:22:19 -0600 |
commit | fca9a43c5dc3fa58105141949e5ef4108862b0f0 (patch) | |
tree | ba60d5f58be8edc9faf10ea19d608dfd3f8fb127 /src/usr/diag/prdf/test | |
parent | 6c9eac071a9a79921c4b360af53e023dad19666f (diff) | |
download | talos-hostboot-fca9a43c5dc3fa58105141949e5ef4108862b0f0.tar.gz talos-hostboot-fca9a43c5dc3fa58105141949e5ef4108862b0f0.zip |
PRD: Remove thresholds from prdfMfgThresholds.lst
This change is part of a broader change to move PRD Mfg thresholds
from being maintained in a file to being maintained as system attributes.
Here, we remove the file that maintains the thresholds and update
the perl script that processed the threshold file
Change-Id: I343f0e69b3f1d583a2c0b838b58db3e3935874ac
RTC: 118150
CMVC-Prereq: 945073
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/14774
Reviewed-by: Zane Shelley <zshelle@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15874
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/test')
-rwxr-xr-x | src/usr/diag/prdf/test/makefile | 1 | ||||
-rw-r--r-- | src/usr/diag/prdf/test/prdfsimFspMfgThresholdFile.C | 94 | ||||
-rwxr-xr-x | src/usr/diag/prdf/test/prdfsimFspMfgThresholdFile.H | 63 | ||||
-rwxr-xr-x | src/usr/diag/prdf/test/prdfsimFspSyncSvc.C | 1 | ||||
-rwxr-xr-x | src/usr/diag/prdf/test/prdfsimFspSyncSvc.H | 6 |
5 files changed, 4 insertions, 161 deletions
diff --git a/src/usr/diag/prdf/test/makefile b/src/usr/diag/prdf/test/makefile index 976a7a7c8..b9229e11d 100755 --- a/src/usr/diag/prdf/test/makefile +++ b/src/usr/diag/prdf/test/makefile @@ -40,7 +40,6 @@ PRD_USR_PATH = ${ROOTPATH}/src/usr/diag/prdf #------------------------------------------------------------------------------ OBJS += prdfsimMfgSync.o OBJS += prdfsimFspSyncSvc.o -OBJS += prdfsimFspMfgThresholdFile.o TESTS += prdfTest_MfgSync.H diff --git a/src/usr/diag/prdf/test/prdfsimFspMfgThresholdFile.C b/src/usr/diag/prdf/test/prdfsimFspMfgThresholdFile.C deleted file mode 100644 index 68d7ac673..000000000 --- a/src/usr/diag/prdf/test/prdfsimFspMfgThresholdFile.C +++ /dev/null @@ -1,94 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/test/prdfsimFspMfgThresholdFile.C $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2009,2014 */ -/* */ -/* 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 */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ -/* implied. See the License for the specific language governing */ -/* permissions and limitations under the License. */ -/* */ -/* IBM_PROLOG_END_TAG */ - -#include <prdfsimFspMfgThresholdFile.H> -#include <prdfMfgThresholdMgr.H> -#include <prdfGlobal.H> -#include <prdfErrlUtil.H> -#include <prdfTrace.H> - -namespace PRDF -{ - -void SimFspMfgThresholdFile::packThresholdDataIntoBuffer( - uint8_t* & o_buffer, - uint32_t i_sizeOfBuf) -{ - #define FUNC "[SimFspMfgThresholdFile::packThresholdDataIntoBuffer]" - PRDF_ENTER(FUNC" i_sizeOfBuf: %d", i_sizeOfBuf); - PRDF_TRAC("iv_thresholds.size: %d, sizeof(SyncThreshold_t): %d, total: %d", - iv_thresholds.size(), sizeof(SyncThreshold_t), - iv_thresholds.size() * sizeof(SyncThreshold_t)); - - assert(i_sizeOfBuf == - (iv_thresholds.size() * sizeof(SyncThreshold_t))); - - assert(NULL != o_buffer); - - SyncThreshold_t* l_ptr = reinterpret_cast<SyncThreshold_t*>(o_buffer); - - for(Threshold_t::iterator i = iv_thresholds.begin(); - i != iv_thresholds.end(); - ++i) - { - PRDF_TRAC("threshold: %d, count: %d", i->first, i->second); - l_ptr->hash = htonl(i->first); - l_ptr->value = i->second; - l_ptr++; - } - - PRDF_EXIT(FUNC); - - #undef FUNC -} - -void SimFspMfgThresholdFile::overrideThreshold() -{ - #define FUNC "[SimFspMfgThresholdFile::overrideThreshold]" - PRDF_ENTER(FUNC); - - // just hardcode the default override value for now - static const uint8_t MFG_THRES_OVERRIDE_VALUE = 10; - -#define PRDF_MFGTHRESHOLD_TABLE_BEGIN -#define PRDF_MFGTHRESHOLD_TABLE_END -#define PRDF_MFGTHRESHOLD_ENTRY(a,b,c) \ - iv_thresholds[b] = MFG_THRES_OVERRIDE_VALUE; -#include <prdfMfgThresholds.H> - - for(Threshold_t::iterator i = iv_thresholds.begin(); - i != iv_thresholds.end(); - ++i) - { - uint16_t value = MfgThresholdMgr::getInstance()-> - getThreshold(i->first); - PRDF_TRAC("hash: %d, value - override: %d, " - "default: %d", i->first, i->second, value); - } - - PRDF_EXIT(FUNC); - - #undef FUNC -} - -} // end namespace PRDF diff --git a/src/usr/diag/prdf/test/prdfsimFspMfgThresholdFile.H b/src/usr/diag/prdf/test/prdfsimFspMfgThresholdFile.H deleted file mode 100755 index bd9a9413c..000000000 --- a/src/usr/diag/prdf/test/prdfsimFspMfgThresholdFile.H +++ /dev/null @@ -1,63 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/test/prdfsimFspMfgThresholdFile.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2009,2014 */ -/* */ -/* 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 */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ -/* implied. See the License for the specific language governing */ -/* permissions and limitations under the License. */ -/* */ -/* IBM_PROLOG_END_TAG */ - -#ifndef __PRDF_SimFspMfgThresholdFile_H -#define __PRDF_SimFspMfgThresholdFile_H - -#include <prdfMfgThresholdFile.H> - -namespace PRDF -{ - -class SimFspMfgThresholdFile : public MfgThresholdFile -{ - public: - - /** - * @brief constructor - */ - SimFspMfgThresholdFile() {}; - - /** - * @brief destructor - */ - virtual ~SimFspMfgThresholdFile() {}; - - /** - * @brief serialize threshold data into data buffer - * @param[in/out] o_buffer - data buffer - * @param[in] i_sizeOfBuf - size of buffer - */ - void packThresholdDataIntoBuffer(uint8_t* & o_buffer, - uint32_t i_sizeOfBuf); - - void overrideThreshold(); - - private: - -}; - - -} // end namespace PRDF - -#endif diff --git a/src/usr/diag/prdf/test/prdfsimFspSyncSvc.C b/src/usr/diag/prdf/test/prdfsimFspSyncSvc.C index 06b4d9d18..6336858e8 100755 --- a/src/usr/diag/prdf/test/prdfsimFspSyncSvc.C +++ b/src/usr/diag/prdf/test/prdfsimFspSyncSvc.C @@ -25,7 +25,6 @@ #include <prdfsimFspSyncSvc.H> #include <prdfMfgThresholdMgr.H> -#include <prdfsimFspMfgThresholdFile.H> #include <prdfAssert.h> #include <prdfEnums.H> #include <prdfErrlUtil.H> diff --git a/src/usr/diag/prdf/test/prdfsimFspSyncSvc.H b/src/usr/diag/prdf/test/prdfsimFspSyncSvc.H index bdb51072d..f4508c0eb 100755 --- a/src/usr/diag/prdf/test/prdfsimFspSyncSvc.H +++ b/src/usr/diag/prdf/test/prdfsimFspSyncSvc.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2009,2014 */ +/* Contributors Listed Below - COPYRIGHT 2013,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. */ @@ -25,7 +27,7 @@ #define __PRDF_SimFspSyncSvc_H -#include <prdfMfgThresholdFile.H> +#include <prdfMfgThreshold.H> #include <prdfGlobal.H> #include <mbox/mbox_queues.H> |