[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1309190014160.4089@ionos.tec.linutronix.de>
Date: Thu, 19 Sep 2013 00:31:57 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Santosh Shilimkar <santosh.shilimkar@...com>
cc: linus.walleij@...aro.org, Sricharan R <r.sricharan@...com>,
LKML <linux-kernel@...r.kernel.org>, devicetree@...r.kernel.org,
linux-doc@...r.kernel.org,
LAK <linux-arm-kernel@...ts.infradead.org>,
linux-omap@...r.kernel.org, Russell King <linux@....linux.org.uk>,
Tony Lindgren <tony@...mide.com>, rnayak@...com
Subject: Re: [RFC PATCH 1/4] DRIVERS: IRQCHIP: Add crossbar irqchip driver
On Wed, 18 Sep 2013, Santosh Shilimkar wrote:
> On Friday 13 September 2013 10:55 AM, Santosh Shilimkar wrote:
> > On Friday 13 September 2013 10:24 AM, Thomas Gleixner wrote:
>
> [...]
>
> >> Before you dig into MSI, lets talk about irq domains first.
> >>
> >> GIC implements a legacy irq domain, i.e. a linear domain of all
> >> possible GIC interrupts with a 1:1 mapping.
> >>
> >> So why can't you make use of irq domains and have the whole routing
> >> business implemented sanely?
> >>
> >> What's needed is in gic_init_bases():
> >>
> >> if (of_property_read(node, "routable_irqs", &nr_routable_irqs) {
> >> irq_domain_add_legacy(nr_gic_irqs);
> >> } else {
> >> irq_domain_add_legacy(nr_per_cpu_irqs);
> >> irq_domain_add_linear(nr_routable_irqs);
> >> }
> >>
> >> Now that separate domain has an xlate function which grabs a free GIC
> >> irq from a bitmap and returns the hardware irq number in the gic
> >> space. The map/unmap callbacks take care of setting up / tearing down
> >> the route in the crossbar.
> >>
> >> Thoughts?
> >>
> > This sounds pretty good idea. We will explore above option.
> > Thanks Thomas.
> >
> After further looking into this, the irqdomain approach lets us
> setup the map only once during the init. This is similar to
> the earlier approach of cross-bar driver where at probe time
> the router was setup. The whole debate started with the fact
> that we shouldn't fix the irq mapping at probe and should
> dynamically change the mapping based on [request/free]_irq()
> to be able to maximize the use of the IP.
Well, that's what irq_of_parse_and_map() resp. irq_create_mapping and
irq_dispose_mapping() are for.
It requires changes to drivers, but you can't get that thing for free.
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists