Thread (5 messages) 5 messages, 5 authors, 2013-01-01

[PATCH] arm: dma mapping: export arm iommu functions

From: Prathyush K <hidden>
Date: 2012-12-28 04:23:48
Also in: linux-mm

On Thu, Dec 27, 2012 at 7:45 PM, Marek Szyprowski
[off-list ref]wrote:
Hello,


On 12/27/2012 8:14 AM, Prathyush K wrote:
quoted
This patch adds EXPORT_SYMBOL calls to the three arm iommu
functions - arm_iommu_create_mapping, arm_iommu_free_mapping
and arm_iommu_attach_device. These functions can now be called
from dynamic modules.
Could You describe a bit more why those functions might be needed by
dynamic modules?

Hi Marek,
We are adding iommu support to exynos gsc and s5p-mfc.
And these two drivers need to be built as modules to improve boot time.

We're calling these three functions from inside these drivers:
e.g.
mapping = arm_iommu_create_mapping(&platform_bus_type, 0x20000000, SZ_256M,
4);
arm_iommu_attach_device(mdev, mapping);


 Signed-off-by: Prathyush K [off-list ref]
quoted
---
  arch/arm/mm/dma-mapping.c | 3 +++
  1 file changed, 3 insertions(+)
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 6b2fb87..c0f0f43 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -1797,6 +1797,7 @@ err2:
  err:
        return ERR_PTR(err);
  }
+EXPORT_SYMBOL(arm_iommu_**create_mapping);
EXPORT_SYMOBL_GPL() ?
Right, it should be EXPORT_SYMOBL_GPL().

Will update in next patch.


   static void release_iommu_mapping(struct kref *kref)
quoted
  {
@@ -1813,6 +1814,7 @@ void arm_iommu_release_mapping(**struct
dma_iommu_mapping *mapping)
        if (mapping)
                kref_put(&mapping->kref, release_iommu_mapping);
  }
+EXPORT_SYMBOL(arm_iommu_**release_mapping);
    /**
   * arm_iommu_attach_device
@@ -1841,5 +1843,6 @@ int arm_iommu_attach_device(struct device *dev,
        pr_debug("Attached IOMMU controller to %s device.\n",
dev_name(dev));
        return 0;
  }
+EXPORT_SYMBOL(arm_iommu_**attach_device);
    #endif
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center


Regards,
Prathyush
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121228/4aee24a0/attachment-0001.html>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help