PCI: xilinx: Unify INTx & MSI interrupt decode
authorPaul Burton <paul.burton@imgtec.com>
Tue, 15 Aug 2017 21:25:21 +0000 (16:25 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 16 Aug 2017 16:44:37 +0000 (11:44 -0500)
commitd0b5dda62eb8aa535596952bffbf86b60a258672
treeb0377a910ecc86fb6894af0ceadc26dabdac4973
parentb8550f11bd40b7b6fd4622be4fd0f5aa958faee2
PCI: xilinx: Unify INTx & MSI interrupt decode

The INTx & MSI interrupt decode paths duplicated a fair bit of common
functionality. They also strictly handled interrupts in order of INTx then
MSI, so if both types of interrupt were to be asserted simultaneously and
the MSI interrupt were first in the FIFO then the INTx code would read it &
ignore it before the MSI code then had to read it again, wasting the
original FIFO read.

Unify the INTx & MSI decode in order to reduce that duplication & allow a
single FIFO read to be performed for each interrupt regardless of its type.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Bharat Kumar Gogada <bharatku@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Ravikiran Gummaluri <rgummal@xilinx.com>
drivers/pci/host/pcie-xilinx.c