aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/pci-nommu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/pci-nommu.c')
-rw-r--r--arch/x86/kernel/pci-nommu.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c
index a3933d4330cd..3af4af810c07 100644
--- a/arch/x86/kernel/pci-nommu.c
+++ b/arch/x86/kernel/pci-nommu.c
@@ -4,6 +4,7 @@
4#include <linux/scatterlist.h> 4#include <linux/scatterlist.h>
5#include <linux/string.h> 5#include <linux/string.h>
6#include <linux/init.h> 6#include <linux/init.h>
7#include <linux/gfp.h>
7#include <linux/pci.h> 8#include <linux/pci.h>
8#include <linux/mm.h> 9#include <linux/mm.h>
9 10
@@ -33,7 +34,7 @@ static dma_addr_t nommu_map_page(struct device *dev, struct page *page,
33 dma_addr_t bus = page_to_phys(page) + offset; 34 dma_addr_t bus = page_to_phys(page) + offset;
34 WARN_ON(size == 0); 35 WARN_ON(size == 0);
35 if (!check_addr("map_single", dev, bus, size)) 36 if (!check_addr("map_single", dev, bus, size))
36 return bad_dma_address; 37 return DMA_ERROR_CODE;
37 flush_write_buffers(); 38 flush_write_buffers();
38 return bus; 39 return bus;
39} 40}
@@ -103,12 +104,3 @@ struct dma_map_ops nommu_dma_ops = {
103 .sync_sg_for_device = nommu_sync_sg_for_device, 104 .sync_sg_for_device = nommu_sync_sg_for_device,
104 .is_phys = 1, 105 .is_phys = 1,
105}; 106};
106
107void __init no_iommu_init(void)
108{
109 if (dma_ops)
110 return;
111
112 force_iommu = 0; /* no HW IOMMU */
113 dma_ops = &nommu_dma_ops;
114}