From: Rob Herring <robherring2@gmail.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
devicetree-discuss@lists.ozlabs.org,
Milton Miller <miltonm@bga.com>,
benh@kernel.crashing.org,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFCv2 13/14] irq_domain: Remove 'new' irq_domain in favour of the ppc one
Date: Tue, 24 Jan 2012 16:10:02 -0600 [thread overview]
Message-ID: <4F1F2C3A.3060607@gmail.com> (raw)
In-Reply-To: <1327352870-14687-14-git-send-email-grant.likely@secretlab.ca>
On 01/23/2012 03:07 PM, Grant Likely wrote:
> This patch removes the simplistic implementation of irq_domains and enables
> the powerpc infrastructure for all irq_domain users. The powerpc
> infrastructure includes support for complex mappings between Linux and
> hardware irq numbers, and can manage allocation of irq_descs.
>
> This patch also converts the few users of irq_domain_add()/irq_domain_del()
> to call irq_domain_add_legacy() instead.
>
> v2: Fix removal of irq_alloc_descs() call in gic driver
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> arch/arm/common/gic.c | 85 ++++++++-----------
> arch/arm/common/vic.c | 16 +---
> arch/arm/include/asm/hardware/gic.h | 4 +-
> arch/arm/include/asm/hardware/vic.h | 2 +
> arch/arm/mach-exynos/common.c | 2 +-
> arch/arm/mach-versatile/core.c | 5 +-
> drivers/mfd/twl-core.c | 12 +--
> include/linux/irqdomain.h | 45 +---------
> kernel/irq/irqdomain.c | 159 +++--------------------------------
> 9 files changed, 69 insertions(+), 261 deletions(-)
>
> diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
snip
> @@ -716,17 +708,17 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start,
> gic_irqs = 1020;
> gic->gic_irqs = gic_irqs;
>
> - domain->nr_irq = gic_irqs - domain->hwirq_base;
> - domain->irq_base = irq_alloc_descs(irq_start, 16, domain->nr_irq,
> - numa_node_id());
> - if (IS_ERR_VALUE(domain->irq_base)) {
> + irq_base = irq_alloc_descs(irq_start, 16, gic_irqs - hwirq_base,
> + numa_node_id());
> + if (IS_ERR_VALUE(irq_base)) {
> WARN(1, "Cannot allocate irq_descs @ IRQ%d, assuming pre-allocated\n",
> irq_start);
> - domain->irq_base = irq_start;
> + irq_base = irq_start;
> }
> - domain->host_data = gic;
> - domain->ops = &gic_irq_domain_ops;
> - irq_domain_add(domain);
> + gic->domain = irq_domain_add_legacy(node, gic_irqs, irq_base,
gic_irqs is wrong here. It needs 16 or 32 subtracted off. This patch
will fix things:
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
index 44bf4e7..5fc0c97 100644
--- a/arch/arm/common/gic.c
+++ b/arch/arm/common/gic.c
@@ -707,8 +707,9 @@ void __init gic_init_bases(unsigned int gic_nr, int
irq_start,
if (gic_irqs > 1020)
gic_irqs = 1020;
gic->gic_irqs = gic_irqs;
+ gic_irqs -= hwirq_base;
- irq_base = irq_alloc_descs(irq_start, 16, gic_irqs - hwirq_base,
+ irq_base = irq_alloc_descs(irq_start, 16, gic_irqs,
numa_node_id());
if (IS_ERR_VALUE(irq_base)) {
WARN(1, "Cannot allocate irq_descs @ IRQ%d, assuming
pre-allocated\n",
> + hwirq_base, &gic_irq_domain_ops, gic);
> + if (WARN_ON(!gic->domain))
> + return;
>
> gic_chip.flags |= gic_arch_extn.flags;
> gic_dist_init(gic);
next prev parent reply other threads:[~2012-01-24 22:10 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-23 21:07 [RFCv2 00/14] Grant Likely
2012-01-23 21:07 ` [RFCv2 01/14] irq_domain: add documentation and MAINTAINERS entry Grant Likely
2012-01-24 19:13 ` Randy Dunlap
2012-01-28 17:05 ` Grant Likely
2012-01-23 21:07 ` [RFCv2 02/14] dt: Make irqdomain less verbose Grant Likely
2012-01-23 21:07 ` [RFCv2 03/14] irq_domain: Make irq_domain structure match powerpc's irq_host Grant Likely
2012-01-24 21:38 ` Rob Herring
2012-01-24 22:08 ` Grant Likely
2012-01-24 22:11 ` Rob Herring
2012-01-23 21:07 ` [RFCv2 04/14] irq_domain: convert microblaze from irq_host to irq_domain Grant Likely
2012-01-23 21:07 ` [RFCv2 05/14] irq_domain/powerpc: Use common irq_domain structure instead of irq_host Grant Likely
2012-01-23 21:07 ` [RFCv2 06/14] irq_domain/powerpc: eliminate irq_map; use irq_alloc_desc() instead Grant Likely
2012-01-23 21:07 ` [RFCv2 07/14] irq_domain/powerpc: Eliminate virq_is_host() Grant Likely
2012-01-23 21:07 ` [RFCv2 08/14] irq_domain: Move irq_domain code from powerpc to kernel/irq Grant Likely
2012-01-23 21:07 ` [RFCv2 09/14] irqdomain: remove NO_IRQ from irq domain code Grant Likely
2012-01-23 21:07 ` [RFCv2 10/14] irq_domain: Remove references to old irq_host names Grant Likely
2012-01-23 21:07 ` [RFCv2 11/14] irq_domain: Replace irq_alloc_host() with revmap-specific initializers Grant Likely
2012-01-23 21:07 ` [RFCv2 12/14] irq_domain: Add support for base irq and hwirq in legacy mappings Grant Likely
2012-01-23 21:07 ` [RFCv2 13/14] irq_domain: Remove 'new' irq_domain in favour of the ppc one Grant Likely
2012-01-24 22:10 ` Rob Herring [this message]
2012-01-25 0:26 ` Grant Likely
2012-01-23 21:07 ` [RFCv2 14/14] irq_domain: Remove irq_domain_add_simple() Grant Likely
2012-01-23 21:53 ` [RFCv2 00/14] Rob Herring
2012-01-25 14:13 ` Cousson, Benoit
2012-01-25 18:51 ` Rob Herring
2012-01-26 21:33 ` Grant Likely
2012-01-27 22:08 ` Benjamin Herrenschmidt
2012-01-27 22:13 ` Grant Likely
2012-01-25 22:53 ` Mark Salter
2012-01-26 13:38 ` Grant Likely
2012-01-26 14:26 ` [PATCH] irq_domain/c6x: Convert c6x to use generic irq_domain support Mark Salter
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=4F1F2C3A.3060607@gmail.com \
--to=robherring2@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=miltonm@bga.com \
/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).