[Skiboot] [PATCH] core/direct-controls: Add sreset support for P8

Nicholas Piggin npiggin at gmail.com
Tue Feb 19 15:32:08 AEDT 2019


Maxim Polyakov's on February 8, 2019 10:10 pm:
> VESNIN server uses NMI SRESET signal to initiate memory dumping with
> kdump in case of crash of the host OS. It is not necessary to return
> control to the host's kernel since it has already crashed. This
> commit allows for registration and handling of
> opal_signal_system_reset signal for POWER8 based systems.
> 
> Signed-off-by: Maxim Polyakov <m.polyakov at yadro.com>

Sorry just thinking about this a bit more, Linux will use this
for a watchdog NMI IPI or xmon break if the token exists now,
which can be annoying or unexpected.

I can't think of the best way to proceed. Possibly a new call token, or 
a new value like NMI_IPI_ALL_OTHERS_CRASH? Any other ideas?

Thanks,
Nick

> ---
>  core/direct-controls.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/core/direct-controls.c b/core/direct-controls.c
> index 04b93a1..b05e6bc 100644
> --- a/core/direct-controls.c
> +++ b/core/direct-controls.c
> @@ -824,7 +824,7 @@ int64_t opal_signal_system_reset(int cpu_nr)
>  	struct cpu_thread *cpu;
>  	int64_t ret;
>  
> -	if (proc_gen != proc_gen_p9)
> +	if (proc_gen != proc_gen_p9 && proc_gen != proc_gen_p8)
>  		return OPAL_UNSUPPORTED;
>  
>  	/*
> @@ -856,13 +856,15 @@ void direct_controls_init(void)
>  	if (chip_quirk(QUIRK_MAMBO_CALLOUTS))
>  		return;
>  
> -	if (proc_gen != proc_gen_p9)
> +	if (proc_gen != proc_gen_p9 && proc_gen != proc_gen_p8)
>  		return;
>  
>  	/* DD1 has some sreset quirks we do not support */
> -	version = mfspr(SPR_PVR);
> -	if (is_power9n(version) && PVR_VERS_MAJ(version) == 1)
> -		return;
> +	if (proc_gen == proc_gen_p9) {
> +		version = mfspr(SPR_PVR);
> +		if (is_power9n(version) && PVR_VERS_MAJ(version) == 1)
> +			return;
> +	}
>  
>  	opal_register(OPAL_SIGNAL_SYSTEM_RESET, opal_signal_system_reset, 1);
>  }
> -- 
> 2.7.4
> 


More information about the Skiboot mailing list