blob: 37a558a96153f4a9ccf50d416564d27e1522e1a0 [file] [log] [blame]
Glauber Costa459121c92008-04-08 13:20:43 -03001#include <linux/dma-mapping.h>
2
Glauber Costa85c246e2008-04-08 13:20:50 -03003const struct dma_mapping_ops *dma_ops;
4EXPORT_SYMBOL(dma_ops);
5
Glauber Costaf9c258d2008-04-08 13:20:52 -03006#ifdef CONFIG_IOMMU_DEBUG
7int panic_on_overflow __read_mostly = 1;
8int force_iommu __read_mostly = 1;
9#else
10int panic_on_overflow __read_mostly = 0;
11int force_iommu __read_mostly = 0;
12#endif
13
Glauber Costa459121c92008-04-08 13:20:43 -030014int dma_set_mask(struct device *dev, u64 mask)
15{
16 if (!dev->dma_mask || !dma_supported(dev, mask))
17 return -EIO;
18
19 *dev->dma_mask = mask;
20
21 return 0;
22}
23EXPORT_SYMBOL(dma_set_mask);
24
25