[Skiboot] [PATCH v2 1/3] core/timer: use default heartbeat value as the default

Chris Smart chris at distroguy.com
Thu Jul 21 15:57:37 AEST 2016


HEARTBEAT_DEFAULT_MS sets the default heartbeat timeout, however this
was not actually used as the default. The default was ten times quicker
than this (HEARTBEAT_DEFAULT_MS / 10) while HEARTBEAT_DEFAULT_MS was
actually used as a special case for FSP machines or those with SLW
timer facility.

This patch makes the default use HEARTBEAT_DEFAULT_MS and changes FSP
or machines with SLW timer facility run 10 times slower
(HEARTBEAT_DEFAULT_MS * 10). This will also now match the existing
in-line comment.

Signed-off-by: Chris Smart <chris at distroguy.com>
---

Changes since v1:
 - add signed-off-by

 core/timer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/core/timer.c b/core/timer.c
index e97dc0723b04..8bfba4a6dc3b 100644
--- a/core/timer.c
+++ b/core/timer.c
@@ -13,7 +13,7 @@
 #endif
 
 /* Heartbeat requested from Linux */
-#define HEARTBEAT_DEFAULT_MS	2000
+#define HEARTBEAT_DEFAULT_MS	200
 
 static struct lock timer_lock = LOCK_UNLOCKED;
 static LIST_HEAD(timer_list);
@@ -257,10 +257,10 @@ void late_init_timers(void)
 	 */
 	if (slw_timer_ok() || fsp_present()) {
 		dt_add_property_cells(opal_node, "ibm,heartbeat-ms",
-				      HEARTBEAT_DEFAULT_MS);
+				      HEARTBEAT_DEFAULT_MS * 10);
 	} else {
 		dt_add_property_cells(opal_node, "ibm,heartbeat-ms",
-				      HEARTBEAT_DEFAULT_MS / 10);
+				      HEARTBEAT_DEFAULT_MS);
 	}
 }
 #endif
-- 
2.7.4



More information about the Skiboot mailing list