Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1613947 > unrolled thread

[PATCH 0/5] iommu/omap: Add support for iommu-groups and 'struct iommu_device'

Started byJoerg Roedel <joro@8bytes.org>
First post2017-03-31 14:20 +0200
Last post2017-04-03 19:20 +0200
Articles 8 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/5] iommu/omap: Add support for iommu-groups and 'struct iommu_device' Joerg Roedel <joro@8bytes.org> - 2017-03-31 14:20 +0200
    [PATCH 5/5] iommu/omap: Add iommu-group support Joerg Roedel <joro@8bytes.org> - 2017-03-31 14:20 +0200
    [PATCH 1/5] iommu/omap: Move data structures to omap-iommu.h Joerg Roedel <joro@8bytes.org> - 2017-03-31 14:20 +0200
      Re: [PATCH 1/5] iommu/omap: Move data structures to omap-iommu.h Suman Anna <s-anna@ti.com> - 2017-04-03 19:30 +0200
    [PATCH 3/5] iommu/omap: Set dev->archdata.iommu = NULL in omap_iommu_remove_device Joerg Roedel <joro@8bytes.org> - 2017-03-31 14:20 +0200
      Re: [PATCH 3/5] iommu/omap: Set dev->archdata.iommu = NULL in  omap_iommu_remove_device Suman Anna <s-anna@ti.com> - 2017-04-03 20:30 +0200
    [PATCH 4/5] iommu/omap: Make use of 'struct iommu_device' Joerg Roedel <joro@8bytes.org> - 2017-03-31 14:20 +0200
    Re: [PATCH 0/5] iommu/omap: Add support for iommu-groups and 'struct  iommu_device' Suman Anna <s-anna@ti.com> - 2017-04-03 19:20 +0200

#1613947 — [PATCH 0/5] iommu/omap: Add support for iommu-groups and 'struct iommu_device'

FromJoerg Roedel <joro@8bytes.org>
Date2017-03-31 14:20 +0200
Subject[PATCH 0/5] iommu/omap: Add support for iommu-groups and 'struct iommu_device'
Message-ID<tr3H3-4uB-3@gated-at.bofh.it>
Hi,

here is a small patch-set for the omap-iommu driver to make
it use new features of the iommu-core. Please review.

Thanks,

	Joerg

Joerg Roedel (5):
  iommu/omap: Move data structures to omap-iommu.h
  iommu/omap: Permanently keep iommu_dev pointer in arch_data
  iommu/omap: Set dev->archdata.iommu = NULL in omap_iommu_remove_device
  iommu/omap: Make use of 'struct iommu_device'
  iommu/omap: Add iommu-group support

 drivers/iommu/omap-iommu.c               | 137 ++++++++++++++++++++-----------
 drivers/iommu/omap-iommu.h               |  35 ++++++++
 include/linux/platform_data/iommu-omap.h |  15 ----
 3 files changed, 124 insertions(+), 63 deletions(-)

-- 
1.9.1

[toc] | [next] | [standalone]


#1613948 — [PATCH 5/5] iommu/omap: Add iommu-group support

FromJoerg Roedel <joro@8bytes.org>
Date2017-03-31 14:20 +0200
Subject[PATCH 5/5] iommu/omap: Add iommu-group support
Message-ID<tr3H3-4uB-11@gated-at.bofh.it>
In reply to#1613947
From: Joerg Roedel <jroedel@suse.de>

Support for IOMMU groups will become mandatory for drivers,
so add it to the omap iommu driver.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 drivers/iommu/omap-iommu.c | 43 +++++++++++++++++++++++++++++++++++++++++--
 drivers/iommu/omap-iommu.h |  1 +
 2 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index 5e3a946..bd5e014 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -948,26 +948,42 @@ static int omap_iommu_probe(struct platform_device *pdev)
 	pm_runtime_irq_safe(obj->dev);
 	pm_runtime_enable(obj->dev);
 
+	obj->group = iommu_group_alloc();
+	if (IS_ERR(obj->group))
+		return PTR_ERR(obj->group);
+
 	err = iommu_device_sysfs_add(&obj->iommu, obj->dev, NULL, obj->name);
 	if (err)
-		return err;
+		goto out_group;
 
 	iommu_device_set_ops(&obj->iommu, &omap_iommu_ops);
 
 	err = iommu_device_register(&obj->iommu);
 	if (err)
