From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH 04/12] MIPS: GIC: Move MIPS_GIC_IRQ_BASE into platform irq.h Date: Wed, 03 Sep 2014 17:08:43 +0200 Message-ID: <3376106.3oS8jj7piF@wuerfel> References: <1409350479-19108-1-git-send-email-abrestic@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Andrew Bresticker Cc: Ralf Baechle , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Jeffrey Deans , Markos Chandras , Paul Burton , Thomas Gleixner , Jason Cooper , Linux-MIPS , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" List-Id: devicetree@vger.kernel.org On Tuesday 02 September 2014 15:22:31 Andrew Bresticker wrote: > On Mon, Sep 1, 2014 at 5:08 PM, Andrew Bresticker wrote: > > On Mon, Sep 1, 2014 at 1:34 AM, Arnd Bergmann wrote: > >> On Sunday 31 August 2014 11:54:04 Andrew Bresticker wrote: > >>> On Sat, Aug 30, 2014 at 12:57 AM, Arnd Bergmann wrote: > >>> > On Friday 29 August 2014 15:14:31 Andrew Bresticker wrote: > >>> >> Define a generic MIPS_GIC_IRQ_BASE which is suitable for Malta and > >>> >> the upcoming Danube board in . Since Sead-3 is > >>> >> different and uses a MIPS_GIC_IRQ_BASE equal to the CPU IRQ base (0), > >>> >> define its MIPS_GIC_IRQ_BASE in . > >>> >> > >>> >> Signed-off-by: Andrew Bresticker > >>> >> > >>> > > >>> > Why do you actually have to hardwire an IRQ base? Can't you move > >>> > to the linear irqdomain code for DT based MIPS systems yet? > >>> > >>> Neither Malta nor SEAD-3 use device-tree for interrupts yet, so they > >>> still require a hard-coded IRQ base. For boards using device-tree, I > >>> stuck with a legacy IRQ domain as it allows most of the existing GIC > >>> irqchip code to be reused. > >> > >> I see. Note that we now have irq_domain_add_simple(), which should > >> do the right think in either case: use a legacy domain when a > >> nonzero base is provided for the old boards, but use the simple > >> domain when probed from DT without an irq base. > >> > >> This makes the latter case more memory efficient (it avoids > >> allocating the irq descriptors for every possibly but unused > >> IRQ number) and helps ensure that you don't accidentally rely > >> on hardcoded IRQ numbers for the DT based machines, which would > >> be considered a bug. > > > > Ah, ok. It looks like add_simple() is what I want then. > > Actually, never mind. To re-use the existing GIC irqchip code I want > a legacy IRQ domain. It shouldn't be hard to change the existing code to use irq domain accessors. The main part is probably just to replace 'd->irq - gic_irq_base' with 'd->hwirq', in case you make up your mind about it again. Arnd