Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-30 Thread Gary R Hook
On 04/17/2018 12:38 PM, Hook, Gary wrote: On 4/13/2018 8:08 PM, Mehta, Sohil wrote: On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: + + +    mutex_lock(_iommu_debugfs_lock); +    if (!amd_iommu_debugfs) { +    d_top = iommu_debugfs_setup(); +    if (d_top) +   

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-30 Thread Gary R Hook
On 04/17/2018 12:38 PM, Hook, Gary wrote: On 4/13/2018 8:08 PM, Mehta, Sohil wrote: On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: + + +    mutex_lock(_iommu_debugfs_lock); +    if (!amd_iommu_debugfs) { +    d_top = iommu_debugfs_setup(); +    if (d_top) +   

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-18 Thread Yang, Shunyong
Hi, Gary, On Wed, 2018-04-18 at 16:51 -0400, Hook, Gary wrote: > On 4/18/2018 4:16 PM, Mehta, Sohil wrote: > > > > On Wed, 2018-04-18 at 08:31 +, Yang, Shunyong wrote: > > > > > > Maybe the original design is to call debugfs_initialized() before > > > calling debugfs_create_xxx()? > > I am

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-18 Thread Yang, Shunyong
Hi, Gary, On Wed, 2018-04-18 at 16:51 -0400, Hook, Gary wrote: > On 4/18/2018 4:16 PM, Mehta, Sohil wrote: > > > > On Wed, 2018-04-18 at 08:31 +, Yang, Shunyong wrote: > > > > > > Maybe the original design is to call debugfs_initialized() before > > > calling debugfs_create_xxx()? > > I am

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-18 Thread Hook, Gary
On 4/18/2018 4:16 PM, Mehta, Sohil wrote: On Wed, 2018-04-18 at 08:31 +, Yang, Shunyong wrote: Maybe the original design is to call debugfs_initialized() before calling debugfs_create_xxx()? I am unaware of the original design. Someone else would probably have more context. However,

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-18 Thread Hook, Gary
On 4/18/2018 4:16 PM, Mehta, Sohil wrote: On Wed, 2018-04-18 at 08:31 +, Yang, Shunyong wrote: Maybe the original design is to call debugfs_initialized() before calling debugfs_create_xxx()? I am unaware of the original design. Someone else would probably have more context. However,

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-18 Thread Mehta, Sohil
On Wed, 2018-04-18 at 08:31 +, Yang, Shunyong wrote: > Maybe the original design is to call debugfs_initialized() before > calling debugfs_create_xxx()? I am unaware of the original design. Someone else would probably have more context. However, looking at other places in the kernel where

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-18 Thread Mehta, Sohil
On Wed, 2018-04-18 at 08:31 +, Yang, Shunyong wrote: > Maybe the original design is to call debugfs_initialized() before > calling debugfs_create_xxx()? I am unaware of the original design. Someone else would probably have more context. However, looking at other places in the kernel where

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-18 Thread Yang, Shunyong
Hi, Sohil On Wed, 2018-04-18 at 07:27 +, Mehta, Sohil wrote: > On Wed, 2018-04-18 at 05:58 +, Yang, Shunyong wrote: > > > > Hi, Gary and Sohil, > > > > On Tue, 2018-04-17 at 13:38 -0400, Hook, Gary wrote: > > > > > > On 4/13/2018 8:08 PM, Mehta, Sohil wrote: > > > > > > > >   > > > >

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-18 Thread Yang, Shunyong
Hi, Sohil On Wed, 2018-04-18 at 07:27 +, Mehta, Sohil wrote: > On Wed, 2018-04-18 at 05:58 +, Yang, Shunyong wrote: > > > > Hi, Gary and Sohil, > > > > On Tue, 2018-04-17 at 13:38 -0400, Hook, Gary wrote: > > > > > > On 4/13/2018 8:08 PM, Mehta, Sohil wrote: > > > > > > > >   > > > >

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-18 Thread Mehta, Sohil
On Wed, 2018-04-18 at 05:58 +, Yang, Shunyong wrote: > Hi, Gary and Sohil, > > On Tue, 2018-04-17 at 13:38 -0400, Hook, Gary wrote: > > On 4/13/2018 8:08 PM, Mehta, Sohil wrote: > > >  > > > On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: > > > >  > > > >    > > > > + > > > > +void

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-18 Thread Mehta, Sohil
On Wed, 2018-04-18 at 05:58 +, Yang, Shunyong wrote: > Hi, Gary and Sohil, > > On Tue, 2018-04-17 at 13:38 -0400, Hook, Gary wrote: > > On 4/13/2018 8:08 PM, Mehta, Sohil wrote: > > >  > > > On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: > > > >  > > > >    > > > > + > > > > +void

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-18 Thread Yang, Shunyong
Hi, Gary and Sohil, On Tue, 2018-04-17 at 13:38 -0400, Hook, Gary wrote: > On 4/13/2018 8:08 PM, Mehta, Sohil wrote: > > > > On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: > > > > > >    > > > + > > > +void amd_iommu_debugfs_setup(struct amd_iommu *iommu) > > > +{ > > > + char

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-18 Thread Yang, Shunyong
Hi, Gary and Sohil, On Tue, 2018-04-17 at 13:38 -0400, Hook, Gary wrote: > On 4/13/2018 8:08 PM, Mehta, Sohil wrote: > > > > On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: > > > > > >    > > > + > > > +void amd_iommu_debugfs_setup(struct amd_iommu *iommu) > > > +{ > > > + char

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-17 Thread Robin Murphy
On 17/04/18 18:42, Hook, Gary wrote: On 4/16/2018 8:52 PM, Mehta, Sohil wrote: On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile index 5eb1121d54b9..0ca250f626d9 100644 --- a/drivers/iommu/Makefile +++ b/drivers/iommu/Makefile

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-17 Thread Robin Murphy
On 17/04/18 18:42, Hook, Gary wrote: On 4/16/2018 8:52 PM, Mehta, Sohil wrote: On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile index 5eb1121d54b9..0ca250f626d9 100644 --- a/drivers/iommu/Makefile +++ b/drivers/iommu/Makefile

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-17 Thread Hook, Gary
On 4/16/2018 8:52 PM, Mehta, Sohil wrote: On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile index 5eb1121d54b9..0ca250f626d9 100644 --- a/drivers/iommu/Makefile +++ b/drivers/iommu/Makefile @@ -11,6 +11,7 @@

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-17 Thread Hook, Gary
On 4/16/2018 8:52 PM, Mehta, Sohil wrote: On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile index 5eb1121d54b9..0ca250f626d9 100644 --- a/drivers/iommu/Makefile +++ b/drivers/iommu/Makefile @@ -11,6 +11,7 @@

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-17 Thread Hook, Gary
On 4/13/2018 8:08 PM, Mehta, Sohil wrote: On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: + +void amd_iommu_debugfs_setup(struct amd_iommu *iommu) +{ + char name[MAX_NAME_LEN + 1]; + struct dentry *d_top; + + if (!debugfs_initialized()) Probably not needed. Right.

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-17 Thread Hook, Gary
On 4/13/2018 8:08 PM, Mehta, Sohil wrote: On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: + +void amd_iommu_debugfs_setup(struct amd_iommu *iommu) +{ + char name[MAX_NAME_LEN + 1]; + struct dentry *d_top; + + if (!debugfs_initialized()) Probably not needed. Right.

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-16 Thread Mehta, Sohil
On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: > > diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile > index 5eb1121d54b9..0ca250f626d9 100644 > --- a/drivers/iommu/Makefile > +++ b/drivers/iommu/Makefile > @@ -11,6 +11,7 @@ obj-$(CONFIG_IOMMU_IOVA) += iova.o >  

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-16 Thread Mehta, Sohil
On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: > > diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile > index 5eb1121d54b9..0ca250f626d9 100644 > --- a/drivers/iommu/Makefile > +++ b/drivers/iommu/Makefile > @@ -11,6 +11,7 @@ obj-$(CONFIG_IOMMU_IOVA) += iova.o >  

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-13 Thread Mehta, Sohil
On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: >  > + > +void amd_iommu_debugfs_setup(struct amd_iommu *iommu) > +{ > + char name[MAX_NAME_LEN + 1]; > + struct dentry *d_top; > + > + if (!debugfs_initialized()) Probably not needed. > + return; > + > +

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-13 Thread Mehta, Sohil
On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: >  > + > +void amd_iommu_debugfs_setup(struct amd_iommu *iommu) > +{ > + char name[MAX_NAME_LEN + 1]; > + struct dentry *d_top; > + > + if (!debugfs_initialized()) Probably not needed. > + return; > + > +