Displaying 5 results from an estimated 5 matches for "iort_fwnode_list".
2019 Nov 22
0
[RFC 06/13] ACPI/IORT: Support VIOT virtio-pci node
When virtio-iommu uses the PCI transport, IORT doesn't instantiate the
device and doesn't create a fwnode. They will be created later by the
PCI subsystem. Store the information needed to identify the IOMMU in
iort_fwnode_list.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker at arm.com>
---
drivers/acpi/iort.c | 117 +++++++++++++++++++++++++++++++++++---------
1 file changed, 93 insertions(+), 24 deletions(-)
diff --git a/drivers/acpi/iort.c b/drivers/acpi/iort.c
index adc5953fffa5..b517aa4e83ba 100...
2019 Nov 22
0
[RFC 04/13] ACPI/IORT: Add node categories
...DE_ITS_GROUP)
-#define IORT_IOMMU_TYPE ((1 << ACPI_IORT_NODE_SMMU) | \
- (1 << ACPI_IORT_NODE_SMMU_V3))
+enum iort_node_category {
+ IORT_MSI_TYPE,
+ IORT_IOMMU_TYPE,
+};
struct iort_its_msi_chip {
struct list_head list;
@@ -38,6 +38,20 @@ struct iort_fwnode {
static LIST_HEAD(iort_fwnode_list);
static DEFINE_SPINLOCK(iort_fwnode_lock);
+static bool iort_type_matches(u8 type, enum iort_node_category category)
+{
+ switch (category) {
+ case IORT_IOMMU_TYPE:
+ return type == ACPI_IORT_NODE_SMMU ||
+ type == ACPI_IORT_NODE_SMMU_V3;
+ case IORT_MSI_TYPE:
+ return type == ACPI_I...
2019 Nov 22
0
[RFC 08/13] ACPI/IORT: Add callback to update a device's fwnode
...d iort_iommu_update_fwnode(struct device *dev, struct fwnode_handle *fwnode)
+{
+ struct pci_dev *pdev;
+ struct iort_fwnode *curr;
+ struct iort_pci_devid *devid;
+
+ if (!dev_is_pci(dev))
+ return;
+
+ pdev = to_pci_dev(dev);
+
+ spin_lock(&iort_fwnode_lock);
+ list_for_each_entry(curr, &iort_fwnode_list, list) {
+ devid = curr->pci_devid;
+ if (devid &&
+ pci_domain_nr(pdev->bus) == devid->segment &&
+ pdev->bus->number == devid->bus &&
+ pdev->devfn == devid->devfn) {
+ WARN_ON(fwnode && curr->fwnode);
+ curr->fwno...
2019 Nov 22
16
[RFC 00/13] virtio-iommu on non-devicetree platforms
I'm seeking feedback on multi-platform support for virtio-iommu. At the
moment only devicetree (DT) is supported and we don't have a pleasant
solution for other platforms. Once we figure out the topology
description, x86 support is trivial.
Since the IOMMU manages memory accesses from other devices, the guest
kernel needs to initialize the IOMMU before endpoints start issuing DMA.
2019 Nov 22
16
[RFC 00/13] virtio-iommu on non-devicetree platforms
I'm seeking feedback on multi-platform support for virtio-iommu. At the
moment only devicetree (DT) is supported and we don't have a pleasant
solution for other platforms. Once we figure out the topology
description, x86 support is trivial.
Since the IOMMU manages memory accesses from other devices, the guest
kernel needs to initialize the IOMMU before endpoints start issuing DMA.