summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch')
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch45
1 files changed, 20 insertions, 25 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch
index 07ac95c89..48bc4a086 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch
@@ -1,4 +1,4 @@
-From 5760937ef1ae9a4610b47ba64fdebe594fc2c9df Mon Sep 17 00:00:00 2001
+From a7d1d3770a650df8fe61d594885fcb388ac2ca42 Mon Sep 17 00:00:00 2001
From: James Feist <james.feist@linux.intel.com>
Date: Mon, 17 Jun 2019 12:00:58 -0700
Subject: [PATCH] Customize phosphor-watchdog for Intel platforms
@@ -22,30 +22,26 @@ Signed-off-by: Sunita Kumari <sunitax.kumari@intel.com>
%% original patch: 0001-Customize-phosphor-watchdog-for-Intel-platforms.patch
---
- src/watchdog.cpp | 230 ++++++++++++++++++++++++++++++++++++++++++++---
- src/watchdog.hpp | 23 ++++-
- 2 files changed, 242 insertions(+), 11 deletions(-)
+ src/watchdog.cpp | 229 ++++++++++++++++++++++++++++++++++++++++++++---
+ src/watchdog.hpp | 22 ++++-
+ 2 files changed, 240 insertions(+), 11 deletions(-)
diff --git a/src/watchdog.cpp b/src/watchdog.cpp
-index 57e905059153..1204db4cab0f 100644
+index 7de98ae3e70f..f96faebc7368 100644
--- a/src/watchdog.cpp
+++ b/src/watchdog.cpp
-@@ -1,11 +1,14 @@
- #include "watchdog.hpp"
-
-+#include <systemd/sd-journal.h>
-+
- #include <algorithm>
- #include <chrono>
+@@ -5,8 +5,10 @@
#include <phosphor-logging/elog.hpp>
#include <phosphor-logging/log.hpp>
#include <sdbusplus/exception.hpp>
++#include <systemd/sd-journal.h>
+ #include <string_view>
#include <xyz/openbmc_project/Common/error.hpp>
+#include <xyz/openbmc_project/State/Host/server.hpp>
namespace phosphor
{
-@@ -18,10 +21,86 @@ using namespace phosphor::logging;
+@@ -19,10 +21,86 @@ using namespace phosphor::logging;
using sdbusplus::exception::SdBusError;
using sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
@@ -136,7 +132,7 @@ index 57e905059153..1204db4cab0f 100644
void Watchdog::resetTimeRemaining(bool enableWatchdog)
{
-@@ -107,13 +186,111 @@ uint64_t Watchdog::interval(uint64_t value)
+@@ -108,13 +186,111 @@ uint64_t Watchdog::interval(uint64_t value)
// Optional callback function on timer expiration
void Watchdog::timeOutHandler()
{
@@ -249,7 +245,7 @@ index 57e905059153..1204db4cab0f 100644
auto target = actionTargetMap.find(action);
if (target == actionTargetMap.end())
-@@ -133,12 +310,45 @@ void Watchdog::timeOutHandler()
+@@ -147,12 +323,45 @@ void Watchdog::timeOutHandler()
try
{
@@ -301,16 +297,15 @@ index 57e905059153..1204db4cab0f 100644
catch (const SdBusError& e)
{
diff --git a/src/watchdog.hpp b/src/watchdog.hpp
-index 7de9bb38419c..b004b7ab4e3f 100644
+index 736e71f68fcc..79158f192f40 100644
--- a/src/watchdog.hpp
+++ b/src/watchdog.hpp
-@@ -68,7 +68,18 @@ class Watchdog : public WatchdogInherits
- WatchdogInherits(bus, objPath),
+@@ -73,7 +73,17 @@ class Watchdog : public WatchdogInherits
bus(bus), actionTargetMap(std::move(actionTargetMap)),
fallback(std::move(fallback)), minInterval(minInterval),
-- timer(event, std::bind(&Watchdog::timeOutHandler, this))
-+ timer(event, std::bind(&Watchdog::timeOutHandler, this)),
-+ powerStateChangedSignal(
+ timer(event, std::bind(&Watchdog::timeOutHandler, this)),
+- objPath(objPath)
++ objPath(objPath), powerStateChangedSignal(
+ bus,
+ sdbusplus::bus::match::rules::propertiesChanged(
+ "/xyz/openbmc_project/state/host0",
@@ -322,9 +317,9 @@ index 7de9bb38419c..b004b7ab4e3f 100644
+ powerStateChangedHandler(props);
+ })
{
- // We set the watchdog interval with the default value.
- interval(interval());
-@@ -77,6 +88,12 @@ class Watchdog : public WatchdogInherits
+ // Use default if passed in otherwise just use default that comes
+ // with object
+@@ -90,6 +100,12 @@ class Watchdog : public WatchdogInherits
tryFallbackOrDisable();
}
@@ -337,7 +332,7 @@ index 7de9bb38419c..b004b7ab4e3f 100644
/** @brief Resets the TimeRemaining to the configured Interval
* Optionally enables the watchdog.
*
-@@ -165,6 +182,10 @@ class Watchdog : public WatchdogInherits
+@@ -178,6 +194,10 @@ class Watchdog : public WatchdogInherits
/** @brief Contained timer object */
sdeventplus::utility::Timer<sdeventplus::ClockId::Monotonic> timer;