diff options
author | Sathyam Panda <panda.sathyam9@gmail.com> | 2021-11-11 12:02:31 +0000 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2021-12-14 15:00:26 +0000 |
commit | 7a60af05c183eb25deb1c5a333c232c42eea5944 (patch) | |
tree | c53a336cc7ee7625918c7bb5d04e6054381b1c14 | |
parent | 39181fc6429f4e9e71473284940e35857b42772a (diff) | |
download | kvmtool-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.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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 = { |