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 19:50:26 +0000 [thread overview]
Message-ID: <20101123195026.GC26510@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1290541542-12917-1-git-send-email-pawel.moll@arm.com>
On Tue, Nov 23, 2010 at 07:45:42PM +0000, Pawel Moll wrote:
> @@ -227,46 +227,45 @@ void __init gic_dist_init(unsigned int gic_nr, void __iomem *base,
> /*
> * Find out how many interrupts are supported.
> */
> - max_irq = readl(base + GIC_DIST_CTR) & 0x1f;
> - max_irq = (max_irq + 1) * 32;
> -
> - /*
> - * The GIC only supports up to 1020 interrupt sources.
> - * Limit this to either the architected maximum, or the
> - * platform maximum.
> - */
> - if (max_irq > max(1020, NR_IRQS))
> - max_irq = max(1020, NR_IRQS);
> + 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.
next prev parent reply other threads:[~2010-11-23 19:50 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 [this message]
2010-11-23 20:01 ` Pawel Moll
2010-11-23 20:06 ` Russell King - ARM Linux
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=20101123195026.GC26510@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).