Re: [PATCH 12/17] iommu/omap: Integrate omap-iommu-debug into omap-iommu

2014-10-22 Thread Joerg Roedel
On Tue, Oct 21, 2014 at 04:28:27PM -0500, Suman Anna wrote:
 I am looking to refresh this series for 3.19, and this is the only patch
 that may need some changes. Please let me know what your preference is,
 and I can rework this patch if needed. Either way,
 the plan is to not have an OMAP IOMMU debugfs module, but only to
 have an option not to build the debugfs portions.

Can I apply this series without this patch and you send me an updated
version of only this patch? If yes, please let me know, otherwise please
rebase the series on v3.18-rc1 and resend.

Thanks,

Joerg

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 12/17] iommu/omap: Integrate omap-iommu-debug into omap-iommu

2014-10-22 Thread Suman Anna
Hi Joerg,

On 10/22/2014 08:29 AM, Joerg Roedel wrote:
 On Tue, Oct 21, 2014 at 04:28:27PM -0500, Suman Anna wrote:
 I am looking to refresh this series for 3.19, and this is the only patch
 that may need some changes. Please let me know what your preference is,
 and I can rework this patch if needed. Either way,
 the plan is to not have an OMAP IOMMU debugfs module, but only to
 have an option not to build the debugfs portions.
 
 Can I apply this series without this patch and you send me an updated
 version of only this patch? If yes, please let me know, otherwise please
 rebase the series on v3.18-rc1 and resend.

Some of the patches following this patch don't apply without this patch,
so this patch alone cannot be dropped. The preceding patches (Patches 1
through 11) are not affected though. I will rebase and resend the entire
series.

regards
Suman


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 12/17] iommu/omap: Integrate omap-iommu-debug into omap-iommu

2014-10-21 Thread Suman Anna
Hi Joerg,

On 10/01/2014 11:07 AM, Anna, Suman wrote:
 Hi Laurent,
 
 On Tuesday 30 September 2014 16:16:07 Suman Anna wrote:
 The debugfs support for OMAP IOMMU is currently implemented
 as a module, warranting certain OMAP-specific IOMMU API to
 be exported. The OMAP IOMMU, when enabled, can only be built-in
 into the kernel, so integrate the OMAP IOMMU debug module
 into the OMAP IOMMU driver. This helps in eliminating the
 need to export most of the current OMAP IOMMU API.

 The following are the main changes:
 - The OMAP_IOMMU_DEBUG Kconfig option is eliminated, and
   the OMAP IOMMU debugfs support is built alongside the OMAP
   IOMMU driver, and enabled automatically only when debugfs
   is enabled.

 That's the part I'm unsure about. We're loosing the ability to save space by 
 not building the omap-iommu debugfs support when debugfs is enabled.
 
 Yeah, I thought about it a bit, and went in favor of eliminating the
 Kconfig. I don't have a strong opinion on this, but if saving space is
 what is preferred, I can easily rework this patch to add it back.
 
 Joerg, any preference which way we should go here?

I am looking to refresh this series for 3.19, and this is the only patch
that may need some changes. Please let me know what your preference is,
and I can rework this patch if needed. Either way,
the plan is to not have an OMAP IOMMU debugfs module, but only to
have an option not to build the debugfs portions.

regards
Suman

 

 For the rest of the series,

 Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
 
 Thank you for reviewing the patches.
 
 regards
 Suman
 

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 12/17] iommu/omap: Integrate omap-iommu-debug into omap-iommu

2014-10-01 Thread Laurent Pinchart
Hi Suman,

Thank you for the patch.

On Tuesday 30 September 2014 16:16:07 Suman Anna wrote:
 The debugfs support for OMAP IOMMU is currently implemented
 as a module, warranting certain OMAP-specific IOMMU API to
 be exported. The OMAP IOMMU, when enabled, can only be built-in
 into the kernel, so integrate the OMAP IOMMU debug module
 into the OMAP IOMMU driver. This helps in eliminating the
 need to export most of the current OMAP IOMMU API.
 
 The following are the main changes:
 - The OMAP_IOMMU_DEBUG Kconfig option is eliminated, and
   the OMAP IOMMU debugfs support is built alongside the OMAP
   IOMMU driver, and enabled automatically only when debugfs
   is enabled.

