[Skiboot] [PATCH v2 11/17] xive/p9: fix silent escalation EQ setup

Cédric Le Goater clg at kaod.org
Tue Sep 24 16:22:45 AEST 2019


On 24/09/2019 08:08, Oliver O'Halloran wrote:
> On Thu, 2019-09-12 at 19:22 +0200, Cédric Le Goater wrote:
>> When setting the silent/gather escalation for a VP, all EQs [0-6]
>> should point to the silent EQ 7. Fix the loop in routine
>> xive_setup_silent_gather() to include EQ 6 which was missing.
>>
>> Signed-off-by: Cédric Le Goater <clg at kaod.org>
>> ---
>>  hw/xive.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/xive.c b/hw/xive.c
>> index cb72d5ad7348..e96c53de1e05 100644
>> --- a/hw/xive.c
>> +++ b/hw/xive.c
>> @@ -4111,7 +4111,7 @@ static int64_t xive_setup_silent_gather(uint64_t vp_id, bool enable)
>>  	/* Mark/unmark all other prios with the new "u" bit and update
>>  	 * escalation
>>  	 */
>> -	for (i = 0; i < 6; i++) {
>> +	for (i = 0; i < 7; i++) {
>>  		eq_orig = xive_get_eq(x, idx + i);
>>  		if (!eq_orig)
>>  			continue;
> 
> Might be worth adding an EQ_SET_SIZE macro rather than using 7
> everywhere. Maybe it's more obvious in context than it looks.

It's the max number of priority minus the one used for escalation.
I agree both deserve a define in the code and the loop should 
try all prios and skip the escalation one.

I have been chasing the magic values in that code because most of 
them are dependent on one another and it's not obvious to see when 
using numerical figures.

I will improve that.

Thanks,

C.
 



More information about the Skiboot mailing list