aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2012-06-24 14:25:28 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-07-10 05:18:57 -0400
commita980349725346ce7e3c1774e327c2f1fdca4593d (patch)
treec7f16704a2b4d91107d48e26e47e77af532292aa /arch/powerpc/kernel
parent44b372d8a099a7042f9f17ebd4941050e38c1773 (diff)
powerpc: Call dma_debug_add_bus for PCI and VIO buses
The DMA API debug code has hooks to verify all DMA entries have been freed at time of hot unplug. We need to call dma_debug_add_bus for this to work. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/dma.c10
-rw-r--r--arch/powerpc/kernel/vio.c4
2 files changed, 10 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index b1ec983dcec8..289be751cd75 100644
--- a/arch/powerpc/kernel/dma.c
+++ b/arch/powerpc/kernel/dma.c
@@ -11,6 +11,8 @@
11#include <linux/gfp.h> 11#include <linux/gfp.h>
12#include <linux/memblock.h> 12#include <linux/memblock.h>
13#include <linux/export.h> 13#include <linux/export.h>
14#include <linux/pci.h>
15#include <asm/vio.h>
14#include <asm/bug.h> 16#include <asm/bug.h>
15#include <asm/abs_addr.h> 17#include <asm/abs_addr.h>
16#include <asm/machdep.h> 18#include <asm/machdep.h>
@@ -205,7 +207,13 @@ EXPORT_SYMBOL_GPL(dma_get_required_mask);
205 207
206static int __init dma_init(void) 208static int __init dma_init(void)
207{ 209{
208 dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES); 210 dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES);
211#ifdef CONFIG_PCI
212 dma_debug_add_bus(&pci_bus_type);
213#endif
214#ifdef CONFIG_IBMVIO
215 dma_debug_add_bus(&vio_bus_type);
216#endif
209 217
210 return 0; 218 return 0;
211} 219}
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index 3bb5be5da31c..7a421e8fe7ca 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -37,8 +37,6 @@
37#include <asm/page.h> 37#include <asm/page.h>
38#include <asm/hvcall.h> 38#include <asm/hvcall.h>
39 39
40static struct bus_type vio_bus_type;
41
42static struct vio_dev vio_bus_device = { /* fake "parent" device */ 40static struct vio_dev vio_bus_device = { /* fake "parent" device */
43 .name = "vio", 41 .name = "vio",
44 .type = "", 42 .type = "",
@@ -1580,7 +1578,7 @@ static int vio_hotplug(struct device *dev, struct kobj_uevent_env *env)
1580 return 0; 1578 return 0;
1581} 1579}
1582 1580
1583static struct bus_type vio_bus_type = { 1581struct bus_type vio_bus_type = {
1584 .name = "vio", 1582 .name = "vio",
1585 .dev_attrs = vio_dev_attrs, 1583 .dev_attrs = vio_dev_attrs,
1586 .uevent = vio_hotplug, 1584 .uevent = vio_hotplug,