aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/dma.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-04-16 11:22:28 -0400
committerChristoph Hellwig <hch@lst.de>2018-05-08 07:02:42 -0400
commit15b28bbcd567a9199481ecfef39702b258f9baff (patch)
treedb5428916f2f231b602bad88b202ffc7540afd16 /arch/powerpc/kernel/dma.c
parent325ef1857fff8b2049322921e19421b6c5ad74e5 (diff)
dma-debug: move initialization to common code
Most mainstream architectures are using 65536 entries, so lets stick to that. If someone is really desperate to override it that can still be done through <asm/dma-mapping.h>, but I'd rather see a really good rationale for that. dma_debug_init is now called as a core_initcall, which for many architectures means much earlier, and provides dma-debug functionality earlier in the boot process. This should be safe as it only relies on the memory allocator already being available. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Diffstat (limited to 'arch/powerpc/kernel/dma.c')
-rw-r--r--arch/powerpc/kernel/dma.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index da20569de9d4..138157deeadf 100644
--- a/arch/powerpc/kernel/dma.c
+++ b/arch/powerpc/kernel/dma.c
@@ -309,8 +309,6 @@ int dma_set_coherent_mask(struct device *dev, u64 mask)
309} 309}
310EXPORT_SYMBOL(dma_set_coherent_mask); 310EXPORT_SYMBOL(dma_set_coherent_mask);
311 311
312#define PREALLOC_DMA_DEBUG_ENTRIES (1 << 16)
313
314int dma_set_mask(struct device *dev, u64 dma_mask) 312int dma_set_mask(struct device *dev, u64 dma_mask)
315{ 313{
316 if (ppc_md.dma_set_mask) 314 if (ppc_md.dma_set_mask)
@@ -361,7 +359,6 @@ EXPORT_SYMBOL_GPL(dma_get_required_mask);
361 359
362static int __init dma_init(void) 360static int __init dma_init(void)
363{ 361{
364 dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES);
365#ifdef CONFIG_PCI 362#ifdef CONFIG_PCI
366 dma_debug_add_bus(&pci_bus_type); 363 dma_debug_add_bus(&pci_bus_type);
367#endif 364#endif