Message ID | 1430727380-10912-11-git-send-email-m.szyprowski@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, May 04, 2015 at 10:16:05AM +0200, Marek Szyprowski wrote: > The driver doesn't need to do anything important in device add/remove > callbacks, because initialization will be done from device-tree specific > callbacks added later. IOMMU groups created by current code were never > used. Hmm, will this remove support for iommu-groups in the exynos driver? I am still working on the default-domain patch-set which makes iommu-group support mandatory for iommu-drivers. Joerg
Hello, On 2015-05-05 16:55, Joerg Roedel wrote: > On Mon, May 04, 2015 at 10:16:05AM +0200, Marek Szyprowski wrote: >> The driver doesn't need to do anything important in device add/remove >> callbacks, because initialization will be done from device-tree specific >> callbacks added later. IOMMU groups created by current code were never >> used. > Hmm, will this remove support for iommu-groups in the exynos driver? I > am still working on the default-domain patch-set which makes iommu-group > support mandatory for iommu-drivers. I you wish, I can leave this code. iommu-groups were not used at all on Exynos, so I thought that there is no point keeping useless code. Best regards
Hi Marek, On Mon, May 18, 2015 at 02:09:14PM +0200, Marek Szyprowski wrote: > >Hmm, will this remove support for iommu-groups in the exynos driver? I > >am still working on the default-domain patch-set which makes iommu-group > >support mandatory for iommu-drivers. > > I you wish, I can leave this code. iommu-groups were not used at all > on Exynos, > so I thought that there is no point keeping useless code. Yes, please keep the iommu-goups support, it will be required at some point. Joerg
Hi Joerg, On Monday 18 May 2015 19:04:30 Joerg Roedel wrote: > On Mon, May 18, 2015 at 02:09:14PM +0200, Marek Szyprowski wrote: > > > Hmm, will this remove support for iommu-groups in the exynos driver? I > > > am still working on the default-domain patch-set which makes iommu-group > > > support mandatory for iommu-drivers. > > > > I you wish, I can leave this code. iommu-groups were not used at all > > on Exynos, so I thought that there is no point keeping useless code. > > Yes, please keep the iommu-goups support, it will be required at some > point. I think the concept of iommu groups isn't very well understood, hence the little love it receives from developers who conclude it's useless. I can't blame anyone, I don't do any better. Could I convince you to include documentation in your next patch series that touches iommu groups ? Could you please have a look at my "[RFC/PATCH 0/9] IOMMU probe deferral support" patch series in the context of iommu groups ? The series pretty much drops groups support from the ipmmu-vmsa driver, not because of a real desire to do so, but because I wasn't sure how to keep them. Tips would be appreciated.
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 7d62715ab51e..f2eceb6605c5 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -1062,32 +1062,6 @@ static phys_addr_t exynos_iommu_iova_to_phys(struct iommu_domain *domain, return phys; } -static int exynos_iommu_add_device(struct device *dev) -{ - struct iommu_group *group; - int ret; - - group = iommu_group_get(dev); - - if (!group) { - group = iommu_group_alloc(); - if (IS_ERR(group)) { - dev_err(dev, "Failed to allocate IOMMU group\n"); - return PTR_ERR(group); - } - } - - ret = iommu_group_add_device(group, dev); - iommu_group_put(group); - - return ret; -} - -static void exynos_iommu_remove_device(struct device *dev) -{ - iommu_group_remove_device(dev); -} - static const struct iommu_ops exynos_iommu_ops = { .domain_alloc = exynos_iommu_domain_alloc, .domain_free = exynos_iommu_domain_free, @@ -1097,8 +1071,6 @@ static const struct iommu_ops exynos_iommu_ops = { .unmap = exynos_iommu_unmap, .map_sg = default_iommu_map_sg, .iova_to_phys = exynos_iommu_iova_to_phys, - .add_device = exynos_iommu_add_device, - .remove_device = exynos_iommu_remove_device, .pgsize_bitmap = SECT_SIZE | LPAGE_SIZE | SPAGE_SIZE, };
The driver doesn't need to do anything important in device add/remove callbacks, because initialization will be done from device-tree specific callbacks added later. IOMMU groups created by current code were never used. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> --- drivers/iommu/exynos-iommu.c | 28 ---------------------------- 1 file changed, 28 deletions(-)