From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [GIT PULL] DEBUG_LL platform updates for 3.2
Date: Fri, 21 Oct 2011 18:04:25 -0500 [thread overview]
Message-ID: <4EA1FA79.2070901@gmail.com> (raw)
In-Reply-To: <4EA1B3D5.9070802@gmail.com>
On 10/21/2011 01:03 PM, Rob Herring wrote:
> On 10/21/2011 10:15 AM, Will Deacon wrote:
>> Hi Rob,
>>
>> On Fri, Oct 21, 2011 at 03:48:24PM +0100, Rob Herring wrote:
>>> On 10/21/2011 05:59 AM, Will Deacon wrote:
>>>> 2. The GIC is hosed on versatile express. Reverting e3f14d3 ("ARM: gic: add
>>>> OF based initialization") and 2071a2a4 ("ARM: gic: add irq_domain support")
>>>> allows me to boot again.
[snip]
>> [ 0.000000] SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
>> [ 0.000000] Preemptible hierarchical RCU implementation.
>> [ 0.000000] NR_IRQS:128 nr_irqs:128 128
>
> It is working for me. You're booting with sparse irq. ARM's support of
> sparse irq is essentially broken. It does not sparsely allocate
> irq_descs, but allocates all nr_irqs irq_descs.
>
> The following patch fixes things and is more in line with other arch's
> implementations of arch_probe_nr_irqs. I need to fix mnp platforms
> still. Any platform that enables sparse irq needs to either set
> machine_desc->nr_irqs or properly call irq_alloc_descs.
>
> Rob
>
> From: Rob Herring <rob.herring@calxeda.com>
> Date: Tue, 13 Sep 2011 15:08:37 -0500
> Subject: [PATCH] ARM: fix sparse irq pre-allocations
>
> Returning NR_IRQS in arch_probe_nr_irqs makes SPARSE_IRQ behave the same as
> !SPARSE_IRQ in that NR_IRQ irqdescs are allocated. There is some advantage
> that NR_IRQ is run-time vs. compile time, but sparse irq is crippled on
> ARM. With irqdomains, each interrupt controller should allocate the
> irqdescs that it needs.
>
> If machine_desc->nr_irqs is set, then the irqdescs will be pre-allocated.
> If the default NR_IRQS is used then no irqdescs will be pre-allocated.
>
> Perhaps 0-16 should be reserved for IPIs on SMP?
>
> There are 3 users of SPARSE_IRQ: pxa, mnp, and shmobile. shmobile is the
> only platform that correctly allocates irqdescs. This commit will break
> mnp platforms which don't set nr_irqs.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> ---
> arch/arm/kernel/irq.c | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
> index de3dcab..b32f438 100644
> --- a/arch/arm/kernel/irq.c
> +++ b/arch/arm/kernel/irq.c
> @@ -133,8 +133,11 @@ void __init init_IRQ(void)
> #ifdef CONFIG_SPARSE_IRQ
> int __init arch_probe_nr_irqs(void)
> {
> - nr_irqs = machine_desc->nr_irqs ? machine_desc->nr_irqs : NR_IRQS;
> - return nr_irqs;
> + if (machine_desc->nr_irqs) {
> + nr_irqs = machine_desc->nr_irqs;
> + return nr_irqs;
> + }
> + return 0;
> }
> #endif
>
While I think this is the right fix, this will break platforms which
don't set nr_irqs or have a mixture of irq_chips with and without
explicit irq_desc allocations (and SPARSE_IRQ on). There is a more
simple fix I'm working on to set machine_desc->nr_irqs to NR_IRQ_LEGACY
on all machines with a gic.
Rob
prev parent reply other threads:[~2011-10-21 23:04 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-28 10:38 [GIT PULL] DEBUG_LL platform updates for 3.2 Will Deacon
2011-10-03 8:35 ` Will Deacon
2011-10-07 20:51 ` Arnd Bergmann
2011-10-10 10:36 ` Will Deacon
2011-10-10 11:20 ` Arnd Bergmann
2011-10-10 13:32 ` Will Deacon
2011-10-11 7:52 ` Shawn Guo
2011-10-11 13:33 ` Arnd Bergmann
2011-10-11 15:09 ` Will Deacon
2011-10-11 18:48 ` Will Deacon
2011-10-11 19:25 ` Arnd Bergmann
2011-10-12 0:03 ` Nicolas Pitre
2011-10-12 8:30 ` Arnd Bergmann
2011-10-13 8:28 ` Russell King - ARM Linux
2011-10-13 13:39 ` Nicolas Pitre
2011-10-13 14:05 ` Russell King - ARM Linux
2011-10-13 18:36 ` Nicolas Pitre
2011-10-13 14:50 ` Arnd Bergmann
2011-10-13 23:09 ` Ryan Mallon
2011-10-13 23:40 ` Ryan Mallon
2011-10-14 2:32 ` Nicolas Pitre
2011-10-12 8:38 ` Jamie Iles
2011-10-12 20:16 ` Nicolas Pitre
2011-10-13 8:23 ` Russell King - ARM Linux
2011-10-13 18:46 ` Nicolas Pitre
2011-10-12 17:29 ` Russell King - ARM Linux
2011-10-12 17:35 ` Will Deacon
2011-10-12 18:01 ` Russell King - ARM Linux
2011-10-12 18:05 ` Will Deacon
2011-10-17 8:25 ` Russell King - ARM Linux
2011-10-17 9:23 ` Will Deacon
2011-10-20 14:57 ` Arnd Bergmann
2011-10-21 10:59 ` Will Deacon
2011-10-21 14:48 ` Rob Herring
2011-10-21 15:11 ` Arnd Bergmann
2011-10-21 15:15 ` Will Deacon
2011-10-21 18:03 ` Rob Herring
2011-10-21 23:04 ` Rob Herring [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=4EA1FA79.2070901@gmail.com \
--to=robherring2@gmail.com \
--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).