diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /arch/sparc/kernel/iommu.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'arch/sparc/kernel/iommu.c')
-rw-r--r-- | arch/sparc/kernel/iommu.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/arch/sparc/kernel/iommu.c b/arch/sparc/kernel/iommu.c index 7690cc219ecc..47977a77f6c6 100644 --- a/arch/sparc/kernel/iommu.c +++ b/arch/sparc/kernel/iommu.c | |||
@@ -6,11 +6,13 @@ | |||
6 | 6 | ||
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/slab.h> | ||
9 | #include <linux/delay.h> | 10 | #include <linux/delay.h> |
10 | #include <linux/device.h> | 11 | #include <linux/device.h> |
11 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-mapping.h> |
12 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
13 | #include <linux/iommu-helper.h> | 14 | #include <linux/iommu-helper.h> |
15 | #include <linux/bitmap.h> | ||
14 | 16 | ||
15 | #ifdef CONFIG_PCI | 17 | #ifdef CONFIG_PCI |
16 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
@@ -169,7 +171,7 @@ void iommu_range_free(struct iommu *iommu, dma_addr_t dma_addr, unsigned long np | |||
169 | 171 | ||
170 | entry = (dma_addr - iommu->page_table_map_base) >> IO_PAGE_SHIFT; | 172 | entry = (dma_addr - iommu->page_table_map_base) >> IO_PAGE_SHIFT; |
171 | 173 | ||
172 | iommu_area_free(arena->map, entry, npages); | 174 | bitmap_clear(arena->map, entry, npages); |
173 | } | 175 | } |
174 | 176 | ||
175 | int iommu_table_init(struct iommu *iommu, int tsbsize, | 177 | int iommu_table_init(struct iommu *iommu, int tsbsize, |
@@ -861,13 +863,3 @@ int dma_supported(struct device *dev, u64 device_mask) | |||
861 | return 0; | 863 | return 0; |
862 | } | 864 | } |
863 | EXPORT_SYMBOL(dma_supported); | 865 | EXPORT_SYMBOL(dma_supported); |
864 | |||
865 | int dma_set_mask(struct device *dev, u64 dma_mask) | ||
866 | { | ||
867 | #ifdef CONFIG_PCI | ||
868 | if (dev->bus == &pci_bus_type) | ||
869 | return pci_set_dma_mask(to_pci_dev(dev), dma_mask); | ||
870 | #endif | ||
871 | return -EINVAL; | ||
872 | } | ||
873 | EXPORT_SYMBOL(dma_set_mask); | ||