Remove Legacy code from P10 and future code
Remove Occ control code that supports older hardware models P8 and P9.
This is in preparation for occ control taking over occ poll handling.
Change-Id: Iff99ac8ff3a3fe6e9a6af994b20b06793ead50fc
Signed-off-by: Sheldon Bailey <baileysh@us.ibm.com>
diff --git a/occ_device.hpp b/occ_device.hpp
index d44409b..3e9761f 100644
--- a/occ_device.hpp
+++ b/occ_device.hpp
@@ -47,9 +47,9 @@
*/
Device(EventPtr& event, const fs::path& path, Manager& manager,
Status& status,
-#ifdef POWER10
+
std::unique_ptr<powermode::PowerMode>& powerModeRef,
-#endif
+
unsigned int instance = 0) :
devPath(path), instance(instance), statusObject(status),
managerObject(manager),
@@ -60,13 +60,8 @@
path /
fs::path("../../sbefifo" + std::to_string(instance + 1)) /
"timeout",
-#ifdef PLDM
std::bind(std::mem_fn(&Device::timeoutCallback), this,
- std::placeholders::_1)
-#else
- nullptr
-#endif
- ),
+ std::placeholders::_1)),
ffdc(event, path / "ffdc", instance),
presence(event, path / "occs_present", manager,
std::bind(std::mem_fn(&Device::errorCallback), this,
@@ -81,11 +76,8 @@
std::placeholders::_1)),
throttleMemTemp(event, path / "occ_mem_throttle",
std::bind(std::mem_fn(&Device::throttleMemTempCallback),
- this, std::placeholders::_1))
-#ifdef POWER10
- ,
+ this, std::placeholders::_1)),
pmode(powerModeRef)
-#endif
{
// Nothing to do here
}
@@ -105,27 +97,12 @@
*/
inline void addErrorWatch(bool poll = true)
{
-#ifdef POWER10
throttleProcTemp.addWatch(poll);
-#else
- try
- {
- throttleProcTemp.addWatch(poll);
- }
- catch (const OpenFailure& e)
- {
- // try the old kernel version
- throttleProcTemp.setFile(devPath / "occ_dvfs_ot");
- throttleProcTemp.addWatch(poll);
- }
-#endif
-#ifdef POWER10
if (master())
{
pmode->addIpsWatch(poll);
}
-#endif
throttleProcPower.addWatch(poll);
throttleMemTemp.addWatch(poll);
@@ -162,12 +139,11 @@
throttleMemTemp.removeWatch();
throttleProcPower.removeWatch();
throttleProcTemp.removeWatch();
-#ifdef POWER10
+
if (master())
{
pmode->removeIpsWatch();
}
-#endif
}
/** @brief Starts to watch how many OCCs are present on the master */
@@ -222,10 +198,8 @@
Error throttleProcPower;
Error throttleMemTemp;
-#ifdef POWER10
/** @brief OCC PowerMode object */
std::unique_ptr<powermode::PowerMode>& pmode;
-#endif
/** @brief file reader to read a binary string ("1" or "0")
*
@@ -262,13 +236,11 @@
*/
void presenceCallback(int occsPresent);
-#ifdef PLDM
/** @brief callback for SBE timeout monitoring
*
* @param[in] error - True if an error is reported, false otherwise
*/
void timeoutCallback(int error);
-#endif
/** @brief callback for the proc temp throttle event
*