From: Paul Mundt <lethal@linux-sh.org>
To: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [question] NR_IRQS in genirq
Date: Wed, 24 Nov 2010 17:46:53 +0900 [thread overview]
Message-ID: <20101124084653.GG2212@linux-sh.org> (raw)
In-Reply-To: <AANLkTimoBdFyQ6GfS2DKiF0wdRox0x7MfM0_keD9Z1D0@mail.gmail.com>
On Wed, Nov 24, 2010 at 03:28:37PM +0800, Haojian Zhuang wrote:
> Hi all,
>
> I'm using the latest kernel 2.6.37-rc1. Now I met some issues on genirq.
>
> 1. While SPARSE IRQ is enabled, nr_irqs may be larger than NR_IRQS.
> But the allocated_irqs bitmap (kernel/irq/irqdesc.c) is restricted in
> NR_IRQS. Is it an issue?
>
> 2. irqs_resend bitmap of kernel/irq/resend.c is also restricted in
> NR_IRQS. Is it an issue, too?
>
Perhaps something like:
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 9988d03..11bd76c 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -215,6 +215,11 @@ int __init early_irq_init(void)
initcnt = arch_probe_nr_irqs();
printk(KERN_INFO "NR_IRQS:%d nr_irqs:%d %d\n", NR_IRQS, nr_irqs, initcnt);
+ if (unlikely(nr_irqs > NR_IRQS)) {
+ WARN(1, "Probed more than NR_IRQS, chomping.\n");
+ nr_irqs = NR_IRQS;
+ }
+
for (i = 0; i < initcnt; i++) {
desc = alloc_desc(i, node);
set_bit(i, allocated_irqs);
?
next prev parent reply other threads:[~2010-11-24 8:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-24 7:28 [question] NR_IRQS in genirq Haojian Zhuang
2010-11-24 8:46 ` Paul Mundt [this message]
2010-11-24 13:56 ` Thomas Gleixner
2010-11-24 13:18 ` Thomas Gleixner
2010-11-24 13:46 ` Haojian Zhuang
2010-11-24 13:46 ` Haojian Zhuang
2010-11-24 13:50 ` Mark Brown
2010-11-24 13:50 ` Mark Brown
2010-11-24 13:54 ` Thomas Gleixner
2010-11-24 13:54 ` Thomas Gleixner
2010-11-24 14:00 ` Mark Brown
2010-11-24 14:00 ` Mark Brown
2010-11-24 13:53 ` Thomas Gleixner
2010-11-24 13:53 ` Thomas Gleixner
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=20101124084653.GG2212@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=haojian.zhuang@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.