[PATCH v2] arm: GIC: Do not try to register more then NR_IRQS interrupts

Russell King - ARM Linux linux at arm.linux.org.uk
Tue Nov 23 15:06:30 EST 2010


On Tue, Nov 23, 2010 at 08:01:30PM +0000, Pawel Moll wrote:
> > > +   gic_irqs = readl(base + GIC_DIST_CTR) & 0x1f;
> > > +   gic_irqs = (gic_irqs + 1) * 32;
> >
> > I think this should still be limited to 1020 IRQs.  Note that 1020 is
> > not divisible by 32, so gic_irqs ends up being 1024 which is wrong.
> 
> You mean situation when ITLinesNumber=31, I suppose? Well, registers
> covering 1021-1023 would exist anyway, and I would hope that the
> relevant bits would be simply ignored, but we may safeguard ourselves
> anyway.

It wasn't so much the bits in the register I was concerned about, but
the situation where NR_IRQS > 1020, and we have a secondary controller
using numbers 1021 upwards.



More information about the linux-arm-kernel mailing list