diff options
author | Christoph Hellwig <hch@lst.de> | 2018-04-16 11:22:28 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-05-08 07:02:42 -0400 |
commit | 15b28bbcd567a9199481ecfef39702b258f9baff (patch) | |
tree | db5428916f2f231b602bad88b202ffc7540afd16 /arch/x86/kernel/pci-dma.c | |
parent | 325ef1857fff8b2049322921e19421b6c5ad74e5 (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/x86/kernel/pci-dma.c')
-rw-r--r-- | arch/x86/kernel/pci-dma.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 77625b60a510..bcbaa2e8031e 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
@@ -55,9 +55,6 @@ struct device x86_dma_fallback_dev = { | |||
55 | }; | 55 | }; |
56 | EXPORT_SYMBOL(x86_dma_fallback_dev); | 56 | EXPORT_SYMBOL(x86_dma_fallback_dev); |
57 | 57 | ||
58 | /* Number of entries preallocated for DMA-API debugging */ | ||
59 | #define PREALLOC_DMA_DEBUG_ENTRIES 65536 | ||
60 | |||
61 | void __init pci_iommu_alloc(void) | 58 | void __init pci_iommu_alloc(void) |
62 | { | 59 | { |
63 | struct iommu_table_entry *p; | 60 | struct iommu_table_entry *p; |
@@ -189,7 +186,6 @@ EXPORT_SYMBOL(arch_dma_supported); | |||
189 | static int __init pci_iommu_init(void) | 186 | static int __init pci_iommu_init(void) |
190 | { | 187 | { |
191 | struct iommu_table_entry *p; | 188 | struct iommu_table_entry *p; |
192 | dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES); | ||
193 | 189 | ||
194 | #ifdef CONFIG_PCI | 190 | #ifdef CONFIG_PCI |
195 | dma_debug_add_bus(&pci_bus_type); | 191 | dma_debug_add_bus(&pci_bus_type); |