diff options
author | Glauber Costa <gcosta@redhat.com> | 2008-04-08 12:20:50 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-19 13:19:57 -0400 |
commit | 85c246ee16fe00bf7bf9e7ff09a5d17d9a83cf71 (patch) | |
tree | 2f3503972979558abd5f9532992bb86ebbb6148e /arch/x86 | |
parent | d741bde26dc3444eaeb269051d3f0b623b24de13 (diff) |
x86: move definition to pci-dma.c
Move dma_ops structure definition to pci-dma.c, where it
belongs.
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/pci-base_32.c | 11 | ||||
-rw-r--r-- | arch/x86/kernel/pci-dma.c | 3 | ||||
-rw-r--r-- | arch/x86/mm/init_64.c | 3 |
3 files changed, 11 insertions, 6 deletions
diff --git a/arch/x86/kernel/pci-base_32.c b/arch/x86/kernel/pci-base_32.c index 837bbe91043e..b44ea517fcf0 100644 --- a/arch/x86/kernel/pci-base_32.c +++ b/arch/x86/kernel/pci-base_32.c | |||
@@ -37,7 +37,7 @@ static int pci32_map_error(dma_addr_t dma_addr) | |||
37 | return 0; | 37 | return 0; |
38 | } | 38 | } |
39 | 39 | ||
40 | static const struct dma_mapping_ops pci32_dma_ops = { | 40 | const struct dma_mapping_ops pci32_dma_ops = { |
41 | .map_single = pci32_map_single, | 41 | .map_single = pci32_map_single, |
42 | .unmap_single = NULL, | 42 | .unmap_single = NULL, |
43 | .map_sg = pci32_dma_map_sg, | 43 | .map_sg = pci32_dma_map_sg, |
@@ -51,5 +51,10 @@ static const struct dma_mapping_ops pci32_dma_ops = { | |||
51 | .mapping_error = pci32_map_error, | 51 | .mapping_error = pci32_map_error, |
52 | }; | 52 | }; |
53 | 53 | ||
54 | const struct dma_mapping_ops *dma_ops = &pci32_dma_ops; | 54 | /* this is temporary */ |
55 | EXPORT_SYMBOL(dma_ops); | 55 | int __init no_iommu_init(void) |
56 | { | ||
57 | dma_ops = &pci32_dma_ops; | ||
58 | return 0; | ||
59 | } | ||
60 | fs_initcall(no_iommu_init); | ||
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index f1c24d8e7942..1323cd80387b 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
@@ -1,5 +1,8 @@ | |||
1 | #include <linux/dma-mapping.h> | 1 | #include <linux/dma-mapping.h> |
2 | 2 | ||
3 | const struct dma_mapping_ops *dma_ops; | ||
4 | EXPORT_SYMBOL(dma_ops); | ||
5 | |||
3 | int dma_set_mask(struct device *dev, u64 mask) | 6 | int dma_set_mask(struct device *dev, u64 mask) |
4 | { | 7 | { |
5 | if (!dev->dma_mask || !dma_supported(dev, mask)) | 8 | if (!dev->dma_mask || !dma_supported(dev, mask)) |
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 1076097dcab2..1ff7906a9a4d 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -47,9 +47,6 @@ | |||
47 | #include <asm/numa.h> | 47 | #include <asm/numa.h> |
48 | #include <asm/cacheflush.h> | 48 | #include <asm/cacheflush.h> |
49 | 49 | ||
50 | const struct dma_mapping_ops *dma_ops; | ||
51 | EXPORT_SYMBOL(dma_ops); | ||
52 | |||
53 | static unsigned long dma_reserve __initdata; | 50 | static unsigned long dma_reserve __initdata; |
54 | 51 | ||
55 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | 52 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); |