Commit 85c246ee authored by Glauber Costa's avatar Glauber Costa Committed by Ingo Molnar

x86: move definition to pci-dma.c

Move dma_ops structure definition to pci-dma.c, where it
belongs.
Signed-off-by: default avatarGlauber Costa <gcosta@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent d741bde2
...@@ -37,7 +37,7 @@ static int pci32_map_error(dma_addr_t dma_addr) ...@@ -37,7 +37,7 @@ static int pci32_map_error(dma_addr_t dma_addr)
return 0; return 0;
} }
static const struct dma_mapping_ops pci32_dma_ops = { const struct dma_mapping_ops pci32_dma_ops = {
.map_single = pci32_map_single, .map_single = pci32_map_single,
.unmap_single = NULL, .unmap_single = NULL,
.map_sg = pci32_dma_map_sg, .map_sg = pci32_dma_map_sg,
...@@ -51,5 +51,10 @@ static const struct dma_mapping_ops pci32_dma_ops = { ...@@ -51,5 +51,10 @@ static const struct dma_mapping_ops pci32_dma_ops = {
.mapping_error = pci32_map_error, .mapping_error = pci32_map_error,
}; };
const struct dma_mapping_ops *dma_ops = &pci32_dma_ops; /* this is temporary */
EXPORT_SYMBOL(dma_ops); int __init no_iommu_init(void)
{
dma_ops = &pci32_dma_ops;
return 0;
}
fs_initcall(no_iommu_init);
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
const struct dma_mapping_ops *dma_ops;
EXPORT_SYMBOL(dma_ops);
int dma_set_mask(struct device *dev, u64 mask) int dma_set_mask(struct device *dev, u64 mask)
{ {
if (!dev->dma_mask || !dma_supported(dev, mask)) if (!dev->dma_mask || !dma_supported(dev, mask))
......
...@@ -47,9 +47,6 @@ ...@@ -47,9 +47,6 @@
#include <asm/numa.h> #include <asm/numa.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
const struct dma_mapping_ops *dma_ops;
EXPORT_SYMBOL(dma_ops);
static unsigned long dma_reserve __initdata; static unsigned long dma_reserve __initdata;
DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment