linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] arm: GIC: Do not try to register more then NR_IRQS interrupts
Date: Tue, 23 Nov 2010 20:06:30 +0000	[thread overview]
Message-ID: <20101123200630.GD26510@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <F01D8B85CFF58440B2A13965FBA90CA45911B9845B@GEORGE.Emea.Arm.com>

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.

      reply	other threads:[~2010-11-23 20:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-23 19:45 [PATCH v2] arm: GIC: Do not try to register more then NR_IRQS interrupts Pawel Moll
2010-11-23 19:50 ` Russell King - ARM Linux
2010-11-23 20:01   ` Pawel Moll
2010-11-23 20:06     ` Russell King - ARM Linux [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101123200630.GD26510@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).