On 26/07/2022 18:54, Luca Fancellu wrote:
Hi Julien,
Hi Luca,
/* Get the index in the rank */
- offset &= virq & INTERRUPT_RANK_MASK;
+ offset = virq & INTERRUPT_RANK_MASK;
AFAICT, vgic_fetch_irouter() has the same problem. Can you update it here as
well?
I think that function is ok, because in there we have:
/* There is exactly 1 vIRQ per IROUTER */
offset = offset / NR_BYTES_PER_IROUTER;
/* Get the index in the rank */
offset = offset & INTERRUPT_RANK_MASK;
Which is basically offset = (offset / NR_BYTES_PER_IROUTER) &
INTERRUPT_RANK_MASK;
Like in the counterpart (updated by this patch) vgic_store_irouter who has:
/* There is 1 vIRQ per IROUTER */
virq = offset / NR_BYTES_PER_IROUTER;
[…]
/* Get the index in the rank */
offset = virq & INTERRUPT_RANK_MASK;
Which is the same as above
You are right. So the patch looks correct to me.
Although, I would still like the commit message to be clarified.
Cheers,
--
Julien Grall