[Skiboot] [PATCH v3 1/3] core/timer: Actually use default heartbeat value

Michael Neuling mikey at neuling.org
Fri Jul 22 10:47:12 AEST 2016


On Thu, 2016-07-21 at 17:09 +1000, Chris Smart wrote:
> 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>

Acked-by: Michael Neuling <mikey at neuling.org>

> ---
> 
> Changes since v2:
>  - reword commit subject line
> 
>  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


More information about the Skiboot mailing list