2008-04-09 00:20:43 +08:00
|
|
|
#include <linux/dma-mapping.h>
|
|
|
|
|
2008-04-09 00:20:50 +08:00
|
|
|
const struct dma_mapping_ops *dma_ops;
|
|
|
|
EXPORT_SYMBOL(dma_ops);
|
|
|
|
|
2008-04-09 00:20:52 +08:00
|
|
|
#ifdef CONFIG_IOMMU_DEBUG
|
|
|
|
int panic_on_overflow __read_mostly = 1;
|
|
|
|
int force_iommu __read_mostly = 1;
|
|
|
|
#else
|
|
|
|
int panic_on_overflow __read_mostly = 0;
|
|
|
|
int force_iommu __read_mostly = 0;
|
|
|
|
#endif
|
|
|
|
|
2008-04-09 00:20:43 +08:00
|
|
|
int dma_set_mask(struct device *dev, u64 mask)
|
|
|
|
{
|
|
|
|
if (!dev->dma_mask || !dma_supported(dev, mask))
|
|
|
|
return -EIO;
|
|
|
|
|
|
|
|
*dev->dma_mask = mask;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EXPORT_SYMBOL(dma_set_mask);
|
|
|
|
|
|
|
|
|