[Skiboot] [PATCH] core/hmi.c: Don't attempt to decode malfunction alerts for unsupported chips

Mahesh Jagannath Salgaonkar mahesh at linux.vnet.ibm.com
Thu Jul 6 19:49:03 AEST 2017


On 07/06/2017 10:50 AM, Alistair Popple wrote:
> Currently decode_malfunction() attempts to decode HMI events by looking at xscom
> registers which are specific to P8. Obviously this doesn't work on P9 as many of
> these addresses and HW interfaces have changed which results in further HMI
> events due to invalid SCOM addresses accesses. Until decode_malfunction()
> understands how to decode P9 HMI events it is better to just bail with an
> unknown HMI event which will ultimately cause the OS to request a reboot.

The patches posted below already fixes this.

http://patchwork.ozlabs.org/patch/783293/
http://patchwork.ozlabs.org/patch/783294/

Thanks,
-Mahesh.

> 
> Signed-off-by: Alistair Popple <alistair at popple.id.au>
> ---
>  core/hmi.c | 30 +++++++++++++++++++-----------
>  1 file changed, 19 insertions(+), 11 deletions(-)
> 
> diff --git a/core/hmi.c b/core/hmi.c
> index 84f2c2d..4fb7d75 100644
> --- a/core/hmi.c
> +++ b/core/hmi.c
> @@ -528,22 +528,30 @@ static void decode_malfunction(struct OpalHMIEvent *hmi_evt)
>  	int i;
>  	uint64_t malf_alert;
>  	bool event_generated = false;
> +	struct proc_chip *chip = next_chip(NULL);
> 
> -	xscom_read(this_cpu()->chip_id, 0x2020011, &malf_alert);
> +	/* The below code does not appear to support anything other than P8 so
> +	 * we should avoid running it on other chips to avoid generating further
> +	 * events due to reading bad xscom addresses. */
> +	if (chip->type == PROC_CHIP_P8_MURANO || \
> +	    chip->type == PROC_CHIP_P8_VENICE || \
> +	    chip->type == PROC_CHIP_P8_NAPLES) {
> +		xscom_read(this_cpu()->chip_id, 0x2020011, &malf_alert);
> 
> -	if (!malf_alert)
> -		return;
> +		if (!malf_alert)
> +			return;
> 
> -	for (i = 0; i < 64; i++) {
> -		if (malf_alert & PPC_BIT(i)) {
> -			xscom_write(this_cpu()->chip_id, 0x02020011, ~PPC_BIT(i));
> -			find_capp_checkstop_reason(i, hmi_evt, &event_generated);
> -			find_nx_checkstop_reason(i, hmi_evt, &event_generated);
> -			find_npu_checkstop_reason(i, hmi_evt, &event_generated);
> +		for (i = 0; i < 64; i++) {
> +			if (malf_alert & PPC_BIT(i)) {
> +				xscom_write(this_cpu()->chip_id, 0x02020011, ~PPC_BIT(i));
> +				find_capp_checkstop_reason(i, hmi_evt, &event_generated);
> +				find_nx_checkstop_reason(i, hmi_evt, &event_generated);
> +				find_npu_checkstop_reason(i, hmi_evt, &event_generated);
> +			}
>  		}
> -	}
> 
> -	find_core_checkstop_reason(hmi_evt, &event_generated);
> +		find_core_checkstop_reason(hmi_evt, &event_generated);
> +	}
> 
>  	/*
>  	 * If we fail to find checkstop reason, send an unknown HMI event.
> 



More information about the Skiboot mailing list