aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSathyam Panda <panda.sathyam9@gmail.com>2021-11-11 12:02:31 +0000
committerWill Deacon <will@kernel.org>2021-12-14 15:00:26 +0000
commit7a60af05c183eb25deb1c5a333c232c42eea5944 (patch)
treec53a336cc7ee7625918c7bb5d04e6054381b1c14
parent39181fc6429f4e9e71473284940e35857b42772a (diff)
downloadkvmtool-7a60af05c183eb25deb1c5a333c232c42eea5944.tar.gz
arm/pci: update interrupt-map only for legacy interrupts
The interrupt pin cell in "interrupt-map" property is defined only for legacy interrupts with a valid range in [1-4] corrspoding to INTA#..INTD#. And the PCI endpoint devices that support advance interrupt mechanism like MSI or MSI-X should not have an entry with value 0 in "interrupt-map". This patch takes care of this problem by avoiding redundant entries. Signed-off-by: Sathyam Panda <sathyam.panda@arm.com> Reviewed-by: Vivek Kumar Gautam <vivek.gautam@arm.com> Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com> Link: https://lore.kernel.org/r/20211111120231.5468-1-sathyam.panda@arm.com Signed-off-by: Will Deacon <will@kernel.org>
-rw-r--r--arm/pci.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arm/pci.c b/arm/pci.c
index 2251f627..e44e4534 100644
--- a/arm/pci.c
+++ b/arm/pci.c
@@ -80,6 +80,16 @@ void pci__generate_fdt_nodes(void *fdt)
u8 irq = pci_hdr->irq_line;
u32 irq_flags = pci_hdr->irq_type;
+ /*
+ * Avoid adding entries in "interrupt-map" for devices that
+ * will be using advance interrupt mechanisms like MSI or
+ * MSI-X instead of legacy interrupt pins INTA#..INTD#
+ */
+ if (pin == 0) {
+ dev_hdr = device__next_dev(dev_hdr);
+ continue;
+ }
+
*entry = (struct of_interrupt_map_entry) {
.pci_irq_mask = {
.pci_addr = {