All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH kvmtool RESENT] arm/pci: update interrupt-map only for legacy interrupts
@ 2021-11-11 12:02 Sathyam Panda
  2021-11-11 14:29 ` Alexandru Elisei
  2021-12-14 15:18 ` Will Deacon
  0 siblings, 2 replies; 3+ messages in thread
From: Sathyam Panda @ 2021-11-11 12:02 UTC (permalink / raw)
  To: will, julien.thierry.kdev, kvm
  Cc: andre.przywara, alexandru.elisei, jean-philippe, vivek.gautam,
	sathyam.panda

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>
---
 arm/pci.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arm/pci.c b/arm/pci.c
index 2251f62..e44e453 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 = {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-14 15:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11 12:02 [PATCH kvmtool RESENT] arm/pci: update interrupt-map only for legacy interrupts Sathyam Panda
2021-11-11 14:29 ` Alexandru Elisei
2021-12-14 15:18 ` Will Deacon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.