[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <174672522967.406.10710032891656618225.tip-bot2@tip-bot2>
Date: Thu, 08 May 2025 17:27:09 -0000
From: "tip-bot2 for Frank Li" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Frank Li <Frank.Li@....com>, Thomas Gleixner <tglx@...utronix.de>,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: irq/msi] irqchip/gic-v3-its: Add support for device tree
msi-map and msi-mask
The following commit has been merged into the irq/msi branch of tip:
Commit-ID: f1680d9081e161925c3aca81231ee867c95890b0
Gitweb: https://git.kernel.org/tip/f1680d9081e161925c3aca81231ee867c95890b0
Author: Frank Li <Frank.Li@....com>
AuthorDate: Mon, 14 Apr 2025 14:30:59 -04:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Wed, 07 May 2025 17:49:24 +02:00
irqchip/gic-v3-its: Add support for device tree msi-map and msi-mask
Some platform devices create child devices dynamically and require the
parent device's msi-map to map device IDs to actual sideband information.
A typical use case is using ITS as a PCIe Endpoint Controller(EPC)'s
doorbell function, where PCI hosts send TLP memory writes to the EP
controller. The EP controller converts these writes to AXI transactions
and appends platform-specific sideband information.
EPC's DTS will provide such information by msi-map and msi-mask. A
simplified dts as
pcie-ep@...00000 {
...
msi-map = <0 &its 0xc 8>;
^^^ 0xc is implement defined sideband information,
which append to AXI write transaction.
^ 0 is function index.
msi-mask = <0x7>
}
Check msi-map if msi-parent missed to keep compatility with existing systems.
Signed-off-by: Frank Li <Frank.Li@....com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Link: https://lore.kernel.org/all/20250414-ep-msi-v18-5-f69b49917464@nxp.com
---
drivers/irqchip/irq-gic-v3-its-msi-parent.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/irqchip/irq-gic-v3-its-msi-parent.c b/drivers/irqchip/irq-gic-v3-its-msi-parent.c
index bdb04c8..68f9ba4 100644
--- a/drivers/irqchip/irq-gic-v3-its-msi-parent.c
+++ b/drivers/irqchip/irq-gic-v3-its-msi-parent.c
@@ -118,6 +118,14 @@ static int of_pmsi_get_dev_id(struct irq_domain *domain, struct device *dev,
index++;
} while (!ret);
+ if (ret) {
+ struct device_node *np = NULL;
+
+ ret = of_map_id(dev->of_node, dev->id, "msi-map", "msi-map-mask", &np, dev_id);
+ if (np)
+ of_node_put(np);
+ }
+
return ret;
}
Powered by blists - more mailing lists