[Skiboot] [PATCH 6/7] hmi: Only raise a catchall HMI if no other components have

Alistair Popple alistair at popple.id.au
Thu Mar 17 16:30:20 AEDT 2016


Looks reasonable to me, but probably worth getting Mahesh (CC'ing) to comment 
as well because he should be more familiar with this code and the related 
kernel code.

Reviewed-By: Alistair Popple <alistair at popple.id.au>

On Tue, 15 Mar 2016 18:33:56 Russell Currey wrote:
> Regardless of whether a handler for a specific component has raised an
> event to deal with a HMI or not, skiboot will raise an extra HMI at the
> end of the detection.  This is problematic, as if one component reports
> it is recoverable but another reports it is not, the last handler to be
> called will have priority.
> 
> Rework this to instead only send a HMI event if no handler has raised an
> event themselves.  This will send an unknown, unrecoverable HMI event
> since the cause could not be found.
> 
> Signed-off-by: Russell Currey <ruscur at russell.cc>
> ---
>  core/hmi.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/core/hmi.c b/core/hmi.c
> index 09bf610..faf99ca 100644
> --- a/core/hmi.c
> +++ b/core/hmi.c
> @@ -433,7 +433,7 @@ static void find_nx_checkstop_reason(int flat_chip_id,
>  	*event_generated = 1;
>  }
>  
> -static int decode_malfunction(struct OpalHMIEvent *hmi_evt)
> +static void decode_malfunction(struct OpalHMIEvent *hmi_evt)
>  {
>  	int i;
>  	int recover = -1;
> @@ -465,10 +465,9 @@ static int decode_malfunction(struct OpalHMIEvent 
*hmi_evt)
>  			hmi_evt->u.xstop_error.xstop_type =
>  						CHECKSTOP_TYPE_UNKNOWN;
>  			hmi_evt->u.xstop_error.xstop_reason = 0;
> +			queue_hmi_event(hmi_evt, recover);
>  		}
>  	}
> -
> -	return recover;
>  }
>  
>  static void wait_for_subcore_threads(void)
> @@ -697,8 +696,7 @@ int handle_hmi_exception(uint64_t hmer, struct 
OpalHMIEvent *hmi_evt)
>  		recover = 0;
>  
>  		if (hmi_evt) {
> -			recover = decode_malfunction(hmi_evt);
> -			queue_hmi_event(hmi_evt, recover);
> +			decode_malfunction(hmi_evt);
>  		}
>  	}
>  
> 



More information about the Skiboot mailing list