That's the part I'm unsure about. We're loosing the ability to save space by 
not building the omap-iommu debugfs support when debugfs is enabled.

For the rest of the series,

Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com

 - The debugfs directory and entry creation logic is reversed,
   the calls are invoked by the OMAP IOMMU driver now.
 - The current iffy circular logic of adding IOMMU archdata
   to the IOMMU devices itself to get a pointer to the omap_iommu
   object in the debugfs support code is replaced by directly
   using the omap_iommu structure while creating the debugfs
   entries.
 - The debugfs root directory is renamed from the generic name
   iommu to a specific name omap_iommu.
 - Unneeded headers have also been cleaned up while at this.
 - There will no longer be a omap-iommu-debug.ko module after
   this patch.
 
 Signed-off-by: Suman Anna s-a...@ti.com
 ---
  drivers/iommu/Kconfig|   9 
  drivers/iommu/Makefile   |   3 +-
  drivers/iommu/omap-iommu-debug.c | 102
 --- drivers/iommu/omap-iommu.c   | 
 11 +++--
  drivers/iommu/omap-iommu.h   |   7 +++
  5 files changed, 45 insertions(+), 87 deletions(-)
 
 diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
 index dd51122..9724d4a 100644
 --- a/drivers/iommu/Kconfig
 +++ b/drivers/iommu/Kconfig
 @@ -143,15 +143,6 @@ config OMAP_IOMMU
   depends on ARCH_OMAP2PLUS
   select IOMMU_API
 
 -config OMAP_IOMMU_DEBUG
 -   tristate Export OMAP IOMMU internals in DebugFS
 -   depends on OMAP_IOMMU  DEBUG_FS
 -   help
 - Select this to see extensive information about
 - the internal state of OMAP IOMMU in debugfs.
 -
 - Say N unless you know you need this.
 -
  config TEGRA_IOMMU_GART
   bool Tegra GART IOMMU Support
   depends on ARCH_TEGRA_2x_SOC
 diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile
 index 18fa446..e0a4fed 100644
 --- a/drivers/iommu/Makefile
 +++ b/drivers/iommu/Makefile
 @@ -10,8 +10,7 @@ obj-$(CONFIG_DMAR_TABLE) += dmar.o
  obj-$(CONFIG_INTEL_IOMMU) += iova.o intel-iommu.o
  obj-$(CONFIG_IPMMU_VMSA) += ipmmu-vmsa.o
  obj-$(CONFIG_IRQ_REMAP) += intel_irq_remapping.o irq_remapping.o
 -obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o
 -obj-$(CONFIG_OMAP_IOMMU_DEBUG) += omap-iommu-debug.o
 +obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o omap-iommu-debug.o
  obj-$(CONFIG_TEGRA_IOMMU_GART) += tegra-gart.o
  obj-$(CONFIG_TEGRA_IOMMU_SMMU) += tegra-smmu.o
  obj-$(CONFIG_EXYNOS_IOMMU) += exynos-iommu.o
 diff --git a/drivers/iommu/omap-iommu-debug.c
 b/drivers/iommu/omap-iommu-debug.c index 28de657..54a0dc6 100644
 --- a/drivers/iommu/omap-iommu-debug.c
 +++ b/drivers/iommu/omap-iommu-debug.c
 @@ -10,15 +10,11 @@
   * published by the Free Software Foundation.
   */
 
 -#include linux/module.h
  #include linux/err.h
 -#include linux/clk.h
  #include linux/io.h
  #include linux/slab.h
  #include linux/uaccess.h
 -#include linux/platform_device.h
  #include linux/debugfs.h
 -#include linux/omap-iommu.h
  #include linux/platform_data/iommu-omap.h
 
  #include omap-iopgtable.h
 @@ -31,8 +27,7 @@ static struct dentry *iommu_debug_root;
  static ssize_t debug_read_regs(struct file *file, char __user *userbuf,
  size_t count, loff_t *ppos)
  {
 - struct device *dev = file-private_data;
 - struct omap_iommu *obj = dev_to_omap_iommu(dev);
 + struct omap_iommu *obj = file-private_data;
   char *p, *buf;
   ssize_t bytes;
 
 @@ -55,8 +50,7 @@ static ssize_t debug_read_regs(struct file *file, char
 __user *userbuf, static ssize_t debug_read_tlb(struct file *file, char
 __user *userbuf, size_t count, loff_t *ppos)
  {
 - struct device *dev = file-private_data;
 - struct omap_iommu *obj = dev_to_omap_iommu(dev);
 + struct omap_iommu *obj = file-private_data;
   char *p, *buf;
   ssize_t bytes, rest;
 
 @@ -141,8 +135,7 @@ out:
  static ssize_t debug_read_pagetable(struct file *file, char __user
 *userbuf, size_t count, loff_t *ppos)
  {
 - struct device *dev = file-private_data;
 - struct omap_iommu *obj = dev_to_omap_iommu(dev);
 + struct omap_iommu *obj = file-private_data;
   char *p, *buf;
   size_t bytes;
 
 @@ -181,93 +174,58 @@ 

Re: [PATCH 12/17] iommu/omap: Integrate omap-iommu-debug into omap-iommu

2014-10-01 Thread Suman Anna
Hi Laurent,

 On Tuesday 30 September 2014 16:16:07 Suman Anna wrote:
 The debugfs support for OMAP IOMMU is currently implemented
 as a module, warranting certain OMAP-specific IOMMU API to
 be exported. The OMAP IOMMU, when enabled, can only be built-in
 into the kernel, so integrate the OMAP IOMMU debug module
 into the OMAP IOMMU driver. This helps in eliminating the
 need to export most of the current OMAP IOMMU API.

 The following are the main changes:
 - The OMAP_IOMMU_DEBUG Kconfig option is eliminated, and
   the OMAP IOMMU debugfs support is built alongside the OMAP
   IOMMU driver, and enabled automatically only when debugfs
   is enabled.
 
 That's the part I'm unsure about. We're loosing the ability to save space by 
 not building the omap-iommu debugfs support when debugfs is enabled.

Yeah, I thought about it a bit, and went in favor of eliminating the
Kconfig. I don't have a strong opinion on this, but if saving space is
what is preferred, I can easily rework this patch to add it back.

Joerg, any preference which way we should go here?

 
 For the rest of the series,
 
 Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com

Thank you for reviewing the patches.

regards
Suman

 
 - The debugfs directory and entry creation logic is reversed,
   the calls are invoked by the OMAP IOMMU driver now.
 - The current iffy circular logic of adding IOMMU archdata
   to the IOMMU devices itself to get a pointer to the omap_iommu
   object in the debugfs support code is replaced by directly
   using the omap_iommu structure while creating the debugfs
   entries.
 - The debugfs root directory is renamed from the generic name
   iommu to a specific name omap_iommu.
 - Unneeded headers have also been cleaned up while at this.
 - There will no longer be a omap-iommu-debug.ko module after
   this patch.

 Signed-off-by: Suman Anna s-a...@ti.com
 ---
  drivers/iommu/Kconfig|   9 
  drivers/iommu/Makefile   |   3 +-
  drivers/iommu/omap-iommu-debug.c | 102
 --- drivers/iommu/omap-iommu.c   | 
 11 +++--
  drivers/iommu/omap-iommu.h   |   7 +++
  5 files changed, 45 insertions(+), 87 deletions(-)

 diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
 index dd51122..9724d4a 100644
 --- a/drivers/iommu/Kconfig
 +++ b/drivers/iommu/Kconfig
 @@ -143,15 +143,6 @@ config OMAP_IOMMU
  depends on ARCH_OMAP2PLUS
  select IOMMU_API

 -config OMAP_IOMMU_DEBUG
 -   tristate Export OMAP IOMMU internals in DebugFS
 -   depends on OMAP_IOMMU  DEBUG_FS
 -   help
 - Select this to see extensive information about
 - the internal state of OMAP IOMMU in debugfs.
 -
 - Say N unless you know you need this.
 -
  config TEGRA_IOMMU_GART
  bool Tegra GART IOMMU Support
  depends on ARCH_TEGRA_2x_SOC
 diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile
 index 18fa446..e0a4fed 100644
 --- a/drivers/iommu/Makefile
 +++ b/drivers/iommu/Makefile
 @@ -10,8 +10,7 @@ obj-$(CONFIG_DMAR_TABLE) += dmar.o
  obj-$(CONFIG_INTEL_IOMMU) += iova.o intel-iommu.o
  obj-$(CONFIG_IPMMU_VMSA) += ipmmu-vmsa.o
  obj-$(CONFIG_IRQ_REMAP) += intel_irq_remapping.o irq_remapping.o
 -obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o
 -obj-$(CONFIG_OMAP_IOMMU_DEBUG) += omap-iommu-debug.o
 +obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o omap-iommu-debug.o
  obj-$(CONFIG_TEGRA_IOMMU_GART) += tegra-gart.o
  obj-$(CONFIG_TEGRA_IOMMU_SMMU) += tegra-smmu.o
  obj-$(CONFIG_EXYNOS_IOMMU) += exynos-iommu.o
 diff --git a/drivers/iommu/omap-iommu-debug.c
 b/drivers/iommu/omap-iommu-debug.c index 28de657..54a0dc6 100644
 --- a/drivers/iommu/omap-iommu-debug.c
 +++ b/drivers/iommu/omap-iommu-debug.c
 @@ -10,15 +10,11 @@
   * published by the Free Software Foundation.
   */

 -#include linux/module.h
  #include linux/err.h
 -#include linux/clk.h
  #include linux/io.h
  #include linux/slab.h
  #include linux/uaccess.h
 -#include linux/platform_device.h
  #include linux/debugfs.h
 -#include linux/omap-iommu.h
  #include linux/platform_data/iommu-omap.h

  #include omap-iopgtable.h
 @@ -31,8 +27,7 @@ static struct dentry *iommu_debug_root;
  static ssize_t debug_read_regs(struct file *file, char __user *userbuf,
 size_t count, loff_t *ppos)
  {
 -struct device *dev = file-private_data;
 -struct omap_iommu *obj = dev_to_omap_iommu(dev);
 +struct omap_iommu *obj = file-private_data;
  char *p, *buf;
  ssize_t bytes;

 @@ -55,8 +50,7 @@ static ssize_t debug_read_regs(struct file *file, char
 __user *userbuf, static ssize_t debug_read_tlb(struct file *file, char
 __user *userbuf, size_t count, loff_t *ppos)
  {
 -struct device *dev = file-private_data;
 -struct omap_iommu *obj = dev_to_omap_iommu(dev);
 +struct omap_iommu *obj = file-private_data;
  char *p, *buf;
  ssize_t bytes, rest;

 @@ -141,8 +135,7 @@ out:
  static ssize_t debug_read_pagetable(struct file *file, char __user
 *userbuf, 

[PATCH 12/17] iommu/omap: Integrate omap-iommu-debug into omap-iommu

2014-09-30 Thread Suman Anna
The debugfs support for OMAP IOMMU is currently implemented
as a module, warranting certain OMAP-specific IOMMU API to
be exported. The OMAP IOMMU, when enabled, can only be built-in
into the kernel, so integrate the OMAP IOMMU debug module
into the OMAP IOMMU driver. This helps in eliminating the
need to export most of the current OMAP IOMMU API.

The following are the main changes:
- The OMAP_IOMMU_DEBUG Kconfig option is eliminated, and
  the OMAP IOMMU debugfs support is built alongside the OMAP
  IOMMU driver, and enabled automatically only when debugfs
  is enabled.
- The debugfs directory and entry creation logic is reversed,
  the calls are invoked by the OMAP IOMMU driver now.
- The current iffy circular logic of adding IOMMU archdata
  to the IOMMU devices itself to get a pointer to the omap_iommu
  object in the debugfs support code is replaced by directly
  using the omap_iommu structure while creating the debugfs
  entries.
- The debugfs root directory is renamed from the generic name
  iommu to a specific name omap_iommu.
- Unneeded headers have also been cleaned up while at this.
- There will no longer be a omap-iommu-debug.ko module after
  this patch.

Signed-off-by: Suman Anna s-a...@ti.com
---
 drivers/iommu/Kconfig|   9 
 drivers/iommu/Makefile   |   3 +-
 drivers/iommu/omap-iommu-debug.c | 102 ---
 drivers/iommu/omap-iommu.c   |  11 +++--
 drivers/iommu/omap-iommu.h   |   7 +++
 5 files changed, 45 insertions(+), 87 deletions(-)

diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index dd51122..9724d4a 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -143,15 +143,6 @@ config OMAP_IOMMU
depends on ARCH_OMAP2PLUS
select IOMMU_API
 
-config OMAP_IOMMU_DEBUG
-   tristate Export OMAP IOMMU internals in DebugFS
-   depends on OMAP_IOMMU  DEBUG_FS
-   help
- Select this to see extensive information about
- the internal state of OMAP IOMMU in debugfs.
-
- Say N unless you know you need this.
-
 config TEGRA_IOMMU_GART
bool Tegra GART IOMMU Support
depends on ARCH_TEGRA_2x_SOC
diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile
index 18fa446..e0a4fed 100644
--- a/drivers/iommu/Makefile
+++ b/drivers/iommu/Makefile
@@ -10,8 +10,7 @@ obj-$(CONFIG_DMAR_TABLE) += dmar.o
 obj-$(CONFIG_INTEL_IOMMU) += iova.o intel-iommu.o
 obj-$(CONFIG_IPMMU_VMSA) += ipmmu-vmsa.o
 obj-$(CONFIG_IRQ_REMAP) += intel_irq_remapping.o irq_remapping.o
-obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o
-obj-$(CONFIG_OMAP_IOMMU_DEBUG) += omap-iommu-debug.o
+obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o omap-iommu-debug.o
 obj-$(CONFIG_TEGRA_IOMMU_GART) += tegra-gart.o
 obj-$(CONFIG_TEGRA_IOMMU_SMMU) += tegra-smmu.o
 obj-$(CONFIG_EXYNOS_IOMMU) += exynos-iommu.o
diff --git a/drivers/iommu/omap-iommu-debug.c b/drivers/iommu/omap-iommu-debug.c
index 28de657..54a0dc6 100644
--- a/drivers/iommu/omap-iommu-debug.c
+++ b/drivers/iommu/omap-iommu-debug.c
@@ -10,15 +10,11 @@
  * published by the Free Software Foundation.
  */
 
-#include linux/module.h
 #include linux/err.h
-#include linux/clk.h
 #include linux/io.h
 #include linux/slab.h
 #include linux/uaccess.h
-#include linux/platform_device.h
 #include linux/debugfs.h
-#include linux/omap-iommu.h
 #include linux/platform_data/iommu-omap.h
 
 #include omap-iopgtable.h
@@ -31,8 +27,7 @@ static struct dentry *iommu_debug_root;
 static ssize_t debug_read_regs(struct file *file, char __user *userbuf,
   size_t count, loff_t *ppos)
 {
-   struct device *dev = file-private_data;
-   struct omap_iommu *obj = dev_to_omap_iommu(dev);
+   struct omap_iommu *obj = file-private_data;
char *p, *buf;
ssize_t bytes;
 
@@ -55,8 +50,7 @@ static ssize_t debug_read_regs(struct file *file, char __user 
*userbuf,
 static ssize_t debug_read_tlb(struct file *file, char __user *userbuf,
  size_t count, loff_t *ppos)
 {
-   struct device *dev = file-private_data;
-   struct omap_iommu *obj = dev_to_omap_iommu(dev);
+   struct omap_iommu *obj = file-private_data;
char *p, *buf;
ssize_t bytes, rest;
 
@@ -141,8 +135,7 @@ out:
 static ssize_t debug_read_pagetable(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
 {
-   struct device *dev = file-private_data;
-   struct omap_iommu *obj = dev_to_omap_iommu(dev);
+   struct omap_iommu *obj = file-private_data;
char *p, *buf;
size_t bytes;
 
@@ -181,93 +174,58 @@ DEBUG_FOPS_RO(pagetable);
 #define __DEBUG_ADD_FILE(attr, mode)   \
{   \
struct dentry *dent;\
-   dent = debugfs_create_file(#attr, mode, parent, \
-