* [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code
@ 2018-07-30 7:38 ` Christoph Hellwig
0 siblings, 0 replies; 16+ messages in thread
From: Christoph Hellwig @ 2018-07-30 7:38 UTC (permalink / raw)
To: linux-pci; +Cc: iommu, linuxppc-dev, x86, linux-sh, linux-kernel
There is nothing arch specific about PCI or dma-debug, so move this
call to common code just after registering the bus type.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
arch/powerpc/kernel/dma.c | 3 ---
arch/sh/drivers/pci/pci.c | 2 --
arch/x86/kernel/pci-dma.c | 3 ---
drivers/pci/pci-driver.c | 2 +-
4 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index 155170d70324..dbfc7056d7df 100644
--- a/arch/powerpc/kernel/dma.c
+++ b/arch/powerpc/kernel/dma.c
@@ -357,9 +357,6 @@ EXPORT_SYMBOL_GPL(dma_get_required_mask);
static int __init dma_init(void)
{
-#ifdef CONFIG_PCI
- dma_debug_add_bus(&pci_bus_type);
-#endif
#ifdef CONFIG_IBMVIO
dma_debug_add_bus(&vio_bus_type);
#endif
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
index e5b7437ab4af..8256626bc53c 100644
--- a/arch/sh/drivers/pci/pci.c
+++ b/arch/sh/drivers/pci/pci.c
@@ -160,8 +160,6 @@ static int __init pcibios_init(void)
for (hose = hose_head; hose; hose = hose->next)
pcibios_scanbus(hose);
- dma_debug_add_bus(&pci_bus_type);
-
pci_initialized = 1;
return 0;
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index ab5d9dd668d2..43f58632f123 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -155,9 +155,6 @@ static int __init pci_iommu_init(void)
{
struct iommu_table_entry *p;
-#ifdef CONFIG_PCI
- dma_debug_add_bus(&pci_bus_type);
-#endif
x86_init.iommu.iommu_init();
for (p = __iommu_table; p < __iommu_table_end; p++) {
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 6792292b5fc7..bef17c3fca67 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -1668,7 +1668,7 @@ static int __init pci_driver_init(void)
if (ret)
return ret;
#endif
-
+ dma_debug_add_bus(&pci_bus_type);
return 0;
}
postcore_initcall(pci_driver_init);
--
2.18.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code
@ 2018-07-30 7:38 ` Christoph Hellwig
0 siblings, 0 replies; 16+ messages in thread
From: Christoph Hellwig @ 2018-07-30 7:38 UTC (permalink / raw)
To: linux-pci; +Cc: iommu, linuxppc-dev, x86, linux-sh, linux-kernel
There is nothing arch specific about PCI or dma-debug, so move this
call to common code just after registering the bus type.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
arch/powerpc/kernel/dma.c | 3 ---
arch/sh/drivers/pci/pci.c | 2 --
arch/x86/kernel/pci-dma.c | 3 ---
drivers/pci/pci-driver.c | 2 +-
4 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index 155170d70324..dbfc7056d7df 100644
--- a/arch/powerpc/kernel/dma.c
+++ b/arch/powerpc/kernel/dma.c
@@ -357,9 +357,6 @@ EXPORT_SYMBOL_GPL(dma_get_required_mask);
static int __init dma_init(void)
{
-#ifdef CONFIG_PCI
- dma_debug_add_bus(&pci_bus_type);
-#endif
#ifdef CONFIG_IBMVIO
dma_debug_add_bus(&vio_bus_type);
#endif
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
index e5b7437ab4af..8256626bc53c 100644
--- a/arch/sh/drivers/pci/pci.c
+++ b/arch/sh/drivers/pci/pci.c
@@ -160,8 +160,6 @@ static int __init pcibios_init(void)
for (hose = hose_head; hose; hose = hose->next)
pcibios_scanbus(hose);
- dma_debug_add_bus(&pci_bus_type);
-
pci_initialized = 1;
return 0;
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index ab5d9dd668d2..43f58632f123 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -155,9 +155,6 @@ static int __init pci_iommu_init(void)
{
struct iommu_table_entry *p;
-#ifdef CONFIG_PCI
- dma_debug_add_bus(&pci_bus_type);
-#endif
x86_init.iommu.iommu_init();
for (p = __iommu_table; p < __iommu_table_end; p++) {
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 6792292b5fc7..bef17c3fca67 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -1668,7 +1668,7 @@ static int __init pci_driver_init(void)
if (ret)
return ret;
#endif
-
+ dma_debug_add_bus(&pci_bus_type);
return 0;
}
postcore_initcall(pci_driver_init);
--
2.18.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code
2018-07-30 7:38 ` Christoph Hellwig
(?)
@ 2018-07-30 11:55 ` Thomas Gleixner
-1 siblings, 0 replies; 16+ messages in thread
From: Thomas Gleixner @ 2018-07-30 11:55 UTC (permalink / raw)
To: Christoph Hellwig
Cc: linux-sh-u79uwXL29TY76Z2rM5mHXA,
linux-pci-u79uwXL29TY76Z2rM5mHXA, x86-DgEjT+Ai2ygdnm+yROfE0A,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ
On Mon, 30 Jul 2018, Christoph Hellwig wrote:
> There is nothing arch specific about PCI or dma-debug, so move this
> call to common code just after registering the bus type.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code
@ 2018-07-30 11:55 ` Thomas Gleixner
0 siblings, 0 replies; 16+ messages in thread
From: Thomas Gleixner @ 2018-07-30 11:55 UTC (permalink / raw)
To: Christoph Hellwig
Cc: linux-pci, iommu, linuxppc-dev, x86, linux-sh, linux-kernel
On Mon, 30 Jul 2018, Christoph Hellwig wrote:
> There is nothing arch specific about PCI or dma-debug, so move this
> call to common code just after registering the bus type.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code
@ 2018-07-30 11:55 ` Thomas Gleixner
0 siblings, 0 replies; 16+ messages in thread
From: Thomas Gleixner @ 2018-07-30 11:55 UTC (permalink / raw)
To: Christoph Hellwig
Cc: linux-sh-u79uwXL29TY76Z2rM5mHXA,
linux-pci-u79uwXL29TY76Z2rM5mHXA, x86-DgEjT+Ai2ygdnm+yROfE0A,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ
On Mon, 30 Jul 2018, Christoph Hellwig wrote:
> There is nothing arch specific about PCI or dma-debug, so move this
> call to common code just after registering the bus type.
>
> Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
Acked-by: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code
2018-07-30 7:38 ` Christoph Hellwig
(?)
@ 2018-07-30 21:17 ` Bjorn Helgaas
-1 siblings, 0 replies; 16+ messages in thread
From: Bjorn Helgaas @ 2018-07-30 21:17 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Joerg Roedel, linux-sh-u79uwXL29TY76Z2rM5mHXA,
linux-pci-u79uwXL29TY76Z2rM5mHXA, x86-DgEjT+Ai2ygdnm+yROfE0A,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ
[+cc Joerg]
On Mon, Jul 30, 2018 at 09:38:42AM +0200, Christoph Hellwig wrote:
> There is nothing arch specific about PCI or dma-debug, so move this
> call to common code just after registering the bus type.
I assume that previously, even if the user set CONFIG_DMA_API_DEBUG=y
we only got PCI DMA debug on powerpc, sh, and x86. And after this
patch, we'll get PCI DMA debug on *all* arches?
If that's true, I'll add a comment to that effect to the commitlog
since that new functionality might be of interest to other arches.
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> arch/powerpc/kernel/dma.c | 3 ---
> arch/sh/drivers/pci/pci.c | 2 --
> arch/x86/kernel/pci-dma.c | 3 ---
> drivers/pci/pci-driver.c | 2 +-
> 4 files changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
> index 155170d70324..dbfc7056d7df 100644
> --- a/arch/powerpc/kernel/dma.c
> +++ b/arch/powerpc/kernel/dma.c
> @@ -357,9 +357,6 @@ EXPORT_SYMBOL_GPL(dma_get_required_mask);
>
> static int __init dma_init(void)
> {
> -#ifdef CONFIG_PCI
> - dma_debug_add_bus(&pci_bus_type);
> -#endif
> #ifdef CONFIG_IBMVIO
> dma_debug_add_bus(&vio_bus_type);
> #endif
> diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
> index e5b7437ab4af..8256626bc53c 100644
> --- a/arch/sh/drivers/pci/pci.c
> +++ b/arch/sh/drivers/pci/pci.c
> @@ -160,8 +160,6 @@ static int __init pcibios_init(void)
> for (hose = hose_head; hose; hose = hose->next)
> pcibios_scanbus(hose);
>
> - dma_debug_add_bus(&pci_bus_type);
> -
> pci_initialized = 1;
>
> return 0;
> diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
> index ab5d9dd668d2..43f58632f123 100644
> --- a/arch/x86/kernel/pci-dma.c
> +++ b/arch/x86/kernel/pci-dma.c
> @@ -155,9 +155,6 @@ static int __init pci_iommu_init(void)
> {
> struct iommu_table_entry *p;
>
> -#ifdef CONFIG_PCI
> - dma_debug_add_bus(&pci_bus_type);
> -#endif
> x86_init.iommu.iommu_init();
>
> for (p = __iommu_table; p < __iommu_table_end; p++) {
> diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
> index 6792292b5fc7..bef17c3fca67 100644
> --- a/drivers/pci/pci-driver.c
> +++ b/drivers/pci/pci-driver.c
> @@ -1668,7 +1668,7 @@ static int __init pci_driver_init(void)
> if (ret)
> return ret;
> #endif
> -
> + dma_debug_add_bus(&pci_bus_type);
> return 0;
> }
> postcore_initcall(pci_driver_init);
> --
> 2.18.0
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code
@ 2018-07-30 21:17 ` Bjorn Helgaas
0 siblings, 0 replies; 16+ messages in thread
From: Bjorn Helgaas @ 2018-07-30 21:17 UTC (permalink / raw)
To: Christoph Hellwig
Cc: linux-pci, iommu, linuxppc-dev, x86, linux-sh, linux-kernel,
Joerg Roedel
[+cc Joerg]
On Mon, Jul 30, 2018 at 09:38:42AM +0200, Christoph Hellwig wrote:
> There is nothing arch specific about PCI or dma-debug, so move this
> call to common code just after registering the bus type.
I assume that previously, even if the user set CONFIG_DMA_API_DEBUG=y
we only got PCI DMA debug on powerpc, sh, and x86. And after this
patch, we'll get PCI DMA debug on *all* arches?
If that's true, I'll add a comment to that effect to the commitlog
since that new functionality might be of interest to other arches.
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> arch/powerpc/kernel/dma.c | 3 ---
> arch/sh/drivers/pci/pci.c | 2 --
> arch/x86/kernel/pci-dma.c | 3 ---
> drivers/pci/pci-driver.c | 2 +-
> 4 files changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
> index 155170d70324..dbfc7056d7df 100644
> --- a/arch/powerpc/kernel/dma.c
> +++ b/arch/powerpc/kernel/dma.c
> @@ -357,9 +357,6 @@ EXPORT_SYMBOL_GPL(dma_get_required_mask);
>
> static int __init dma_init(void)
> {
> -#ifdef CONFIG_PCI
> - dma_debug_add_bus(&pci_bus_type);
> -#endif
> #ifdef CONFIG_IBMVIO
> dma_debug_add_bus(&vio_bus_type);
> #endif
> diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
> index e5b7437ab4af..8256626bc53c 100644
> --- a/arch/sh/drivers/pci/pci.c
> +++ b/arch/sh/drivers/pci/pci.c
> @@ -160,8 +160,6 @@ static int __init pcibios_init(void)
> for (hose = hose_head; hose; hose = hose->next)
> pcibios_scanbus(hose);
>
> - dma_debug_add_bus(&pci_bus_type);
> -
> pci_initialized = 1;
>
> return 0;
> diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
> index ab5d9dd668d2..43f58632f123 100644
> --- a/arch/x86/kernel/pci-dma.c
> +++ b/arch/x86/kernel/pci-dma.c
> @@ -155,9 +155,6 @@ static int __init pci_iommu_init(void)
> {
> struct iommu_table_entry *p;
>
> -#ifdef CONFIG_PCI
> - dma_debug_add_bus(&pci_bus_type);
> -#endif
> x86_init.iommu.iommu_init();
>
> for (p = __iommu_table; p < __iommu_table_end; p++) {
> diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
> index 6792292b5fc7..bef17c3fca67 100644
> --- a/drivers/pci/pci-driver.c
> +++ b/drivers/pci/pci-driver.c
> @@ -1668,7 +1668,7 @@ static int __init pci_driver_init(void)
> if (ret)
> return ret;
> #endif
> -
> + dma_debug_add_bus(&pci_bus_type);
> return 0;
> }
> postcore_initcall(pci_driver_init);
> --
> 2.18.0
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code
@ 2018-07-30 21:17 ` Bjorn Helgaas
0 siblings, 0 replies; 16+ messages in thread
From: Bjorn Helgaas @ 2018-07-30 21:17 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Joerg Roedel, linux-sh-u79uwXL29TY76Z2rM5mHXA,
linux-pci-u79uwXL29TY76Z2rM5mHXA, x86-DgEjT+Ai2ygdnm+yROfE0A,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ
[+cc Joerg]
On Mon, Jul 30, 2018 at 09:38:42AM +0200, Christoph Hellwig wrote:
> There is nothing arch specific about PCI or dma-debug, so move this
> call to common code just after registering the bus type.
I assume that previously, even if the user set CONFIG_DMA_API_DEBUG=y
we only got PCI DMA debug on powerpc, sh, and x86. And after this
patch, we'll get PCI DMA debug on *all* arches?
If that's true, I'll add a comment to that effect to the commitlog
since that new functionality might be of interest to other arches.
> Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
> ---
> arch/powerpc/kernel/dma.c | 3 ---
> arch/sh/drivers/pci/pci.c | 2 --
> arch/x86/kernel/pci-dma.c | 3 ---
> drivers/pci/pci-driver.c | 2 +-
> 4 files changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
> index 155170d70324..dbfc7056d7df 100644
> --- a/arch/powerpc/kernel/dma.c
> +++ b/arch/powerpc/kernel/dma.c
> @@ -357,9 +357,6 @@ EXPORT_SYMBOL_GPL(dma_get_required_mask);
>
> static int __init dma_init(void)
> {
> -#ifdef CONFIG_PCI
> - dma_debug_add_bus(&pci_bus_type);
> -#endif
> #ifdef CONFIG_IBMVIO
> dma_debug_add_bus(&vio_bus_type);
> #endif
> diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
> index e5b7437ab4af..8256626bc53c 100644
> --- a/arch/sh/drivers/pci/pci.c
> +++ b/arch/sh/drivers/pci/pci.c
> @@ -160,8 +160,6 @@ static int __init pcibios_init(void)
> for (hose = hose_head; hose; hose = hose->next)
> pcibios_scanbus(hose);
>
> - dma_debug_add_bus(&pci_bus_type);
> -
> pci_initialized = 1;
>
> return 0;
> diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
> index ab5d9dd668d2..43f58632f123 100644
> --- a/arch/x86/kernel/pci-dma.c
> +++ b/arch/x86/kernel/pci-dma.c
> @@ -155,9 +155,6 @@ static int __init pci_iommu_init(void)
> {
> struct iommu_table_entry *p;
>
> -#ifdef CONFIG_PCI
> - dma_debug_add_bus(&pci_bus_type);
> -#endif
> x86_init.iommu.iommu_init();
>
> for (p = __iommu_table; p < __iommu_table_end; p++) {
> diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
> index 6792292b5fc7..bef17c3fca67 100644
> --- a/drivers/pci/pci-driver.c
> +++ b/drivers/pci/pci-driver.c
> @@ -1668,7 +1668,7 @@ static int __init pci_driver_init(void)
> if (ret)
> return ret;
> #endif
> -
> + dma_debug_add_bus(&pci_bus_type);
> return 0;
> }
> postcore_initcall(pci_driver_init);
> --
> 2.18.0
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code
2018-07-30 21:17 ` Bjorn Helgaas
@ 2018-07-31 7:36 ` Joerg Roedel
-1 siblings, 0 replies; 16+ messages in thread
From: Joerg Roedel @ 2018-07-31 7:36 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Christoph Hellwig, linux-pci, iommu, linuxppc-dev, x86, linux-sh,
linux-kernel
On Mon, Jul 30, 2018 at 04:17:13PM -0500, Bjorn Helgaas wrote:
> [+cc Joerg]
>
> On Mon, Jul 30, 2018 at 09:38:42AM +0200, Christoph Hellwig wrote:
> > There is nothing arch specific about PCI or dma-debug, so move this
> > call to common code just after registering the bus type.
>
> I assume that previously, even if the user set CONFIG_DMA_API_DEBUG=y
> we only got PCI DMA debug on powerpc, sh, and x86. And after this
> patch, we'll get PCI DMA debug on *all* arches?
>
> If that's true, I'll add a comment to that effect to the commitlog
> since that new functionality might be of interest to other arches.
There should be implicit support for dma-debug for all arches that use
the generic dma_ops code. The dma_debug_add_bus() function just adds the
reporting of pending dma-allocations on driver-unload for a device.
Regards,
Joerg
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code
@ 2018-07-31 7:36 ` Joerg Roedel
0 siblings, 0 replies; 16+ messages in thread
From: Joerg Roedel @ 2018-07-31 7:36 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Christoph Hellwig, linux-pci, iommu, linuxppc-dev, x86, linux-sh,
linux-kernel
On Mon, Jul 30, 2018 at 04:17:13PM -0500, Bjorn Helgaas wrote:
> [+cc Joerg]
>
> On Mon, Jul 30, 2018 at 09:38:42AM +0200, Christoph Hellwig wrote:
> > There is nothing arch specific about PCI or dma-debug, so move this
> > call to common code just after registering the bus type.
>
> I assume that previously, even if the user set CONFIG_DMA_API_DEBUG=y
> we only got PCI DMA debug on powerpc, sh, and x86. And after this
> patch, we'll get PCI DMA debug on *all* arches?
>
> If that's true, I'll add a comment to that effect to the commitlog
> since that new functionality might be of interest to other arches.
There should be implicit support for dma-debug for all arches that use
the generic dma_ops code. The dma_debug_add_bus() function just adds the
reporting of pending dma-allocations on driver-unload for a device.
Regards,
Joerg
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code
2018-07-30 21:17 ` Bjorn Helgaas
@ 2018-07-31 8:07 ` Christoph Hellwig
-1 siblings, 0 replies; 16+ messages in thread
From: Christoph Hellwig @ 2018-07-31 8:07 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Christoph Hellwig, linux-pci, iommu, linuxppc-dev, x86, linux-sh,
linux-kernel, Joerg Roedel
On Mon, Jul 30, 2018 at 04:17:13PM -0500, Bjorn Helgaas wrote:
> [+cc Joerg]
>
> On Mon, Jul 30, 2018 at 09:38:42AM +0200, Christoph Hellwig wrote:
> > There is nothing arch specific about PCI or dma-debug, so move this
> > call to common code just after registering the bus type.
>
> I assume that previously, even if the user set CONFIG_DMA_API_DEBUG=y
> we only got PCI DMA debug on powerpc, sh, and x86. And after this
> patch, we'll get PCI DMA debug on *all* arches?
Yes. Note that this only covers the actual bus related part, that
is warning about outstanding dma mappings on unload. The rest of the
dma api debugging already is entirely generic.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code
@ 2018-07-31 8:07 ` Christoph Hellwig
0 siblings, 0 replies; 16+ messages in thread
From: Christoph Hellwig @ 2018-07-31 8:07 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Christoph Hellwig, linux-pci, iommu, linuxppc-dev, x86, linux-sh,
linux-kernel, Joerg Roedel
On Mon, Jul 30, 2018 at 04:17:13PM -0500, Bjorn Helgaas wrote:
> [+cc Joerg]
>
> On Mon, Jul 30, 2018 at 09:38:42AM +0200, Christoph Hellwig wrote:
> > There is nothing arch specific about PCI or dma-debug, so move this
> > call to common code just after registering the bus type.
>
> I assume that previously, even if the user set CONFIG_DMA_API_DEBUG=y
> we only got PCI DMA debug on powerpc, sh, and x86. And after this
> patch, we'll get PCI DMA debug on *all* arches?
Yes. Note that this only covers the actual bus related part, that
is warning about outstanding dma mappings on unload. The rest of the
dma api debugging already is entirely generic.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code
2018-07-30 7:38 ` Christoph Hellwig
@ 2018-07-31 9:34 ` Michael Ellerman
-1 siblings, 0 replies; 16+ messages in thread
From: Michael Ellerman @ 2018-07-31 9:34 UTC (permalink / raw)
To: Christoph Hellwig, linux-pci
Cc: iommu, x86, linuxppc-dev, linux-kernel, linux-sh
Christoph Hellwig <hch@lst.de> writes:
> There is nothing arch specific about PCI or dma-debug, so move this
> call to common code just after registering the bus type.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> arch/powerpc/kernel/dma.c | 3 ---
> arch/sh/drivers/pci/pci.c | 2 --
> arch/x86/kernel/pci-dma.c | 3 ---
> drivers/pci/pci-driver.c | 2 +-
> 4 files changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
> index 155170d70324..dbfc7056d7df 100644
> --- a/arch/powerpc/kernel/dma.c
> +++ b/arch/powerpc/kernel/dma.c
> @@ -357,9 +357,6 @@ EXPORT_SYMBOL_GPL(dma_get_required_mask);
>
> static int __init dma_init(void)
> {
> -#ifdef CONFIG_PCI
> - dma_debug_add_bus(&pci_bus_type);
> -#endif
> #ifdef CONFIG_IBMVIO
> dma_debug_add_bus(&vio_bus_type);
> #endif
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
cheers
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code
@ 2018-07-31 9:34 ` Michael Ellerman
0 siblings, 0 replies; 16+ messages in thread
From: Michael Ellerman @ 2018-07-31 9:34 UTC (permalink / raw)
To: Christoph Hellwig, linux-pci
Cc: iommu, x86, linuxppc-dev, linux-kernel, linux-sh
Christoph Hellwig <hch@lst.de> writes:
> There is nothing arch specific about PCI or dma-debug, so move this
> call to common code just after registering the bus type.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> arch/powerpc/kernel/dma.c | 3 ---
> arch/sh/drivers/pci/pci.c | 2 --
> arch/x86/kernel/pci-dma.c | 3 ---
> drivers/pci/pci-driver.c | 2 +-
> 4 files changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
> index 155170d70324..dbfc7056d7df 100644
> --- a/arch/powerpc/kernel/dma.c
> +++ b/arch/powerpc/kernel/dma.c
> @@ -357,9 +357,6 @@ EXPORT_SYMBOL_GPL(dma_get_required_mask);
>
> static int __init dma_init(void)
> {
> -#ifdef CONFIG_PCI
> - dma_debug_add_bus(&pci_bus_type);
> -#endif
> #ifdef CONFIG_IBMVIO
> dma_debug_add_bus(&vio_bus_type);
> #endif
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
cheers
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code
2018-07-30 7:38 ` Christoph Hellwig
@ 2018-07-31 10:54 ` Bjorn Helgaas
-1 siblings, 0 replies; 16+ messages in thread
From: Bjorn Helgaas @ 2018-07-31 10:54 UTC (permalink / raw)
To: Christoph Hellwig
Cc: linux-pci, iommu, linuxppc-dev, x86, linux-sh, linux-kernel
On Mon, Jul 30, 2018 at 09:38:42AM +0200, Christoph Hellwig wrote:
> There is nothing arch specific about PCI or dma-debug, so move this
> call to common code just after registering the bus type.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Applied with acks from Thomas and Michael to pci/misc for v4.19, thanks!
> ---
> arch/powerpc/kernel/dma.c | 3 ---
> arch/sh/drivers/pci/pci.c | 2 --
> arch/x86/kernel/pci-dma.c | 3 ---
> drivers/pci/pci-driver.c | 2 +-
> 4 files changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
> index 155170d70324..dbfc7056d7df 100644
> --- a/arch/powerpc/kernel/dma.c
> +++ b/arch/powerpc/kernel/dma.c
> @@ -357,9 +357,6 @@ EXPORT_SYMBOL_GPL(dma_get_required_mask);
>
> static int __init dma_init(void)
> {
> -#ifdef CONFIG_PCI
> - dma_debug_add_bus(&pci_bus_type);
> -#endif
> #ifdef CONFIG_IBMVIO
> dma_debug_add_bus(&vio_bus_type);
> #endif
> diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
> index e5b7437ab4af..8256626bc53c 100644
> --- a/arch/sh/drivers/pci/pci.c
> +++ b/arch/sh/drivers/pci/pci.c
> @@ -160,8 +160,6 @@ static int __init pcibios_init(void)
> for (hose = hose_head; hose; hose = hose->next)
> pcibios_scanbus(hose);
>
> - dma_debug_add_bus(&pci_bus_type);
> -
> pci_initialized = 1;
>
> return 0;
> diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
> index ab5d9dd668d2..43f58632f123 100644
> --- a/arch/x86/kernel/pci-dma.c
> +++ b/arch/x86/kernel/pci-dma.c
> @@ -155,9 +155,6 @@ static int __init pci_iommu_init(void)
> {
> struct iommu_table_entry *p;
>
> -#ifdef CONFIG_PCI
> - dma_debug_add_bus(&pci_bus_type);
> -#endif
> x86_init.iommu.iommu_init();
>
> for (p = __iommu_table; p < __iommu_table_end; p++) {
> diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
> index 6792292b5fc7..bef17c3fca67 100644
> --- a/drivers/pci/pci-driver.c
> +++ b/drivers/pci/pci-driver.c
> @@ -1668,7 +1668,7 @@ static int __init pci_driver_init(void)
> if (ret)
> return ret;
> #endif
> -
> + dma_debug_add_bus(&pci_bus_type);
> return 0;
> }
> postcore_initcall(pci_driver_init);
> --
> 2.18.0
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code
@ 2018-07-31 10:54 ` Bjorn Helgaas
0 siblings, 0 replies; 16+ messages in thread
From: Bjorn Helgaas @ 2018-07-31 10:54 UTC (permalink / raw)
To: Christoph Hellwig
Cc: linux-pci, iommu, linuxppc-dev, x86, linux-sh, linux-kernel
On Mon, Jul 30, 2018 at 09:38:42AM +0200, Christoph Hellwig wrote:
> There is nothing arch specific about PCI or dma-debug, so move this
> call to common code just after registering the bus type.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Applied with acks from Thomas and Michael to pci/misc for v4.19, thanks!
> ---
> arch/powerpc/kernel/dma.c | 3 ---
> arch/sh/drivers/pci/pci.c | 2 --
> arch/x86/kernel/pci-dma.c | 3 ---
> drivers/pci/pci-driver.c | 2 +-
> 4 files changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
> index 155170d70324..dbfc7056d7df 100644
> --- a/arch/powerpc/kernel/dma.c
> +++ b/arch/powerpc/kernel/dma.c
> @@ -357,9 +357,6 @@ EXPORT_SYMBOL_GPL(dma_get_required_mask);
>
> static int __init dma_init(void)
> {
> -#ifdef CONFIG_PCI
> - dma_debug_add_bus(&pci_bus_type);
> -#endif
> #ifdef CONFIG_IBMVIO
> dma_debug_add_bus(&vio_bus_type);
> #endif
> diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
> index e5b7437ab4af..8256626bc53c 100644
> --- a/arch/sh/drivers/pci/pci.c
> +++ b/arch/sh/drivers/pci/pci.c
> @@ -160,8 +160,6 @@ static int __init pcibios_init(void)
> for (hose = hose_head; hose; hose = hose->next)
> pcibios_scanbus(hose);
>
> - dma_debug_add_bus(&pci_bus_type);
> -
> pci_initialized = 1;
>
> return 0;
> diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
> index ab5d9dd668d2..43f58632f123 100644
> --- a/arch/x86/kernel/pci-dma.c
> +++ b/arch/x86/kernel/pci-dma.c
> @@ -155,9 +155,6 @@ static int __init pci_iommu_init(void)
> {
> struct iommu_table_entry *p;
>
> -#ifdef CONFIG_PCI
> - dma_debug_add_bus(&pci_bus_type);
> -#endif
> x86_init.iommu.iommu_init();
>
> for (p = __iommu_table; p < __iommu_table_end; p++) {
> diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
> index 6792292b5fc7..bef17c3fca67 100644
> --- a/drivers/pci/pci-driver.c
> +++ b/drivers/pci/pci-driver.c
> @@ -1668,7 +1668,7 @@ static int __init pci_driver_init(void)
> if (ret)
> return ret;
> #endif
> -
> + dma_debug_add_bus(&pci_bus_type);
> return 0;
> }
> postcore_initcall(pci_driver_init);
> --
> 2.18.0
>
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2018-07-31 10:55 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-30 7:38 [PATCH] PCI: call dma_debug_add_bus for pci_bus_type in common code Christoph Hellwig
2018-07-30 7:38 ` Christoph Hellwig
[not found] ` <20180730073842.16092-1-hch-jcswGhMUV9g@public.gmane.org>
2018-07-30 11:55 ` Thomas Gleixner
2018-07-30 11:55 ` Thomas Gleixner
2018-07-30 11:55 ` Thomas Gleixner
2018-07-30 21:17 ` Bjorn Helgaas
2018-07-30 21:17 ` Bjorn Helgaas
2018-07-30 21:17 ` Bjorn Helgaas
2018-07-31 7:36 ` Joerg Roedel
2018-07-31 7:36 ` Joerg Roedel
2018-07-31 8:07 ` Christoph Hellwig
2018-07-31 8:07 ` Christoph Hellwig
2018-07-31 9:34 ` Michael Ellerman
2018-07-31 9:34 ` Michael Ellerman
2018-07-31 10:54 ` Bjorn Helgaas
2018-07-31 10:54 ` Bjorn Helgaas
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.