Displaying 5 results from an estimated 5 matches for "iort_fwnode_lock".
2019 Nov 22
0
[RFC 06/13] ACPI/IORT: Support VIOT virtio-pci node
...ation_id;
};
+struct iort_pci_devid {
+ u16 segment;
+ u8 bus;
+ u8 devfn;
+};
+
struct iort_fwnode {
struct list_head list;
struct acpi_iort_node *iort_node;
struct fwnode_handle *fwnode;
+ struct iort_pci_devid *pci_devid;
};
static LIST_HEAD(iort_fwnode_list);
static DEFINE_SPINLOCK(iort_fwnode_lock);
@@ -44,7 +51,8 @@ static bool iort_type_matches(u8 type, enum iort_node_category category)
case IORT_IOMMU_TYPE:
return type == ACPI_IORT_NODE_SMMU ||
type == ACPI_IORT_NODE_SMMU_V3 ||
- type == ACPI_VIOT_IORT_NODE_VIRTIO_MMIO_IOMMU;
+ type == ACPI_VIOT_IORT_NODE_VI...
2019 Nov 22
0
[RFC 08/13] ACPI/IORT: Add callback to update a device's fwnode
...* removes its fwnode using this function.
+ */
+void 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(f...
2019 Nov 22
0
[RFC 04/13] ACPI/IORT: Add node categories
...<< 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_IORT_NODE_ITS_GROUP;
+ default:
+ WARN_ON(1...
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.