mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@dabbelt.com>
To: bhelgaas@google.com
To: michal.simek@xilinx.com
To: soren.brinkmann@xilinx.com
To: bharat.kumar.gogada@xilinx.com
To: po.liu@nxp.com
To: christophe.jaillet@wanadoo.fr
To: paul.gortmaker@windriver.com
To: linux-pci@vger.kernel.org
To: linux-kernel@vger.kernel.org
Cc: "Wesley W. Terpstra" <wesley@sifive.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Subject: [PATCH] pcie-xilinx: OF-PCIe numbers legacy interrupts from 1
Date: Fri, 23 Jun 2017 14:57:20 -0700	[thread overview]
Message-ID: <20170623215720.27057-1-palmer@dabbelt.com> (raw)

From: "Wesley W. Terpstra" <wesley@sifive.com>

Without this patch we can't use the 4th legacy PCIe interrupt.  This
is a workaround: there are only 4 legacy interrupts, but since they're
numbered starting from 1 instead of 0 this just adds a 5th interrupt.

Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
Signed-off-by: Wesley W. Terpstra <wesley@sifive.com>
---
 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) {
-- 
2.13.0

             reply	other threads:[~2017-06-23 21:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-23 21:57 Palmer Dabbelt [this message]
2017-07-12 22:58 ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170623215720.27057-1-palmer@dabbelt.com \
    --to=palmer@dabbelt.com \
    --cc=bhelgaas@google.com \
    --cc=wesley@sifive.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®