-		return err;
+		goto out_sysfs;
 
 	omap_iommu_debugfs_add(obj);
 
 	dev_info(&pdev->dev, "%s registered\n", obj->name);
+
 	return 0;
+
+out_sysfs:
+	iommu_device_sysfs_remove(&obj->iommu);
+
+out_group:
+	iommu_group_put(obj->group);
+
+	return err;
 }
 
 static int omap_iommu_remove(struct platform_device *pdev)
 {
 	struct omap_iommu *obj = platform_get_drvdata(pdev);
 
+	iommu_group_put(obj->group);
+	obj->group = NULL;
+
 	iommu_device_sysfs_remove(&obj->iommu);
 	iommu_device_unregister(&obj->iommu);
 
@@ -1217,6 +1233,7 @@ static phys_addr_t omap_iommu_iova_to_phys(struct iommu_domain *domain,
 static int omap_iommu_add_device(struct device *dev)
 {
 	struct omap_iommu_arch_data *arch_data;
+	struct iommu_group *group;
 	struct omap_iommu *iommu;
 	struct device_node *np;
 	struct platform_device *pdev;
@@ -1262,6 +1279,15 @@ static int omap_iommu_add_device(struct device *dev)
 	arch_data->iommu_dev = iommu;
 	dev->archdata.iommu = arch_data;
 
+	/*
+	 * IOMMU group initialization calls into omap_device_group, which needs
+	 * a valid dev->archdata.iommu pointer
+	 */
+	group = iommu_group_get_for_dev(dev);
+	if (IS_ERR(group))
+		return PTR_ERR(group);
+	iommu_group_put(group);
+
 	of_node_put(np);
 
 	return 0;
@@ -1275,12 +1301,24 @@ static void omap_iommu_remove_device(struct device *dev)
 		return;
 
 	iommu_device_unlink(&arch_data->iommu_dev->iommu, dev);
+	iommu_group_remove_device(dev);
 
 	dev->archdata.iommu = NULL;
 	kfree(arch_data);
 
 }
 
+static struct iommu_group *omap_device_group(struct device *dev)
+{
+	struct omap_iommu_arch_data *arch_data = dev->archdata.iommu;
+	struct iommu_group *group = NULL;
+
+	if (arch_data->iommu_dev)
+		group = arch_data->iommu_dev->group;
+
+	return group;
+}
+
 static const struct iommu_ops omap_iommu_ops = {
 	.domain_alloc	= omap_iommu_domain_alloc,
 	.domain_free	= omap_iommu_domain_free,
@@ -1292,6 +1330,7 @@ static void omap_iommu_remove_device(struct device *dev)
 	.iova_to_phys	= omap_iommu_iova_to_phys,
 	.add_device	= omap_iommu_add_device,
 	.remove_device	= omap_iommu_remove_device,
+	.device_group	= omap_device_group,
 	.pgsize_bitmap	= OMAP_IOMMU_PGSIZES,
 };
 
diff --git a/drivers/iommu/omap-iommu.h b/drivers/iommu/omap-iommu.h
index 07e6ea1..28483c5 100644
--- a/drivers/iommu/omap-iommu.h
+++ b/drivers/iommu/omap-iommu.h
@@ -69,6 +69,7 @@ struct omap_iommu {
 	u32 id;
 
 	struct iommu_device iommu;
+	struct iommu_group *group;
 };
 
 /**
-- 
1.9.1

[toc] | [prev] | [next] | [standalone]


#1613949 — [PATCH 1/5] iommu/omap: Move data structures to omap-iommu.h

FromJoerg Roedel <joro@8bytes.org>
Date2017-03-31 14:20 +0200
Subject[PATCH 1/5] iommu/omap: Move data structures to omap-iommu.h
Message-ID<tr3H4-4uB-19@gated-at.bofh.it>
In reply to#1613947
From: Joerg Roedel <jroedel@suse.de>

The internal data-structures are scattered over various
header and C files. Consolidate them in omap-iommu.h.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 drivers/iommu/omap-iommu.c               | 16 ----------------
 drivers/iommu/omap-iommu.h               | 32 ++++++++++++++++++++++++++++++++
 include/linux/platform_data/iommu-omap.h | 15 ---------------
 3 files changed, 32 insertions(+), 31 deletions(-)

diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index e2583cc..e9c9b08 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -42,22 +42,6 @@
 /* bitmap of the page sizes currently supported */
 #define OMAP_IOMMU_PGSIZES	(SZ_4K | SZ_64K | SZ_1M | SZ_16M)
 
-/**
- * struct omap_iommu_domain - omap iommu domain
- * @pgtable:	the page table
- * @iommu_dev:	an omap iommu device attached to this domain. only a single
- *		iommu device can be attached for now.
- * @dev:	Device using this domain.
- * @lock:	domain lock, should be taken when attaching/detaching
- */
-struct omap_iommu_domain {
-	u32 *pgtable;
-	struct omap_iommu *iommu_dev;
-	struct device *dev;
-	spinlock_t lock;
-	struct iommu_domain domain;
-};
-
 #define MMU_LOCK_BASE_SHIFT	10
 #define MMU_LOCK_BASE_MASK	(0x1f << MMU_LOCK_BASE_SHIFT)
 #define MMU_LOCK_BASE(x)	\
diff --git a/drivers/iommu/omap-iommu.h b/drivers/iommu/omap-iommu.h
index 59628e5..3cd414a 100644
--- a/drivers/iommu/omap-iommu.h
+++ b/drivers/iommu/omap-iommu.h
@@ -14,6 +14,7 @@
 #define _OMAP_IOMMU_H
 
 #include <linux/bitops.h>
+#include <linux/iommu.h>
 
 #define for_each_iotlb_cr(obj, n, __i, cr)				\
 	for (__i = 0;							\
@@ -27,6 +28,22 @@ struct iotlb_entry {
 	u32 endian, elsz, mixed;
 };
 
+/**
+ * struct omap_iommu_domain - omap iommu domain
+ * @pgtable:	the page table
+ * @iommu_dev:	an omap iommu device attached to this domain. only a single
+ *		iommu device can be attached for now.
+ * @dev:	Device using this domain.
+ * @lock:	domain lock, should be taken when attaching/detaching
+ */
+struct omap_iommu_domain {
+	u32 *pgtable;
+	struct omap_iommu *iommu_dev;
+	struct device *dev;
+	spinlock_t lock;
+	struct iommu_domain domain;
+};
+
 struct omap_iommu {
 	const char	*name;
 	void __iomem	*regbase;
@@ -52,6 +69,21 @@ struct omap_iommu {
 	u32 id;
 };
 
+/**
+ * struct iommu_arch_data - omap iommu private data
+ * @name: name of the iommu device
+ * @iommu_dev: handle of the iommu device
+ *
+ * This is an omap iommu private data object, which binds an iommu user
+ * to its iommu device. This object should be placed at the iommu user's
+ * dev_archdata so generic IOMMU API can be used without having to
+ * utilize omap-specific plumbing anymore.
+ */
+struct omap_iommu_arch_data {
+	const char *name;
+	struct omap_iommu *iommu_dev;
+};
+
 struct cr_regs {
 	u32 cam;
 	u32 ram;
diff --git a/include/linux/platform_data/iommu-omap.h b/include/linux/platform_data/iommu-omap.h
index 0496d17..8c2a77c 100644
--- a/include/linux/platform_data/iommu-omap.h
+++ b/include/linux/platform_data/iommu-omap.h
@@ -14,21 +14,6 @@
 
 #define MMU_REG_SIZE		256
 
-/**
- * struct iommu_arch_data - omap iommu private data
- * @name: name of the iommu device
- * @iommu_dev: handle of the iommu device
- *
- * This is an omap iommu private data object, which binds an iommu user
- * to its iommu device. This object should be placed at the iommu user's
- * dev_archdata so generic IOMMU API can be used without having to
- * utilize omap-specific plumbing anymore.
- */
-struct omap_iommu_arch_data {
-	const char *name;
-	struct omap_iommu *iommu_dev;
-};
-
 struct iommu_platform_data {
 	const char *name;
 	const char *reset_name;
-- 
1.9.1

[toc] | [prev] | [next] | [standalone]


#1615435 — Re: [PATCH 1/5] iommu/omap: Move data structures to omap-iommu.h

FromSuman Anna <s-anna@ti.com>
Date2017-04-03 19:30 +0200
SubjectRe: [PATCH 1/5] iommu/omap: Move data structures to omap-iommu.h
Message-ID<tsdXI-1pB-17@gated-at.bofh.it>
In reply to#1613949
On 03/31/2017 07:10 AM, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@suse.de>
> 
> The internal data-structures are scattered over various
> header and C files. Consolidate them in omap-iommu.h.
> 
> Signed-off-by: Joerg Roedel <jroedel@suse.de>
> ---
>  drivers/iommu/omap-iommu.c               | 16 ----------------
>  drivers/iommu/omap-iommu.h               | 32 ++++++++++++++++++++++++++++++++
>  include/linux/platform_data/iommu-omap.h | 15 ---------------
>  3 files changed, 32 insertions(+), 31 deletions(-)
> 
> diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
> index e2583cc..e9c9b08 100644
> --- a/drivers/iommu/omap-iommu.c
> +++ b/drivers/iommu/omap-iommu.c
> @@ -42,22 +42,6 @@
>  /* bitmap of the page sizes currently supported */
>  #define OMAP_IOMMU_PGSIZES	(SZ_4K | SZ_64K | SZ_1M | SZ_16M)
>  
> -/**
> - * struct omap_iommu_domain - omap iommu domain
> - * @pgtable:	the page table
> - * @iommu_dev:	an omap iommu device attached to this domain. only a single
> - *		iommu device can be attached for now.
> - * @dev:	Device using this domain.
> - * @lock:	domain lock, should be taken when attaching/detaching
> - */
> -struct omap_iommu_domain {
> -	u32 *pgtable;
> -	struct omap_iommu *iommu_dev;
> -	struct device *dev;
> -	spinlock_t lock;
> -	struct iommu_domain domain;
> -};
> -
>  #define MMU_LOCK_BASE_SHIFT	10
>  #define MMU_LOCK_BASE_MASK	(0x1f << MMU_LOCK_BASE_SHIFT)
>  #define MMU_LOCK_BASE(x)	\
> diff --git a/drivers/iommu/omap-iommu.h b/drivers/iommu/omap-iommu.h
> index 59628e5..3cd414a 100644
> --- a/drivers/iommu/omap-iommu.h
> +++ b/drivers/iommu/omap-iommu.h
> @@ -14,6 +14,7 @@
>  #define _OMAP_IOMMU_H
>  
>  #include <linux/bitops.h>
> +#include <linux/iommu.h>
>  
>  #define for_each_iotlb_cr(obj, n, __i, cr)				\
>  	for (__i = 0;							\
> @@ -27,6 +28,22 @@ struct iotlb_entry {
>  	u32 endian, elsz, mixed;
>  };
>  
> +/**
> + * struct omap_iommu_domain - omap iommu domain
> + * @pgtable:	the page table
> + * @iommu_dev:	an omap iommu device attached to this domain. only a single
> + *		iommu device can be attached for now.
> + * @dev:	Device using this domain.
> + * @lock:	domain lock, should be taken when attaching/detaching
> + */
> +struct omap_iommu_domain {
> +	u32 *pgtable;
> +	struct omap_iommu *iommu_dev;
> +	struct device *dev;
> +	spinlock_t lock;
> +	struct iommu_domain domain;
> +};
> +
>  struct omap_iommu {
>  	const char	*name;
>  	void __iomem	*regbase;
> @@ -52,6 +69,21 @@ struct omap_iommu {
>  	u32 id;
>  };
>  
> +/**
> + * struct iommu_arch_data - omap iommu private data
> + * @name: name of the iommu device
> + * @iommu_dev: handle of the iommu device
> + *
> + * This is an omap iommu private data object, which binds an iommu user
> + * to its iommu device. This object should be placed at the iommu user's
> + * dev_archdata so generic IOMMU API can be used without having to
> + * utilize omap-specific plumbing anymore.
> + */
> +struct omap_iommu_arch_data {
> +	const char *name;
> +	struct omap_iommu *iommu_dev;
> +};
> +
>  struct cr_regs {
>  	u32 cam;
>  	u32 ram;
> diff --git a/include/linux/platform_data/iommu-omap.h b/include/linux/platform_data/iommu-omap.h
> index 0496d17..8c2a77c 100644
> --- a/include/linux/platform_data/iommu-omap.h
> +++ b/include/linux/platform_data/iommu-omap.h
> @@ -14,21 +14,6 @@
>  
>  #define MMU_REG_SIZE		256

This define can be dropped as well since you are already modifying this
file, it's already defined in drivers/iommu/omap-iommu.h.

regards
Suman

>  
> -/**
> - * struct iommu_arch_data - omap iommu private data
> - * @name: name of the iommu device
> - * @iommu_dev: handle of the iommu device
> - *
> - * This is an omap iommu private data object, which binds an iommu user
> - * to its iommu device. This object should be placed at the iommu user's
> - * dev_archdata so generic IOMMU API can be used without having to
> - * utilize omap-specific plumbing anymore.
> - */
> -struct omap_iommu_arch_data {
> -	const char *name;
> -	struct omap_iommu *iommu_dev;
> -};
> -
>  struct iommu_platform_data {
>  	const char *name;
>  	const char *reset_name;
> 

[toc] | [prev] | [next] | [standalone]


#1613950 — [PATCH 3/5] iommu/omap: Set dev->archdata.iommu = NULL in omap_iommu_remove_device

FromJoerg Roedel <joro@8bytes.org>
Date2017-03-31 14:20 +0200
Subject[PATCH 3/5] iommu/omap: Set dev->archdata.iommu = NULL in omap_iommu_remove_device
Message-ID<tr3H4-4uB-17@gated-at.bofh.it>
In reply to#1613947
From: Joerg Roedel <jroedel@suse.de>

Don't leave a stale pointer in case the device continues to
exist for some more time.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 drivers/iommu/omap-iommu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index 45df5c8..04b3718 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -1252,6 +1252,7 @@ static void omap_iommu_remove_device(struct device *dev)
 	if (!dev->of_node || !arch_data)
 		return;
 
+	dev->archdata.iommu = NULL;
 	kfree(arch_data);
 }
 
-- 
1.9.1

[toc] | [prev] | [next] | [standalone]


#1615467 — Re: [PATCH 3/5] iommu/omap: Set dev->archdata.iommu = NULL in omap_iommu_remove_device

FromSuman Anna <s-anna@ti.com>
Date2017-04-03 20:30 +0200
SubjectRe: [PATCH 3/5] iommu/omap: Set dev->archdata.iommu = NULL in omap_iommu_remove_device
Message-ID<tseTN-21p-27@gated-at.bofh.it>
In reply to#1613950
Hi Joerg,

On 03/31/2017 07:10 AM, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@suse.de>
> 
> Don't leave a stale pointer in case the device continues to
> exist for some more time.
> 
> Signed-off-by: Joerg Roedel <jroedel@suse.de>
> ---
>  drivers/iommu/omap-iommu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
> index 45df5c8..04b3718 100644
> --- a/drivers/iommu/omap-iommu.c
> +++ b/drivers/iommu/omap-iommu.c
> @@ -1252,6 +1252,7 @@ static void omap_iommu_remove_device(struct device *dev)
>  	if (!dev->of_node || !arch_data)
>  		return;
>  
> +	dev->archdata.iommu = NULL;

This can be squashed into Patch 2 to go alongside the matching change in
omap_iommu_attach_device().

regards
Suman

>  	kfree(arch_data);
>  }
>  
> 

[toc] | [prev] | [next] | [standalone]


#1613951 — [PATCH 4/5] iommu/omap: Make use of 'struct iommu_device'

FromJoerg Roedel <joro@8bytes.org>
Date2017-03-31 14:20 +0200
Subject[PATCH 4/5] iommu/omap: Make use of 'struct iommu_device'
Message-ID<tr3H4-4uB-21@gated-at.bofh.it>
In reply to#1613947
From: Joerg Roedel <jroedel@suse.de>

Modify the driver to register individual iommus and
establish links between devices and iommus in sysfs.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 drivers/iommu/omap-iommu.c | 25 +++++++++++++++++++++++++
 drivers/iommu/omap-iommu.h |  2 ++
 2 files changed, 27 insertions(+)

diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index 04b3718..5e3a946 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -36,6 +36,8 @@
 #include "omap-iopgtable.h"
 #include "omap-iommu.h"
 
+static const struct iommu_ops omap_iommu_ops;
+
 #define to_iommu(dev)							\
 	((struct omap_iommu *)platform_get_drvdata(to_platform_device(dev)))
 
@@ -946,6 +948,16 @@ static int omap_iommu_probe(struct platform_device *pdev)
 	pm_runtime_irq_safe(obj->dev);
 	pm_runtime_enable(obj->dev);
 
+	err = iommu_device_sysfs_add(&obj->iommu, obj->dev, NULL, obj->name);
+	if (err)
+		return err;
+
+	iommu_device_set_ops(&obj->iommu, &omap_iommu_ops);
+
+	err = iommu_device_register(&obj->iommu);
+	if (err)
+		return err;
+
 	omap_iommu_debugfs_add(obj);
 
 	dev_info(&pdev->dev, "%s registered\n", obj->name);
@@ -956,6 +968,9 @@ static int omap_iommu_remove(struct platform_device *pdev)
 {
 	struct omap_iommu *obj = platform_get_drvdata(pdev);
 
+	iommu_device_sysfs_remove(&obj->iommu);
+	iommu_device_unregister(&obj->iommu);
+
 	omap_iommu_debugfs_remove(obj);
 
 	pm_runtime_disable(obj->dev);
@@ -1205,6 +1220,7 @@ static int omap_iommu_add_device(struct device *dev)
 	struct omap_iommu *iommu;
 	struct device_node *np;
 	struct platform_device *pdev;
+	int ret;
 
 	/*
 	 * Allocate the archdata iommu structure for DT-based devices.
@@ -1237,6 +1253,12 @@ static int omap_iommu_add_device(struct device *dev)
 		return -ENOMEM;
 	}
 
+	ret = iommu_device_link(&iommu->iommu, dev);
+	if (ret) {
+		of_node_put(np);
+		return ret;
+	}
+
 	arch_data->iommu_dev = iommu;
 	dev->archdata.iommu = arch_data;
 
@@ -1252,8 +1274,11 @@ static void omap_iommu_remove_device(struct device *dev)
 	if (!dev->of_node || !arch_data)
 		return;
 
+	iommu_device_unlink(&arch_data->iommu_dev->iommu, dev);
+
 	dev->archdata.iommu = NULL;
 	kfree(arch_data);
+
 }
 
 static const struct iommu_ops omap_iommu_ops = {
diff --git a/drivers/iommu/omap-iommu.h b/drivers/iommu/omap-iommu.h
index 05bd279..07e6ea1 100644
--- a/drivers/iommu/omap-iommu.h
+++ b/drivers/iommu/omap-iommu.h
@@ -67,6 +67,8 @@ struct omap_iommu {
 
 	int has_bus_err_back;
 	u32 id;
+
+	struct iommu_device iommu;
 };
 
 /**
-- 
1.9.1

[toc] | [prev] | [next] | [standalone]


#1615430 — Re: [PATCH 0/5] iommu/omap: Add support for iommu-groups and 'struct iommu_device'

FromSuman Anna <s-anna@ti.com>
Date2017-04-03 19:20 +0200
SubjectRe: [PATCH 0/5] iommu/omap: Add support for iommu-groups and 'struct iommu_device'
Message-ID<tsdO1-1ml-1@gated-at.bofh.it>
In reply to#1613947
Hi Joerg,

On 03/31/2017 07:10 AM, Joerg Roedel wrote:
> Hi,
> 
> here is a small patch-set for the omap-iommu driver to make
> it use new features of the iommu-core. Please review.

Thanks for the patches - this has been on my TODO list but you beat me
in getting there first :). Are these for 4.12?

I have given the series a quick try and these currently break the
functionality. I am investigating the failures, so will mostly need some
additional changes. Let me know if you want me to take up posting of the
v2. Meanwhile, I have added some comments on the patches.

regards
Suman

> 
> Thanks,
> 
> 	Joerg
> 
> Joerg Roedel (5):
>   iommu/omap: Move data structures to omap-iommu.h
>   iommu/omap: Permanently keep iommu_dev pointer in arch_data
>   iommu/omap: Set dev->archdata.iommu = NULL in omap_iommu_remove_device
>   iommu/omap: Make use of 'struct iommu_device'
>   iommu/omap: Add iommu-group support
> 
>  drivers/iommu/omap-iommu.c               | 137 ++++++++++++++++++++-----------
>  drivers/iommu/omap-iommu.h               |  35 ++++++++
>  include/linux/platform_data/iommu-omap.h |  15 ----
>  3 files changed, 124 insertions(+), 63 deletions(-)
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web