[Skiboot] [PATCH 4/4] ipmi: remove unused OS watchdog support

Nicholas Piggin npiggin at gmail.com
Sat May 13 22:12:26 AEST 2023


This code hasn't been enabled, remove it.

Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
 core/ipmi.c             | 11 -----------
 hw/ipmi/ipmi-watchdog.c | 25 -------------------------
 include/ipmi.h          |  3 ---
 3 files changed, 39 deletions(-)

diff --git a/core/ipmi.c b/core/ipmi.c
index 673aa0c9..2b1bb1ca 100644
--- a/core/ipmi.c
+++ b/core/ipmi.c
@@ -220,17 +220,6 @@ static void ipmi_get_message_flags_complete(struct ipmi_msg *msg)
 
 	prlog(PR_DEBUG, "IPMI Get Message Flags: %02x\n", flags);
 
-	/* Once we see an interrupt we assume the payload has
-	 * booted. We disable the wdt and let the OS setup its own
-	 * wdt.
-	 *
-	 * This is also where we consider the OS to be booted, so we set
-	 * the boot count sensor */
-	if (flags & IPMI_MESSAGE_FLAGS_WATCHDOG_PRE_TIMEOUT) {
-		ipmi_wdt_stop();
-		ipmi_set_boot_count();
-	}
-
 	/* Message available in the event buffer? Queue a Read Event command
 	 * to retrieve it. The flag is cleared by performing a read */
 	if (flags & IPMI_MESSAGE_FLAGS_EVENT_BUFFER) {
diff --git a/hw/ipmi/ipmi-watchdog.c b/hw/ipmi/ipmi-watchdog.c
index 38fbff8c..40882e16 100644
--- a/hw/ipmi/ipmi-watchdog.c
+++ b/hw/ipmi/ipmi-watchdog.c
@@ -43,7 +43,6 @@ more frequently than necessary. */
 #define WDT_MARGIN		300
 
 static struct timer wdt_timer;
-static bool wdt_stopped;
 static bool wdt_ticking;
 
 /* Saved values from the last watchdog set action */
@@ -161,23 +160,6 @@ static void reset_wdt(struct timer *t __unused, void *data,
 	}
 }
 
-void ipmi_wdt_stop(void)
-{
-	if (!wdt_stopped) {
-		/* Make sure the background reset timer is disabled before
-		 * stopping the watchdog. If we issue a reset after disabling
-		 * the timer, it will be re-enabled. */
-		wdt_ticking = false;
-		cancel_timer(&wdt_timer);
-
-		/* Configure the watchdog to be disabled and do no action
-		 * in case the underlying implementation is buggy and times
-		 * out anyway. */
-		wdt_stopped = true;
-		set_wdt(WDT_NO_ACTION, 100, 0, false, false);
-	}
-}
-
 void ipmi_wdt_final_reset(void)
 {
 	/* We can safely stop the timer prior to setting up our final
@@ -192,14 +174,7 @@ void ipmi_wdt_final_reset(void)
 	 * can catch up in their development environments.
 	 * If you still read this after 2018, send a patch!
 	 */
-#if 0
-	/* Configure the watchdog and make sure it is still enabled */
-	set_wdt(WDT_RESET_ACTION | WDT_PRETIMEOUT_SMI, WDT_TIMEOUT,
-		WDT_MARGIN/10, true, true);
-	sync_reset_wdt();
-#else
 	set_wdt(WDT_NO_ACTION, 100, 0, false, false);
-#endif
 }
 
 void ipmi_wdt_init(void)
diff --git a/include/ipmi.h b/include/ipmi.h
index 5b7efd1e..d751e7a1 100644
--- a/include/ipmi.h
+++ b/include/ipmi.h
@@ -269,9 +269,6 @@ void ipmi_parse_sel(struct ipmi_msg *msg);
 /* Starts the watchdog timer */
 void ipmi_wdt_init(void);
 
-/* Stop the wdt */
-void ipmi_wdt_stop(void);
-
 /* Reset the watchdog timer. Does not return until the timer has been
  * reset and does not schedule future resets. */
 void ipmi_wdt_final_reset(void);
-- 
2.40.1



More information about the Skiboot mailing list