[PATCH 3/4] powerpc/xive: shutdown XIVE when kexec or kdump is performed

Cédric Le Goater clg at kaod.org
Fri May 4 21:42:33 AEST 2018


On 05/04/2018 12:42 PM, Michael Ellerman wrote:
> Cédric Le Goater <clg at kaod.org> writes:
> 
>> The hcall H_INT_RESET should be called to make sure XIVE is fully
>> reseted.
>>
>> Signed-off-by: Cédric Le Goater <clg at kaod.org>
>> ---
>>  arch/powerpc/platforms/pseries/kexec.c | 7 +++++--
>>  1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/powerpc/platforms/pseries/kexec.c b/arch/powerpc/platforms/pseries/kexec.c
>> index eeb13429d685..1d9bbf8e7357 100644
>> --- a/arch/powerpc/platforms/pseries/kexec.c
>> +++ b/arch/powerpc/platforms/pseries/kexec.c
>> @@ -52,8 +52,11 @@ void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
>>  		}
>>  	}
>>  
>> -	if (xive_enabled())
>> +	if (xive_enabled()) {
>>  		xive_kexec_teardown_cpu(secondary);
>> -	else
>> +
>> +		if (!secondary)
>> +			xive_shutdown();
> 
> Couldn't that logic go in xive_kexec_teardown_cpu()?

On powernv, we wait for the secondaries to reach OPAL before doing a 
XIVE shutdown. This is another kexec barrier but it is after the 
KEXEC_STATE_REAL_MODE barrier if I am correct.

So I don't think we can move the code in the  xive_kexec_teardown_cpu()

> Why do we not want to do it on powernv?
>> Actually we *do* do it on powernv, but elsewhere.

yes in a different file.

Thanks,

C.

> cheers
> 
>> +	} else
>>  		xics_kexec_teardown_cpu(secondary);
>>  }
>> -- 
>> 2.13.6



More information about the Linuxppc-dev mailing list