Hi Michal,
On 21/04/2021 08:48, Michal Orzel wrote:
On 20.04.2021 15:28, Julien Grall wrote:
On 20/04/2021 08:08, Michal Orzel wrote:
Signed-off-by: Michal Orzel <michal.or...@arm.com>
static unsigned int gicv3_read_irq(void)
{
- unsigned int irq = READ_SYSREG32(ICC_IAR1_EL1);
+ register_t irq = READ_SYSREG(ICC_IAR1_EL1);
dsb(sy);
- return irq;
+ /* Number of IRQs do not exceed 32bit. */
If we want to be pedantic, the IRQs are encoded using 23-bit. So maybe we want
to mask them below.
+ return (unsigned int)irq;
NIT: We tend to avoid explicit cast unless they are strictly necessary because
they can be more harmful than implicit cast (the compiler may not cast every
conversion). So I would drop it and just keep the comment.
Ok. I will do:
return (irq & 0xffffff);
Sounds good, so long we the value is not hardoced but provided through a
define :).
Cheers,
--
Julien Grall