NACK Re: [SRU][Zesty][PATCH 1/3] powerpc/64s: Fix system reset vs general interrupt reentrancy

Mauricio Faria de Oliveira mauricfo at linux.vnet.ibm.com
Mon Oct 9 16:25:47 UTC 2017


On 10/09/2017 12:11 PM, Mauricio Faria de Oliveira wrote:
>> --- a/arch/powerpc/kernel/exceptions-64s.S
>> +++ b/arch/powerpc/kernel/exceptions-64s.S
>> @@ -122,7 +122,7 @@ EXC_REAL_BEGIN(system_reset, 0x100, 0x200)
>>   	SET_SCRATCH0(r13)
>>   	GET_PACA(r13)
>>   	clrrdi	r13,r13,1 /* Last bit of HSPRG0 is set if waking from winkle */
>> -	EXCEPTION_PROLOG_PSERIES_PACA(PACA_EXGEN, system_reset_common, EXC_STD,
>> +	EXCEPTION_PROLOG_PSERIES(PACA_EXNMI, system_reset_common, EXC_STD,
...
> It doesn't hurt to have it that way, it just gets PACA into r13 two times,

Oops, actually I think it _does_ hurt.

Note 'clrrdi' clears a bit in r13 (which has PACA due to GET_PACA(r13)).
And that cleared bit is lost when the non-_PACA macro variant is called,
since it calls GET_PACA(r13) again, overwriting r13.

Then things might go wrong afterward.

No problems were observed when testing the kernel build as winkle
is powersaving related, which was not exercised.

Thanks,

-- 
Mauricio Faria de Oliveira
IBM Linux Technology Center





More information about the kernel-team mailing list