* [PATCH v2] swiotlb: fix implicit debugfs_create_dir declaration
@ 2021-06-29 12:16 ` Claire Chang
0 siblings, 0 replies; 6+ messages in thread
From: Claire Chang @ 2021-06-29 12:16 UTC (permalink / raw)
To: konrad.wilk, hch, m.szyprowski, robin.murphy, Will Deacon, sstabellini
Cc: iommu, linux-kernel, tfiga, Nicolas Boichat, Claire Chang,
kernel test robot
Remove the ifdef to fix implicit function declaration for other pools.
Fixes: 1d9f94400a7a ("swiotlb: Refactor swiotlb_create_debugfs")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Claire Chang <tientzu@chromium.org>
---
kernel/dma/swiotlb.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index 0ffbaae9fba2..8ae0bef392c3 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -36,9 +36,7 @@
#include <linux/scatterlist.h>
#include <linux/mem_encrypt.h>
#include <linux/set_memory.h>
-#ifdef CONFIG_DEBUG_FS
#include <linux/debugfs.h>
-#endif
#ifdef CONFIG_DMA_RESTRICTED_POOL
#include <linux/io.h>
#include <linux/of.h>
@@ -686,7 +684,6 @@ bool is_swiotlb_active(struct device *dev)
}
EXPORT_SYMBOL_GPL(is_swiotlb_active);
-#ifdef CONFIG_DEBUG_FS
static struct dentry *debugfs_dir;
static void swiotlb_create_debugfs_files(struct io_tlb_mem *mem)
@@ -709,8 +706,6 @@ static int __init swiotlb_create_default_debugfs(void)
late_initcall(swiotlb_create_default_debugfs);
-#endif
-
#ifdef CONFIG_DMA_RESTRICTED_POOL
struct page *swiotlb_alloc(struct device *dev, size_t size)
{
--
2.32.0.93.g670b81a890-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2] swiotlb: fix implicit debugfs_create_dir declaration
@ 2021-06-29 12:16 ` Claire Chang
0 siblings, 0 replies; 6+ messages in thread
From: Claire Chang @ 2021-06-29 12:16 UTC (permalink / raw)
To: konrad.wilk, hch, m.szyprowski, robin.murphy, Will Deacon, sstabellini
Cc: Nicolas Boichat, kernel test robot, linux-kernel, iommu, Claire Chang
Remove the ifdef to fix implicit function declaration for other pools.
Fixes: 1d9f94400a7a ("swiotlb: Refactor swiotlb_create_debugfs")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Claire Chang <tientzu@chromium.org>
---
kernel/dma/swiotlb.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index 0ffbaae9fba2..8ae0bef392c3 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -36,9 +36,7 @@
#include <linux/scatterlist.h>
#include <linux/mem_encrypt.h>
#include <linux/set_memory.h>
-#ifdef CONFIG_DEBUG_FS
#include <linux/debugfs.h>
-#endif
#ifdef CONFIG_DMA_RESTRICTED_POOL
#include <linux/io.h>
#include <linux/of.h>
@@ -686,7 +684,6 @@ bool is_swiotlb_active(struct device *dev)
}
EXPORT_SYMBOL_GPL(is_swiotlb_active);
-#ifdef CONFIG_DEBUG_FS
static struct dentry *debugfs_dir;
static void swiotlb_create_debugfs_files(struct io_tlb_mem *mem)
@@ -709,8 +706,6 @@ static int __init swiotlb_create_default_debugfs(void)
late_initcall(swiotlb_create_default_debugfs);
-#endif
-
#ifdef CONFIG_DMA_RESTRICTED_POOL
struct page *swiotlb_alloc(struct device *dev, size_t size)
{
--
2.32.0.93.g670b81a890-goog
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] swiotlb: fix implicit debugfs_create_dir declaration
2021-06-29 12:16 ` Claire Chang
@ 2021-06-29 12:52 ` Robin Murphy
-1 siblings, 0 replies; 6+ messages in thread
From: Robin Murphy @ 2021-06-29 12:52 UTC (permalink / raw)
To: Claire Chang, konrad.wilk, hch, m.szyprowski, Will Deacon, sstabellini
Cc: iommu, linux-kernel, tfiga, Nicolas Boichat, kernel test robot
On 2021-06-29 13:16, Claire Chang wrote:
> Remove the ifdef to fix implicit function declaration for other pools.
>
> Fixes: 1d9f94400a7a ("swiotlb: Refactor swiotlb_create_debugfs")
There doesn't appear to be a problem with that commit - AFAICS it's
461021875c50 ("swiotlb: Add restricted DMA pool initialization") which
introduces a reference to debugfs_create_dir() outside the existing
#ifdef guards.
FWIW (assuming it's the real problem) I'd be inclined to factor out the
debugfs bits from rmem_swiotlb_device_init() into a separate
rmem_swiotlb_debugfs_init() (or similar) function which can live
alongside the others under the #ifdef and be stubbed out in an #else case.
Robin.
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Claire Chang <tientzu@chromium.org>
> ---
> kernel/dma/swiotlb.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
> index 0ffbaae9fba2..8ae0bef392c3 100644
> --- a/kernel/dma/swiotlb.c
> +++ b/kernel/dma/swiotlb.c
> @@ -36,9 +36,7 @@
> #include <linux/scatterlist.h>
> #include <linux/mem_encrypt.h>
> #include <linux/set_memory.h>
> -#ifdef CONFIG_DEBUG_FS
> #include <linux/debugfs.h>
> -#endif
> #ifdef CONFIG_DMA_RESTRICTED_POOL
> #include <linux/io.h>
> #include <linux/of.h>
> @@ -686,7 +684,6 @@ bool is_swiotlb_active(struct device *dev)
> }
> EXPORT_SYMBOL_GPL(is_swiotlb_active);
>
> -#ifdef CONFIG_DEBUG_FS
> static struct dentry *debugfs_dir;
>
> static void swiotlb_create_debugfs_files(struct io_tlb_mem *mem)
> @@ -709,8 +706,6 @@ static int __init swiotlb_create_default_debugfs(void)
>
> late_initcall(swiotlb_create_default_debugfs);
>
> -#endif
> -
> #ifdef CONFIG_DMA_RESTRICTED_POOL
> struct page *swiotlb_alloc(struct device *dev, size_t size)
> {
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] swiotlb: fix implicit debugfs_create_dir declaration
@ 2021-06-29 12:52 ` Robin Murphy
0 siblings, 0 replies; 6+ messages in thread
From: Robin Murphy @ 2021-06-29 12:52 UTC (permalink / raw)
To: Claire Chang, konrad.wilk, hch, m.szyprowski, Will Deacon, sstabellini
Cc: kernel test robot, iommu, Nicolas Boichat, linux-kernel
On 2021-06-29 13:16, Claire Chang wrote:
> Remove the ifdef to fix implicit function declaration for other pools.
>
> Fixes: 1d9f94400a7a ("swiotlb: Refactor swiotlb_create_debugfs")
There doesn't appear to be a problem with that commit - AFAICS it's
461021875c50 ("swiotlb: Add restricted DMA pool initialization") which
introduces a reference to debugfs_create_dir() outside the existing
#ifdef guards.
FWIW (assuming it's the real problem) I'd be inclined to factor out the
debugfs bits from rmem_swiotlb_device_init() into a separate
rmem_swiotlb_debugfs_init() (or similar) function which can live
alongside the others under the #ifdef and be stubbed out in an #else case.
Robin.
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Claire Chang <tientzu@chromium.org>
> ---
> kernel/dma/swiotlb.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
> index 0ffbaae9fba2..8ae0bef392c3 100644
> --- a/kernel/dma/swiotlb.c
> +++ b/kernel/dma/swiotlb.c
> @@ -36,9 +36,7 @@
> #include <linux/scatterlist.h>
> #include <linux/mem_encrypt.h>
> #include <linux/set_memory.h>
> -#ifdef CONFIG_DEBUG_FS
> #include <linux/debugfs.h>
> -#endif
> #ifdef CONFIG_DMA_RESTRICTED_POOL
> #include <linux/io.h>
> #include <linux/of.h>
> @@ -686,7 +684,6 @@ bool is_swiotlb_active(struct device *dev)
> }
> EXPORT_SYMBOL_GPL(is_swiotlb_active);
>
> -#ifdef CONFIG_DEBUG_FS
> static struct dentry *debugfs_dir;
>
> static void swiotlb_create_debugfs_files(struct io_tlb_mem *mem)
> @@ -709,8 +706,6 @@ static int __init swiotlb_create_default_debugfs(void)
>
> late_initcall(swiotlb_create_default_debugfs);
>
> -#endif
> -
> #ifdef CONFIG_DMA_RESTRICTED_POOL
> struct page *swiotlb_alloc(struct device *dev, size_t size)
> {
>
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] swiotlb: fix implicit debugfs_create_dir declaration
2021-06-29 12:52 ` Robin Murphy
@ 2021-06-30 4:07 ` Claire Chang
-1 siblings, 0 replies; 6+ messages in thread
From: Claire Chang @ 2021-06-30 4:07 UTC (permalink / raw)
To: Robin Murphy
Cc: Konrad Rzeszutek Wilk, Christoph Hellwig, Marek Szyprowski,
Will Deacon, Stefano Stabellini,
list@263.net:IOMMU DRIVERS
<iommu@lists.linux-foundation.org>,
Joerg Roedel <joro@8bytes.org>,,
lkml, Tomasz Figa, Nicolas Boichat, kernel test robot
On Tue, Jun 29, 2021 at 8:52 PM Robin Murphy <robin.murphy@arm.com> wrote:
>
> On 2021-06-29 13:16, Claire Chang wrote:
> > Remove the ifdef to fix implicit function declaration for other pools.
> >
> > Fixes: 1d9f94400a7a ("swiotlb: Refactor swiotlb_create_debugfs")
>
> There doesn't appear to be a problem with that commit - AFAICS it's
> 461021875c50 ("swiotlb: Add restricted DMA pool initialization") which
> introduces a reference to debugfs_create_dir() outside the existing
> #ifdef guards.
>
> FWIW (assuming it's the real problem) I'd be inclined to factor out the
> debugfs bits from rmem_swiotlb_device_init() into a separate
> rmem_swiotlb_debugfs_init() (or similar) function which can live
> alongside the others under the #ifdef and be stubbed out in an #else case.
v3 here: https://lore.kernel.org/patchwork/patch/1452807/
>
> Robin.
>
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Claire Chang <tientzu@chromium.org>
> > ---
> > kernel/dma/swiotlb.c | 5 -----
> > 1 file changed, 5 deletions(-)
> >
> > diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
> > index 0ffbaae9fba2..8ae0bef392c3 100644
> > --- a/kernel/dma/swiotlb.c
> > +++ b/kernel/dma/swiotlb.c
> > @@ -36,9 +36,7 @@
> > #include <linux/scatterlist.h>
> > #include <linux/mem_encrypt.h>
> > #include <linux/set_memory.h>
> > -#ifdef CONFIG_DEBUG_FS
> > #include <linux/debugfs.h>
> > -#endif
> > #ifdef CONFIG_DMA_RESTRICTED_POOL
> > #include <linux/io.h>
> > #include <linux/of.h>
> > @@ -686,7 +684,6 @@ bool is_swiotlb_active(struct device *dev)
> > }
> > EXPORT_SYMBOL_GPL(is_swiotlb_active);
> >
> > -#ifdef CONFIG_DEBUG_FS
> > static struct dentry *debugfs_dir;
> >
> > static void swiotlb_create_debugfs_files(struct io_tlb_mem *mem)
> > @@ -709,8 +706,6 @@ static int __init swiotlb_create_default_debugfs(void)
> >
> > late_initcall(swiotlb_create_default_debugfs);
> >
> > -#endif
> > -
> > #ifdef CONFIG_DMA_RESTRICTED_POOL
> > struct page *swiotlb_alloc(struct device *dev, size_t size)
> > {
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] swiotlb: fix implicit debugfs_create_dir declaration
@ 2021-06-30 4:07 ` Claire Chang
0 siblings, 0 replies; 6+ messages in thread
From: Claire Chang @ 2021-06-30 4:07 UTC (permalink / raw)
To: Robin Murphy
Cc: Stefano Stabellini, kernel test robot, Konrad Rzeszutek Wilk,
lkml,
list@263.net:IOMMU DRIVERS
<iommu@lists.linux-foundation.org>,
Joerg Roedel <joro@8bytes.org>, ,
Nicolas Boichat, Will Deacon, Christoph Hellwig
On Tue, Jun 29, 2021 at 8:52 PM Robin Murphy <robin.murphy@arm.com> wrote:
>
> On 2021-06-29 13:16, Claire Chang wrote:
> > Remove the ifdef to fix implicit function declaration for other pools.
> >
> > Fixes: 1d9f94400a7a ("swiotlb: Refactor swiotlb_create_debugfs")
>
> There doesn't appear to be a problem with that commit - AFAICS it's
> 461021875c50 ("swiotlb: Add restricted DMA pool initialization") which
> introduces a reference to debugfs_create_dir() outside the existing
> #ifdef guards.
>
> FWIW (assuming it's the real problem) I'd be inclined to factor out the
> debugfs bits from rmem_swiotlb_device_init() into a separate
> rmem_swiotlb_debugfs_init() (or similar) function which can live
> alongside the others under the #ifdef and be stubbed out in an #else case.
v3 here: https://lore.kernel.org/patchwork/patch/1452807/
>
> Robin.
>
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Claire Chang <tientzu@chromium.org>
> > ---
> > kernel/dma/swiotlb.c | 5 -----
> > 1 file changed, 5 deletions(-)
> >
> > diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
> > index 0ffbaae9fba2..8ae0bef392c3 100644
> > --- a/kernel/dma/swiotlb.c
> > +++ b/kernel/dma/swiotlb.c
> > @@ -36,9 +36,7 @@
> > #include <linux/scatterlist.h>
> > #include <linux/mem_encrypt.h>
> > #include <linux/set_memory.h>
> > -#ifdef CONFIG_DEBUG_FS
> > #include <linux/debugfs.h>
> > -#endif
> > #ifdef CONFIG_DMA_RESTRICTED_POOL
> > #include <linux/io.h>
> > #include <linux/of.h>
> > @@ -686,7 +684,6 @@ bool is_swiotlb_active(struct device *dev)
> > }
> > EXPORT_SYMBOL_GPL(is_swiotlb_active);
> >
> > -#ifdef CONFIG_DEBUG_FS
> > static struct dentry *debugfs_dir;
> >
> > static void swiotlb_create_debugfs_files(struct io_tlb_mem *mem)
> > @@ -709,8 +706,6 @@ static int __init swiotlb_create_default_debugfs(void)
> >
> > late_initcall(swiotlb_create_default_debugfs);
> >
> > -#endif
> > -
> > #ifdef CONFIG_DMA_RESTRICTED_POOL
> > struct page *swiotlb_alloc(struct device *dev, size_t size)
> > {
> >
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-06-30 4:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29 12:16 [PATCH v2] swiotlb: fix implicit debugfs_create_dir declaration Claire Chang
2021-06-29 12:16 ` Claire Chang
2021-06-29 12:52 ` Robin Murphy
2021-06-29 12:52 ` Robin Murphy
2021-06-30 4:07 ` Claire Chang
2021-06-30 4:07 ` Claire Chang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.