Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933346AbdCaMt6 (ORCPT ); Fri, 31 Mar 2017 08:49:58 -0400 Received: from eddie.linux-mips.org ([148.251.95.138]:43296 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933371AbdCaMtT (ORCPT ); Fri, 31 Mar 2017 08:49:19 -0400 Date: Fri, 31 Mar 2017 14:49:16 +0200 From: Ralf Baechle To: Matt Redfearn Cc: James Hogan , linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, Paul Burton Subject: Re: [PATCH 1/2] MIPS: Malta: Fix i8259 irqchip setup Message-ID: <20170331124916.GB26330@linux-mips.org> References: <1490958332-31094-1-git-send-email-matt.redfearn@imgtec.com> <1490958332-31094-2-git-send-email-matt.redfearn@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1490958332-31094-2-git-send-email-matt.redfearn@imgtec.com> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1021 Lines: 28 On Fri, Mar 31, 2017 at 12:05:31PM +0100, Matt Redfearn wrote: > diff --git a/arch/mips/mti-malta/malta-int.c b/arch/mips/mti-malta/malta-int.c > index cb675ec6f283..474b372e0dd9 100644 > --- a/arch/mips/mti-malta/malta-int.c > +++ b/arch/mips/mti-malta/malta-int.c > @@ -232,6 +232,19 @@ void __init arch_init_irq(void) > { > int corehi_irq; > > +#ifdef CONFIG_I8259 > + /* > + * Preallocate the i8259's expected virq's here. Since irqchip_init() > + * will probe the irqchips in hierarchial order, i8259 is probed last. > + * If anything allocates a virq before the i8259 is probed, it will > + * be given one of the i8259's expected range and consequently setup > + * of the i8259 will fail. > + */ > + WARN(irq_alloc_descs(I8259A_IRQ_BASE, I8259A_IRQ_BASE, > + 16, numa_node_id()) < 0, > + "Cannot reserve i8259 virqs at IRQ%d\n", I8259A_IRQ_BASE); > +#endif /* CONFIG_I8259 */ > + > i8259_set_poll(mips_pcibios_iack); CONFIG_I8259 is always defined on Malta so the #ifdef is pointless. Ralf