Re: [RFCv2 13/14] irq_domain: Remove 'new' irq_domain in favour of the ppc one
From: Grant Likely <hidden>
Date: 2012-01-25 00:27:00
Also in:
linux-arm-kernel, linux-devicetree, lkml
On Tue, Jan 24, 2012 at 3:10 PM, Rob Herring [off-list ref] wrote:
On 01/23/2012 03:07 PM, Grant Likely wrote:quoted
This patch removes the simplistic implementation of irq_domains and enab=
les
quoted
the powerpc infrastructure for all irq_domain users. =A0The 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_de=
l()
quoted
to call irq_domain_add_legacy() instead. v2: Fix removal of irq_alloc_descs() call in gic driver Signed-off-by: Grant Likely <redacted> --- =A0arch/arm/common/gic.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 85 ++++++++--=
---------
quoted
=A0arch/arm/common/vic.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 16 +--- =A0arch/arm/include/asm/hardware/gic.h | =A0 =A04 +- =A0arch/arm/include/asm/hardware/vic.h | =A0 =A02 + =A0arch/arm/mach-exynos/common.c =A0 =A0 =A0 | =A0 =A02 +- =A0arch/arm/mach-versatile/core.c =A0 =A0 =A0| =A0 =A05 +- =A0drivers/mfd/twl-core.c =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 12 +-- =A0include/linux/irqdomain.h =A0 =A0 =A0 =A0 =A0 | =A0 45 +--------- =A0kernel/irq/irqdomain.c =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0159 +++-------=
-------------------------
quoted
=A09 files changed, 69 insertions(+), 261 deletions(-)diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.csnipquoted
@@ -716,17 +708,17 @@ void __init gic_init_bases(unsigned int gic_nr, in=
t irq_start,
quoted
=A0 =A0 =A0 =A0 =A0 =A0 =A0 gic_irqs =3D 1020; =A0 =A0 =A0 gic->gic_irqs =3D gic_irqs; - =A0 =A0 domain->nr_irq =3D gic_irqs - domain->hwirq_base; - =A0 =A0 domain->irq_base =3D irq_alloc_descs(irq_start, 16, domain->nr=
_irq,
quoted
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0numa_node_id());
quoted
- =A0 =A0 if (IS_ERR_VALUE(domain->irq_base)) { + =A0 =A0 irq_base =3D irq_alloc_descs(irq_start, 16, gic_irqs - hwirq_b=
ase,
quoted
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0numa_no=
de_id());
quoted
+ =A0 =A0 if (IS_ERR_VALUE(irq_base)) { =A0 =A0 =A0 =A0 =A0 =A0 =A0 WARN(1, "Cannot allocate irq_descs @ IRQ%d, =
assuming pre-allocated\n",
quoted
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0irq_start); - =A0 =A0 =A0 =A0 =A0 =A0 domain->irq_base =3D irq_start; + =A0 =A0 =A0 =A0 =A0 =A0 irq_base =3D irq_start; =A0 =A0 =A0 } - =A0 =A0 domain->host_data =3D gic; - =A0 =A0 domain->ops =3D &gic_irq_domain_ops; - =A0 =A0 irq_domain_add(domain); + =A0 =A0 gic->domain =3D 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:
Good catch, I've integrated this into my series. g.