On Thu May 15, 2025 at 5:07 AM AEST, Mike Kowal wrote:
>
> On 5/11/2025 10:10 PM, Nicholas Piggin wrote:
>> Have xive_tctx_accept clear NSR in one shot rather than masking out bits
>> as they are tested, which makes it clear it's reset to 0, and does not
>> have a partial NSR value in the register.
>>
>> Signed-off-by: Nicholas Piggin <npig...@gmail.com>
>> ---
>>   hw/intc/xive.c | 6 ++----
>>   1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/hw/intc/xive.c b/hw/intc/xive.c
>> index 6293ea4361..bb40a69c5b 100644
>> --- a/hw/intc/xive.c
>> +++ b/hw/intc/xive.c
>> @@ -68,13 +68,11 @@ static uint64_t xive_tctx_accept(XiveTCTX *tctx, uint8_t 
>> ring)
>>            * If the interrupt was for a specific VP, reset the pending
>>            * buffer bit, otherwise clear the logical server indicator
>>            */
>> -        if (regs[TM_NSR] & TM_NSR_GRP_LVL) {
>> -            regs[TM_NSR] &= ~TM_NSR_GRP_LVL;
>> -        } else {
>> +        if (!(regs[TM_NSR] & TM_NSR_GRP_LVL)) {
>
>
> Any reason why you didn't just use the else?  Regardless I am fine 
> either way.

IIRC it was because the 'if' side goes away entirely, ends up
working better this way I think.


>
> Reviewed-by: Michael Kowal <ko...@linux.ibm.com>
>
> Thanks MAK

Thanks,
Nick

Reply via email to