Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751670AbdFGJZE (ORCPT ); Wed, 7 Jun 2017 05:25:04 -0400 Received: from foss.arm.com ([217.140.101.70]:57818 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751008AbdFGJZC (ORCPT ); Wed, 7 Jun 2017 05:25:02 -0400 Subject: Re: [PATCH 02/17] pcie-xilinx: add missing 5th legacy interrupt To: Palmer Dabbelt , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , olof@lixom.net References: <20170523004107.536-1-palmer@dabbelt.com> <20170606230007.19101-1-palmer@dabbelt.com> <20170606230007.19101-3-palmer@dabbelt.com> Cc: albert@sifive.com, patches@groups.riscv.org, "Wesley W. Terpstra" , Bjorn Helgaas From: Marc Zyngier Organization: ARM Ltd Message-ID: <9e42e6d3-3433-0c3f-812f-28d98ef089dc@arm.com> Date: Wed, 7 Jun 2017 10:24:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170606230007.19101-3-palmer@dabbelt.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1457 Lines: 46 + Bjorn On 06/06/17 23:59, Palmer Dabbelt wrote: > From: "Wesley W. Terpstra" > > These are numbered from 1. > > Signed-off-by: Palmer Dabbelt > --- > drivers/pci/host/pcie-xilinx.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c > index 2fe2df51f9f8..8804145d399a 100644 > --- a/drivers/pci/host/pcie-xilinx.c > +++ b/drivers/pci/host/pcie-xilinx.c > @@ -443,7 +443,7 @@ static irqreturn_t xilinx_pcie_intr_handler(int irq, void *data) > val = ((val & XILINX_PCIE_RPIFR1_INTR_MASK) >> > XILINX_PCIE_RPIFR1_INTR_SHIFT) + 1; > generic_handle_irq(irq_find_mapping(port->leg_domain, > - val)); > + val + 1)); > } > } > > @@ -524,7 +524,7 @@ static int xilinx_pcie_init_irq_domain(struct xilinx_pcie_port *port) > return -ENODEV; > } > > - port->leg_domain = irq_domain_add_linear(pcie_intc_node, 4, > + port->leg_domain = irq_domain_add_linear(pcie_intc_node, 5, > &intx_domain_ops, > port); > if (!port->leg_domain) { > This is a common problem with the current OF code that numbers INTx from 1 instead of zero (there is no 5th legacy interrupts in the PCI spec, despite what $SUBJECT says). I'd be inclined to fix this at the core level rather than papering over it in the various drivers... Thanks, M. -- Jazz is not dead. It just smells funny...