Displaying 6 results from an estimated 6 matches for "iommu_put_resv_regions_simpl".
Did you mean:
iommu_put_resv_regions_simple
2019 Dec 09
8
[PATCH v2 0/5] iommu: Implement iommu_put_resv_regions_simple()
...eserved region. Instead of open-coding the loop to do this in each
driver, extract the code into a common function that can be used by
all these drivers.
Changes in v2:
- change subject prefix to "iommu: virtio: " for virtio-iommu.c driver
Thierry
Thierry Reding (5):
iommu: Implement iommu_put_resv_regions_simple()
iommu: arm: Use iommu_put_resv_regions_simple()
iommu: amd: Use iommu_put_resv_regions_simple()
iommu: intel: Use iommu_put_resv_regions_simple()
iommu: virtio: Use iommu_put_resv_regions_simple()
drivers/iommu/amd_iommu.c | 11 +----------
drivers/iommu/arm-smmu-v3.c | 11 +-------...
2019 Sep 16
0
[PATCH 0/5] iommu: Implement iommu_put_resv_regions_simple()
...gt;
>
> Most IOMMU drivers only need to free the memory allocated for each
> reserved region. Instead of open-coding the loop to do this in each
> driver, extract the code into a common function that can be used by
> all these drivers.
If I am not wrong, all the drivers now use the
iommu_put_resv_regions_simple helper. So we can wonder if the callback
is still relevant?
Thanks
Eric
>
> Thierry
>
> Thierry Reding (5):
> iommu: Implement iommu_put_resv_regions_simple()
> iommu: arm: Use iommu_put_resv_regions_simple()
> iommu: amd: Use iommu_put_resv_regions_simple()
> i...
2019 Sep 18
1
[PATCH 1/5] iommu: Implement iommu_put_resv_regions_simple()
...u/iommu.c
> index 0f585b614657..73a2a6b13507 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -2170,6 +2170,25 @@ void iommu_put_resv_regions(struct device *dev, struct list_head *list)
> ops->put_resv_regions(dev, list);
> }
>
> +/**
> + * iommu_put_resv_regions_simple - Reserved region driver helper
> + * @dev: device for which to free reserved regions
> + * @list: reserved region list for device
> + *
> + * IOMMU drivers can use this to implement their .put_resv_regions() callback
> + * for simple reservations. Memory allocated for each reserved...
2019 Dec 09
0
[PATCH v2 5/5] iommu: virtio: Use iommu_put_resv_regions_simple()
...static struct iommu_ops viommu_ops;
static struct virtio_driver virtio_iommu_drv;
@@ -914,7 +906,7 @@ static int viommu_add_device(struct device *dev)
err_unlink_dev:
iommu_device_unlink(&viommu->iommu, dev);
err_free_dev:
- viommu_put_resv_regions(dev, &vdev->resv_regions);
+ iommu_put_resv_regions_simple(dev, &vdev->resv_regions);
kfree(vdev);
return ret;
@@ -932,7 +924,7 @@ static void viommu_remove_device(struct device *dev)
iommu_group_remove_device(dev);
iommu_device_unlink(&vdev->viommu->iommu, dev);
- viommu_put_resv_regions(dev, &vdev->resv_regions);
+ io...
2019 Dec 09
0
[PATCH v2 2/5] iommu: arm: Use iommu_put_resv_regions_simple()
...ain_alloc = arm_smmu_domain_alloc,
@@ -2736,7 +2727,7 @@ static struct iommu_ops arm_smmu_ops = {
.domain_set_attr = arm_smmu_domain_set_attr,
.of_xlate = arm_smmu_of_xlate,
.get_resv_regions = arm_smmu_get_resv_regions,
- .put_resv_regions = arm_smmu_put_resv_regions,
+ .put_resv_regions = iommu_put_resv_regions_simple,
.pgsize_bitmap = -1UL, /* Restricted during device attach */
};
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 31ad3fe9a6d1..d1aef07bb784 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -1576,15 +1576,6 @@ static void arm_smmu_get_resv_regions...
2019 Sep 03
0
[PATCH 5/5] iommu: virt: Use iommu_put_resv_regions_simple()
I think the subject should say virtio instead of virt.